Revert SWP_NOCOPYBITS removal from 9fd6603ce3

This was added on the request of Aurora FM's developer because they use
thousands of child windows for rendering, but this causes unnecessary
flickering in some situations and it should no longer be as needed now
that `fix_local_coordinates()` is only called once when moving windows
around.
This commit is contained in:
Robbert van der Helm
2023-05-07 12:46:06 +02:00
parent 2c79170f5f
commit 3af48be58a
2 changed files with 8 additions and 3 deletions
+3 -3
View File
@@ -448,7 +448,7 @@ void Editor::resize(uint16_t width, uint16_t height) {
});
SetWindowPos(win32_window_.handle_, nullptr, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOACTIVATE |
SWP_NOOWNERZORDER | SWP_DEFERERASE);
SWP_NOOWNERZORDER | SWP_DEFERERASE | SWP_NOCOPYBITS);
// Make sure that after the resize the screen coordinates always match
// up properly. Without this Soundtoys Crystallizer might appear choppy
@@ -1205,7 +1205,7 @@ LRESULT CALLBACK window_proc(HWND handle,
handle, GWLP_USERDATA,
static_cast<LONG_PTR>(reinterpret_cast<size_t>(editor)));
} break;
// Setting `SWP_DEFERERASE` somewhat reduces flickering on
// Setting `SWP_NOCOPYBITS` somewhat reduces flickering on
// `fix_local_coordinates()` calls with plugins that don't do double
// buffering since it speeds up the redrawing process.
case WM_WINDOWPOSCHANGING: {
@@ -1216,7 +1216,7 @@ LRESULT CALLBACK window_proc(HWND handle,
}
WINDOWPOS* info = reinterpret_cast<WINDOWPOS*>(lParam);
info->flags |= SWP_DEFERERASE;
info->flags |= SWP_DEFERERASE | SWP_NOCOPYBITS;
} break;
case WM_TIMER: {
auto editor = reinterpret_cast<Editor*>(