winex11.drv: Avoid a crash if not in a desktop mode.
Dmitry Timoshkov
dmitry at codeweavers.com
Thu May 28 01:00:10 CDT 2009
---
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();
}
--
1.6.2.4
More information about the wine-patches
mailing list