summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit@noemail.net>2004-07-15 05:27:58 (GMT)
committerwolfsuit <wolfsuit@noemail.net>2004-07-15 05:27:58 (GMT)
commit7956a0027f8de4317357ca1ddd2c348f16c3c8c5 (patch)
tree38b356331af27c0560d8a5c020a2aed272d9ca1d /macosx
parent4712a24e7e8ab5f043a03b0d4320415b558cc801 (diff)
downloadtk-7956a0027f8de4317357ca1ddd2c348f16c3c8c5.zip
tk-7956a0027f8de4317357ca1ddd2c348f16c3c8c5.tar.gz
tk-7956a0027f8de4317357ca1ddd2c348f16c3c8c5.tar.bz2
2004-07-14 Jim Ingham <jingham@apple.com>
* macosx/tkMacOSXCursor.c (TkpSetCursor): The code to not reset the cursor more often than necessary was getting fooled when the current cursor was nulled out when the current cursor gets freed. So in the case where the input cursor was NULL, we have to just always set it. [Bug #894550] FossilOrigin-Name: 721092786ff485d969f436dcee7a89f9180420fa
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXCursor.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 8e72897..31dd4b8 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXCursor.c,v 1.4 2003/02/11 07:26:18 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXCursor.c,v 1.5 2004/07/15 05:27:59 wolfsuit Exp $
*/
#include "tkPort.h"
@@ -431,9 +431,14 @@ TkpSetCursor(
}
if (cursor == None) {
- if (gCurrentCursor == NULL) {
- cursorChanged = 0;
- }
+ /*
+ * This is a little tricky. We can't really tell whether
+ * gCurrentCursor is NULL because it was NULL last time around
+ * or because we just freed the current cursor. So if the input
+ * cursor is NULL, we always need to reset it, we can't trust the
+ * cursorChanged logic.
+ */
+
gCurrentCursor = NULL;
} else {
if (gCurrentCursor == (TkMacOSXCursor *) cursor) {