Module: wine Branch: master Commit: 84918e7f0603d61652f7f28b0ee3e48ca5e53a7a URL: http://source.winehq.org/git/wine.git/?a=commit;h=84918e7f0603d61652f7f28b0e...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Sep 24 14:08:33 2012 +0200
winex11: Add window data structure locking to the SetWindowStyle entry point.
---
dlls/winex11.drv/window.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 65f40fd..6b8dc0c 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1480,13 +1480,12 @@ void CDECL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text ) */ void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ) { - struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); - DWORD changed; + struct x11drv_win_data *data; + DWORD changed = style->styleNew ^ style->styleOld;
if (hwnd == GetDesktopWindow()) return; - if (!data || !data->whole_window) return; - - changed = style->styleNew ^ style->styleOld; + if (!(data = get_win_data( hwnd ))) return; + if (!data->whole_window) goto done;
if (offset == GWL_STYLE && (changed & WS_DISABLED)) set_wm_hints( data );
@@ -1495,6 +1494,8 @@ void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ) sync_window_opacity( data->display, data->whole_window, 0, 0, 0 ); if (data->surface) set_surface_color_key( data->surface, CLR_INVALID ); } +done: + release_win_data( data ); }