winex11: Don't set the cursor on the desktop window since it's managed by another process.
This commit is contained in:
parent
7d9739e2b5
commit
f3ae5f5215
|
@ -879,6 +879,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr )
|
||||||
*/
|
*/
|
||||||
void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
|
void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
|
||||||
{
|
{
|
||||||
|
struct x11drv_thread_data *data = x11drv_thread_data();
|
||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
|
|
||||||
if (lpCursor)
|
if (lpCursor)
|
||||||
|
@ -887,40 +888,22 @@ void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
|
||||||
else
|
else
|
||||||
TRACE("NULL\n");
|
TRACE("NULL\n");
|
||||||
|
|
||||||
if (root_window != DefaultRootWindow(gdi_display))
|
/* set the same cursor for all top-level windows of the current thread */
|
||||||
{
|
|
||||||
/* If in desktop mode, set the cursor on the desktop window */
|
|
||||||
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
cursor = create_cursor( gdi_display, lpCursor );
|
cursor = create_cursor( data->display, lpCursor );
|
||||||
if (cursor)
|
if (cursor)
|
||||||
{
|
|
||||||
XDefineCursor( gdi_display, root_window, cursor );
|
|
||||||
/* Make the change take effect immediately */
|
|
||||||
XFlush(gdi_display);
|
|
||||||
XFreeCursor( gdi_display, cursor );
|
|
||||||
}
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
|
||||||
else /* set the same cursor for all top-level windows of the current thread */
|
|
||||||
{
|
{
|
||||||
struct x11drv_thread_data *data = x11drv_thread_data();
|
if (data->cursor) XFreeCursor( data->display, data->cursor );
|
||||||
|
data->cursor = cursor;
|
||||||
wine_tsx11_lock();
|
if (data->cursor_window)
|
||||||
cursor = create_cursor( data->display, lpCursor );
|
|
||||||
if (cursor)
|
|
||||||
{
|
{
|
||||||
if (data->cursor) XFreeCursor( data->display, data->cursor );
|
XDefineCursor( data->display, data->cursor_window, cursor );
|
||||||
data->cursor = cursor;
|
/* Make the change take effect immediately */
|
||||||
if (data->cursor_window)
|
XFlush( data->display );
|
||||||
{
|
|
||||||
XDefineCursor( data->display, data->cursor_window, cursor );
|
|
||||||
/* Make the change take effect immediately */
|
|
||||||
XFlush( data->display );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue