[PATCH 0/1] MR8468: winewayland: Only detach/attach client surface if it is different.
From: Rémi Bernon <rbernon(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58423 --- dlls/winewayland.drv/window.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index 8077767a26f..cf1e4d2d99b 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -785,15 +785,18 @@ void set_client_surface(HWND hwnd, struct wayland_client_surface *new_client) if (!(data = wayland_win_data_get(hwnd))) return; - if ((old_client = data->client_surface)) - wayland_client_surface_detach(old_client); - - if ((data->client_surface = new_client)) + if (new_client != data->client_surface) { - if (toplevel && NtUserIsWindowVisible(hwnd)) - wayland_client_surface_attach(new_client, toplevel); - else - wayland_client_surface_detach(new_client); + if ((old_client = data->client_surface)) + wayland_client_surface_detach(old_client); + + if ((data->client_surface = new_client)) + { + if (toplevel && NtUserIsWindowVisible(hwnd)) + wayland_client_surface_attach(new_client, toplevel); + else + wayland_client_surface_detach(new_client); + } } wayland_win_data_release(data); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8468
participants (1)
-
Rémi Bernon