[MPlayer-cvslog] r37023 - trunk/gui/wm/ws.c

ib subversion at mplayerhq.hu
Wed Mar 19 15:07:47 CET 2014


Author: ib
Date: Wed Mar 19 15:07:47 2014
New Revision: 37023

Log:
Don't unnecessarily call XDefineCursor().

Call it only when freeing the cursor resource, and call it before
freeing the cursor resource then to avoid problems with a defined
cursor which resource has already been freed.

Additionally, use symbolic constant instead of numeric value.

Modified:
   trunk/gui/wm/ws.c

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Wed Mar 19 14:56:44 2014	(r37022)
+++ trunk/gui/wm/ws.c	Wed Mar 19 15:07:47 2014	(r37023)
@@ -1433,11 +1433,11 @@ void wsMouseVisibility(wsWindow *win, in
     case wsShowMouseCursor:
 
         if (win->wsCursor != None) {
+            XDefineCursor(wsDisplay, win->WindowID, None);
             XFreeCursor(wsDisplay, win->wsCursor);
             win->wsCursor = None;
         }
 
-        XDefineCursor(wsDisplay, win->WindowID, 0);
         break;
 
     case wsHideMouseCursor:


More information about the MPlayer-cvslog mailing list