Map a non zero size or off-screen window only if it's not already
mapped
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Jul 5 04:11:24 CDT 2006
Hello,
Changelog:
Map a non zero size or off-screen window only if it's not already mapped.
diff -up cvs/hq/wine/dlls/winex11.drv/window.c wine/dlls/winex11.drv/window.c
--- cvs/hq/wine/dlls/winex11.drv/window.c 2006-07-03 15:48:29.000000000 +0900
+++ wine/dlls/winex11.drv/window.c 2006-07-05 15:47:43.000000000 +0900
@@ -532,7 +532,10 @@ void X11DRV_set_iconic_state( HWND hwnd
XIconifyWindow( display, data->whole_window, DefaultScreen(display) );
else
if (X11DRV_is_window_rect_mapped( &rect ))
+ {
+ TRACE( "mapping win %p\n", hwnd );
XMapWindow( display, data->whole_window );
+ }
}
XFree(wm_hints);
diff -up cvs/hq/wine/dlls/winex11.drv/winpos.c wine/dlls/winex11.drv/winpos.c
--- cvs/hq/wine/dlls/winex11.drv/winpos.c 2006-07-03 15:48:29.000000000 +0900
+++ wine/dlls/winex11.drv/winpos.c 2006-07-05 16:51:08.000000000 +0900
@@ -574,13 +574,14 @@ BOOL X11DRV_set_window_pos( HWND hwnd, H
const RECT *rectClient, UINT swp_flags, const RECT *valid_rects )
{
struct x11drv_win_data *data;
- RECT new_whole_rect, old_client_rect, old_screen_rect;
+ RECT new_whole_rect, old_whole_rect, old_client_rect, old_screen_rect;
WND *win;
DWORD old_style, new_style;
BOOL ret;
if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE;
+ old_whole_rect = data->whole_rect;
new_whole_rect = *rectWindow;
X11DRV_window_to_X_rect( data, &new_whole_rect );
@@ -710,7 +711,8 @@ BOOL X11DRV_set_window_pos( HWND hwnd, H
XMapWindow( display, data->whole_window );
wine_tsx11_unlock();
}
- else if ((swp_flags & (SWP_NOSIZE | SWP_NOMOVE)) != (SWP_NOSIZE | SWP_NOMOVE))
+ else if ((swp_flags & (SWP_NOSIZE | SWP_NOMOVE)) != (SWP_NOSIZE | SWP_NOMOVE) &&
+ !X11DRV_is_window_rect_mapped( &old_whole_rect ))
{
/* resizing from zero size to non-zero -> map */
TRACE( "mapping non zero size or off-screen win %p\n", hwnd );
More information about the wine-patches
mailing list