# HG changeset patch # User ib # Date 1395237294 0 # Node ID f0dd7b34f56ee0119ea6603970297d876f628722 # Parent 5e22164b4b825faf3e0781a66c049e5f7798f242 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). diff -r 5e22164b4b82 -r f0dd7b34f56e gui/wm/ws.c --- a/gui/wm/ws.c Tue Mar 18 23:18:02 2014 +0000 +++ b/gui/wm/ws.c Wed Mar 19 13:54:54 2014 +0000 @@ -1442,8 +1442,11 @@ 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; } }