changeset 36927:b99b9968056b

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.
author ib
date Wed, 19 Mar 2014 14:07:47 +0000
parents f28f084fa78c
children 6738386f30da
files gui/wm/ws.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/wm/ws.c	Wed Mar 19 13:56:44 2014 +0000
+++ b/gui/wm/ws.c	Wed Mar 19 14:07:47 2014 +0000
@@ -1433,11 +1433,11 @@
     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: