Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57285
This actually fixes the underlying issue, which is also present with undecorated windows / virtual desktop mode.
The window manager problem is a different issue, more likely a window manager bug that adds to the soup, and the other fix also makes this work probably because it ends up reset the X window shape somehow.
From: Rémi Bernon rbernon@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57285 --- dlls/win32u/window.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 272d8926be2..4855555d926 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2064,7 +2064,12 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru
if (!(win = get_win_ptr( hwnd )) || win == WND_DESKTOP || win == WND_OTHER_PROCESS) return FALSE; old_surface = win->surface; - if (old_surface != new_surface) swp_flags |= SWP_FRAMECHANGED; /* force refreshing non-client area */ + if (old_surface != new_surface) + { + if (old_surface && new_surface) window_surface_set_shape( new_surface, old_surface->shape_region ); + swp_flags |= SWP_FRAMECHANGED; /* force refreshing non-client area */ + } + if (new_surface == &dummy_surface) swp_flags |= SWP_NOREDRAW; else if (old_surface == &dummy_surface) {
From: Rémi Bernon rbernon@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57285 --- server/window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/server/window.c b/server/window.c index 2af70b09102..a510eafbf78 100644 --- a/server/window.c +++ b/server/window.c @@ -134,6 +134,7 @@ static const struct object_ops window_ops = #define PAINT_NONCLIENT 0x0040 /* needs WM_NCPAINT */ #define PAINT_DELAYED_ERASE 0x0080 /* still needs erase after WM_ERASEBKGND */ #define PAINT_PIXEL_FORMAT_CHILD 0x0100 /* at least one child has a custom pixel format */ +#define PAINT_REGION_CHANGED 0x0200 /* window region has changed */
/* growable array of user handles */ struct user_handle_array @@ -2075,6 +2076,9 @@ static void set_window_region( struct window *win, struct region *region, int re
if (redraw) old_vis_rgn = get_visible_region( win, DCX_WINDOW );
+ if (!region != !win->win_region || (region && !is_region_equal( region, win->win_region ))) + win->paint_flags |= PAINT_REGION_CHANGED; + if (win->win_region) free_region( win->win_region ); win->win_region = region;
@@ -2650,8 +2654,8 @@ DECL_HANDLER(set_window_pos) if (is_visible( top ) && (top->paint_flags & PAINT_HAS_SURFACE)) { reply->surface_win = top->handle; - reply->needs_update = !!(top->paint_flags & (PAINT_HAS_PIXEL_FORMAT | PAINT_PIXEL_FORMAT_CHILD)) || - !!top->win_region; + reply->needs_update = !!(top->paint_flags & (PAINT_HAS_PIXEL_FORMAT | PAINT_PIXEL_FORMAT_CHILD | PAINT_REGION_CHANGED)); + top->paint_flags &= ~PAINT_REGION_CHANGED; } }