Module: wine Branch: master Commit: 1cfed8922e3b865b7a8fde20a29bdfff7330d6bf URL: http://source.winehq.org/git/wine.git/?a=commit;h=1cfed8922e3b865b7a8fde20a2...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Sep 17 16:37:26 2012 +0200
winex11: Add window data locking to the mouse functions.
---
dlls/winex11.drv/mouse.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 72b85b3..5808420 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -488,15 +488,18 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) struct x11drv_thread_data *thread_data; RECT rect; DWORD style; + BOOL fullscreen;
if (hwnd == GetDesktopWindow()) return FALSE; - if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; style = GetWindowLongW( hwnd, GWL_STYLE ); if (!(style & WS_VISIBLE)) return FALSE; if ((style & (WS_POPUP | WS_CHILD)) == WS_CHILD) return FALSE; /* maximized windows don't count as full screen */ if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) return FALSE; - if (!is_window_rect_fullscreen( &data->whole_rect )) return FALSE; + if (!(data = get_win_data( hwnd ))) return FALSE; + fullscreen = is_window_rect_fullscreen( &data->whole_rect ); + release_win_data( data ); + if (!fullscreen) return FALSE; if (!(thread_data = x11drv_thread_data())) return FALSE; if (GetTickCount() - thread_data->clip_reset < 1000) return FALSE; if (!reset && clipping_cursor && thread_data->clip_hwnd) return FALSE; /* already clipping */ @@ -541,7 +544,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU return; }
- if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!(data = get_win_data( hwnd ))) return;
if (window == data->whole_window) { @@ -565,6 +568,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU sync_window_cursor( data->whole_window ); last_cursor_change = input->u.mi.time; } + release_win_data( data );
if (hwnd != GetDesktopWindow()) {