summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkTrack.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-10-22 03:35:13 (GMT)
committerjenglish <jenglish@flightlab.com>2007-10-22 03:35:13 (GMT)
commitda9f8e86e69b0f5266067190d85b3c6bdf4fd7fa (patch)
tree301564bc68d0f6dfd5ed9d80ff06989e16c9d418 /generic/ttk/ttkTrack.c
parent4c506d9161a0b4bb086f2b7ff405d2e76aa6ed7d (diff)
downloadtk-da9f8e86e69b0f5266067190d85b3c6bdf4fd7fa.zip
tk-da9f8e86e69b0f5266067190d85b3c6bdf4fd7fa.tar.gz
tk-da9f8e86e69b0f5266067190d85b3c6bdf4fd7fa.tar.bz2
* library/ttk/combobox.tcl: ttk::combobox overhaul;
fixes [#1814778, #1780286, #1609168, #1349586] * library/ttk/aquaTheme.tcl: Factored out aqua-specific combobox -postposition adjustments. * generic/ttk/ttkTrack.c: Detect [grab]s and unpress pressed element; combobox workaround no longer needed.
Diffstat (limited to 'generic/ttk/ttkTrack.c')
-rw-r--r--generic/ttk/ttkTrack.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/ttk/ttkTrack.c b/generic/ttk/ttkTrack.c
index 6f0cc35..ab3dd5f 100644
--- a/generic/ttk/ttkTrack.c
+++ b/generic/ttk/ttkTrack.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTrack.c,v 1.2 2006/11/03 03:06:22 das Exp $
+/* $Id: ttkTrack.c,v 1.3 2007/10/22 03:35:13 jenglish Exp $
* Copyright (c) 2004, Joe English
*
* TtkTrackElementState() -- helper routine for widgets
@@ -21,8 +21,6 @@
* <ButtonRelease> event.
*
* TODO: Handle "chords" properly (e.g., <B1-ButtonPress-2>)
- * TODO: Deal with grabs -- possible to get a Press event w/no corresponding Release.
- *
*/
#include <tk.h>
@@ -132,6 +130,8 @@ ElementStateEventProc(ClientData clientData, XEvent *ev)
break;
case LeaveNotify:
ActivateElement(es, 0);
+ if (ev->xcrossing.mode == NotifyGrab)
+ PressElement(es, 0);
break;
case EnterNotify:
node = Ttk_LayoutIdentify(
@@ -152,7 +152,7 @@ ElementStateEventProc(ClientData clientData, XEvent *ev)
*/
Tk_DeleteEventHandler(es->corePtr->tkwin,
ElementStateMask, ElementStateEventProc, es);
- ckfree((ClientData)es);
+ ckfree(clientData);
break;
}
}
@@ -172,4 +172,3 @@ void TtkTrackElementState(WidgetCore *corePtr)
ElementStateMask,ElementStateEventProc,es);
}
-