Commit 7da32954 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Stricter check whether a window needs to be mapped on the screen.

parent d1c74586
...@@ -643,11 +643,12 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow ...@@ -643,11 +643,12 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
if (data->whole_window && !(swp_flags & SWP_WINE_NOHOSTMOVE)) if (data->whole_window && !(swp_flags & SWP_WINE_NOHOSTMOVE))
{ {
if (!(old_style & WS_VISIBLE) && (new_style & WS_VISIBLE)) if ((new_style & WS_VISIBLE) && !(new_style & WS_MINIMIZE) &&
X11DRV_is_window_rect_mapped( rectWindow ))
{ {
/* window got shown, map it */ if (!(old_style & WS_VISIBLE))
if (X11DRV_is_window_rect_mapped( rectWindow ))
{ {
/* window got shown, map it */
TRACE( "mapping win %p\n", hwnd ); TRACE( "mapping win %p\n", hwnd );
X11DRV_sync_window_style( display, data ); X11DRV_sync_window_style( display, data );
X11DRV_set_wm_hints( display, data ); X11DRV_set_wm_hints( display, data );
...@@ -655,8 +656,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow ...@@ -655,8 +656,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
XMapWindow( display, data->whole_window ); XMapWindow( display, data->whole_window );
wine_tsx11_unlock(); wine_tsx11_unlock();
} }
} else if ((swp_flags & (SWP_NOSIZE | SWP_NOMOVE)) != (SWP_NOSIZE | SWP_NOMOVE))
else if ((new_style & WS_VISIBLE) && X11DRV_is_window_rect_mapped( rectWindow ))
{ {
/* resizing from zero size to non-zero -> map */ /* resizing from zero size to non-zero -> map */
TRACE( "mapping non zero size or off-screen win %p\n", hwnd ); TRACE( "mapping non zero size or off-screen win %p\n", hwnd );
...@@ -664,6 +664,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow ...@@ -664,6 +664,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
XMapWindow( display, data->whole_window ); XMapWindow( display, data->whole_window );
wine_tsx11_unlock(); wine_tsx11_unlock();
} }
}
wine_tsx11_lock(); wine_tsx11_lock();
XFlush( display ); /* FIXME: should not be necessary */ XFlush( display ); /* FIXME: should not be necessary */
wine_tsx11_unlock(); wine_tsx11_unlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment