Commit 2fdbeefc authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

winex11.drv: Avoid a crash if not in a desktop mode.

parent 129889b2
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment