From 4fd668940f2155c4b06d24b6da8bcccd01f66f4c Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 3 Jun 2006 10:58:37 +0000 Subject: [PATCH] Bug #6619: Fix disappearing hardware cursor. (Colin Harrison) --- ChangeLog | 6 ++++++ hw/xwin/XWin.rc | 1 - hw/xwin/wincursor.c | 9 ++++----- hw/xwin/winresource.h | 1 - hw/xwin/winwndproc.c | 3 --- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2076f3159..364bf4ec4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,12 @@ Bug #6956: Fix crash when removing session leader before its children. (Rich Coe) + * hw/xwin/wincursor.c: + * hw/xwin/winresource.h: + * hw/xwin/winwndproc.c: + * hw/xwin/XWin.rc: + Bug #6619: Fix disappearing hardware cursor. (Colin Harrison) + 2006-06-01 Adam Jackson * hw/xfree86/common/xf86Init.c: diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc index 6ff23ca47..749c0f5f5 100644 --- a/hw/xwin/XWin.rc +++ b/hw/xwin/XWin.rc @@ -94,7 +94,6 @@ BEGIN POPUP "TRAYICON_MENU" BEGIN MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT - MENUITEM "Show Cursor", ID_APP_SHOWCURSOR MENUITEM "&About...", ID_APP_ABOUT MENUITEM SEPARATOR MENUITEM "E&xit", ID_APP_EXIT diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c index 5a619922a..2036267b8 100644 --- a/hw/xwin/wincursor.c +++ b/hw/xwin/wincursor.c @@ -41,6 +41,8 @@ #include #include +extern Bool g_fSoftwareCursor; + #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) @@ -438,8 +440,6 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen) static Bool winRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) { - WIN_DEBUG_MSG("winRealizeCursor: cursor=%p\n", pCursor); - if(pCursor == NULL || pCursor->bits == NULL) return FALSE; @@ -456,7 +456,6 @@ winRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) static Bool winUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { - WIN_DEBUG_MSG("winUnrealizeCursor: cursor=%p\n", pCursor); return TRUE; } @@ -508,7 +507,7 @@ winSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { if (pScreenPriv->cursor.visible) { - if (!bInhibit) + if (!bInhibit && g_fSoftwareCursor) ShowCursor (FALSE); pScreenPriv->cursor.visible = FALSE; } @@ -531,7 +530,7 @@ winSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) if (!pScreenPriv->cursor.visible) { - if (!bInhibit) + if (!bInhibit && g_fSoftwareCursor) ShowCursor (TRUE); pScreenPriv->cursor.visible = TRUE; } diff --git a/hw/xwin/winresource.h b/hw/xwin/winresource.h index c9b23ffc3..5aa884030 100644 --- a/hw/xwin/winresource.h +++ b/hw/xwin/winresource.h @@ -46,7 +46,6 @@ #define ID_APP_HIDE_ROOT 201 #define ID_APP_ALWAYS_ON_TOP 202 #define ID_APP_ABOUT 203 -#define ID_APP_SHOWCURSOR 204 #define ID_ABOUT_UG 300 #define ID_ABOUT_FAQ 301 diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index 13d759578..14893f6d3 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -1206,9 +1206,6 @@ winWindowProc (HWND hwnd, UINT message, /* Display Exit dialog */ winDisplayExitDialog (s_pScreenPriv); return 0; - case ID_APP_SHOWCURSOR: - winDebug("ShowCursor: %d\n", ShowCursor(TRUE)); - return 0; #ifdef XWIN_MULTIWINDOW case ID_APP_HIDE_ROOT: