Module: wine Branch: master Commit: 2fdbeefc9693fe4af2ec9b9581311442f141633e URL: http://source.winehq.org/git/wine.git/?a=commit;h=2fdbeefc9693fe4af2ec9b9581...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Thu May 28 15:00:10 2009 +0900
winex11.drv: Avoid a crash if not in a desktop mode.
---
dlls/winex11.drv/desktop.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 5b96e33..a2bc004 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -137,6 +137,8 @@ Window CDECL X11DRV_create_desktop( UINT width, UINT height ) Window win; Display *display = thread_init_display();
+ TRACE( "%u x %u\n", width, height ); + wine_tsx11_lock();
/* Create window */ @@ -206,7 +208,7 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height) Display *display = thread_display(); XEvent xev;
- wine_tsx11_lock(); + if (!display || root_window != DefaultRootWindow( display )) return;
xev.xclient.type = ClientMessage; xev.xclient.window = root_window; @@ -225,9 +227,9 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height)
TRACE("action=%li\n", xev.xclient.data.l[0]);
+ wine_tsx11_lock(); XSendEvent( display, DefaultRootWindow(display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev ); - wine_tsx11_unlock(); }