[MPlayer-cvslog] r37021 - trunk/gui/wm/ws.c
    ib 
    subversion at mplayerhq.hu
       
    Wed Mar 19 14:54:55 CET 2014
    
    
  
Author: ib
Date: Wed Mar 19 14:54:54 2014
New Revision: 37021
Log:
Don't unnecessarily create a (void) cursor.
Create it only if it hasn't already be done.
This also prevents memory leaks and allows
multiple calls (having no effect then).
Modified:
   trunk/gui/wm/ws.c
Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Wed Mar 19 00:18:02 2014	(r37020)
+++ trunk/gui/wm/ws.c	Wed Mar 19 14:54:54 2014	(r37021)
@@ -1442,8 +1442,11 @@ void wsMouseVisibility(wsWindow *win, in
 
     case wsHideMouseCursor:
 
+        if (win->wsCursor == None) {
         win->wsCursor = XCreatePixmapCursor(wsDisplay, win->wsCursorPixmap, win->wsCursorPixmap, &win->wsColor, &win->wsColor, 0, 0);
         XDefineCursor(wsDisplay, win->WindowID, win->wsCursor);
+        }
+
         break;
     }
 }
    
    
More information about the MPlayer-cvslog
mailing list