winex11: Don't set the cursor on the desktop window since it's managed by another process.

This commit is contained in:
Alexandre Julliard 2007-08-20 14:04:53 +02:00
parent 7d9739e2b5
commit f3ae5f5215
1 changed files with 12 additions and 29 deletions

View File

@ -879,6 +879,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr )
*/
void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
{
struct x11drv_thread_data *data = x11drv_thread_data();
Cursor cursor;
if (lpCursor)
@ -887,24 +888,7 @@ void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
else
TRACE("NULL\n");
if (root_window != DefaultRootWindow(gdi_display))
{
/* If in desktop mode, set the cursor on the desktop window */
wine_tsx11_lock();
cursor = create_cursor( gdi_display, lpCursor );
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();
/* set the same cursor for all top-level windows of the current thread */
wine_tsx11_lock();
cursor = create_cursor( data->display, lpCursor );
@ -921,7 +905,6 @@ void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
}
wine_tsx11_unlock();
}
}
/***********************************************************************
* SetCursorPos (X11DRV.@)