Alexandre Julliard : winex11: Allow mapping/ unmapping a window even while processing another event.
Alexandre Julliard
julliard at winehq.org
Wed Apr 2 16:36:16 CDT 2008
Module: wine
Branch: master
Commit: f41e2339b73eb624e5d3136ef9b4fe6c38ed3843
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f41e2339b73eb624e5d3136ef9b4fe6c38ed3843
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Apr 2 16:57:17 2008 +0200
winex11: Allow mapping/unmapping a window even while processing another event.
---
dlls/winex11.drv/winpos.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index e858acf..912ddfb 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -388,14 +388,11 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
if (thread_data->current_event && thread_data->current_event->xany.window == data->whole_window)
event_type = thread_data->current_event->type;
- if (event_type == ConfigureNotify || event_type == PropertyNotify)
- {
- TRACE( "not changing window %p/%lx while processing event %u\n",
- hwnd, data->whole_window, event_type );
- return;
- }
+ if (event_type != ConfigureNotify && event_type != PropertyNotify)
+ event_type = 0; /* ignore other events */
- if (data->mapped && (!(new_style & WS_VISIBLE) || !X11DRV_is_window_rect_mapped( rectWindow )))
+ if (data->mapped && (!(new_style & WS_VISIBLE) ||
+ (!event_type && !X11DRV_is_window_rect_mapped( rectWindow ))))
{
TRACE( "unmapping win %p/%lx\n", hwnd, data->whole_window );
wait_for_withdrawn_state( display, data, FALSE );
@@ -408,7 +405,8 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
}
/* don't change position if we are about to minimize or maximize a managed window */
- if (!(data->managed && (swp_flags & SWP_STATECHANGED) && (new_style & (WS_MINIMIZE|WS_MAXIMIZE))))
+ if (!event_type &&
+ !(data->managed && (swp_flags & SWP_STATECHANGED) && (new_style & (WS_MINIMIZE|WS_MAXIMIZE))))
X11DRV_sync_window_position( display, data, swp_flags, &old_client_rect, &old_whole_rect );
if ((new_style & WS_VISIBLE) &&
More information about the wine-cvs
mailing list