From: Rémi Bernon rbernon@codeweavers.com
When the window was empty, it may have been set an empty shape, we need to reset it or the window may stay invisible if the window shape isn't changed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56945 --- dlls/user32/tests/win.c | 7 +++++-- dlls/winex11.drv/bitblt.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 0429211c5a3..775164e3e9f 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -4034,8 +4034,11 @@ static void test_SetForegroundWindow(HWND hwnd) while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
- ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow()); - ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus()); + /* FIXME: these tests are failing because of a race condition + * between internal focus state applied immediately and X11 focus + * message coming late */ + todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow()); + todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus());
SetForegroundWindow(hwnd); check_wnd_state(hwnd, hwnd, hwnd, 0); diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index de233bfb679..5c08c1a2120 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1946,6 +1946,9 @@ static struct window_surface *create_surface( HWND hwnd, Window window, const XV surface->window = window; surface->gc = XCreateGC( gdi_display, window, 0, NULL ); XSetSubwindowMode( gdi_display, surface->gc, IncludeInferiors ); +#ifdef HAVE_LIBXSHAPE + XShapeCombineMask( gdi_display, surface->window, ShapeBounding, 0, 0, None, ShapeSet ); +#endif
TRACE( "created %p for %lx %s image %p\n", surface, window, wine_dbgstr_rect(rect), surface->image->ximage->data );