# HG changeset patch # User ib # Date 1395238067 0 # Node ID b99b9968056b25b313c6121baa37ce042329dbf0 # Parent f28f084fa78c284bca74836c5a247b20819e88b1 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. diff -r f28f084fa78c -r b99b9968056b gui/wm/ws.c --- 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: