summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/ttk/ttkButton.c3
-rw-r--r--library/ttk/aquaTheme.tcl27
-rw-r--r--macosx/tkMacOSXKeyEvent.c21
-rw-r--r--macosx/ttkMacOSXTheme.c2
-rw-r--r--tests/canvImg.test1
5 files changed, 35 insertions, 19 deletions
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index 68a6293..72e9815 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -82,7 +82,8 @@ static Tk_OptionSpec BaseOptionSpecs[] =
*/
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
"none", Tk_Offset(Base,base.compoundObj), -1,
- 0,(ClientData)ttkCompoundStrings,GEOMETRY_CHANGED },
+ TK_OPTION_DONT_SET_DEFAULT,(ClientData)ttkCompoundStrings,
+ GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Pad",
NULL, Tk_Offset(Base,base.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED},
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl
index 83fa16f..e8009be 100644
--- a/library/ttk/aquaTheme.tcl
+++ b/library/ttk/aquaTheme.tcl
@@ -9,8 +9,8 @@ namespace eval ttk::theme::aqua {
-font TkDefaultFont \
-background systemWindowBackgroundColor \
-foreground systemLabelColor \
- -selectbackground systemHighlight \
- -selectforeground systemLabelColor \
+ -selectbackground systemSelectedTextBackgroundColor \
+ -selectforeground systemSelectedTextColor \
-selectborderwidth 0 \
-insertwidth 1
@@ -38,7 +38,18 @@ namespace eval ttk::theme::aqua {
# Entry
ttk::style configure TEntry \
-foreground systemTextColor \
- -background systemTextBackgroundColor \
+ -background systemTextBackgroundColor
+ ttk::style map TEntry \
+ -foreground {
+ disabled systemDisabledControlTextColor
+ } \
+ -selectforeground {
+ background systemTextColor
+ } \
+ -selectbackground {
+ background systemTextBackgroundColor
+ }
+
# Workaround for #1100117:
# Actually, on Aqua we probably shouldn't stipple images in
@@ -59,20 +70,16 @@ namespace eval ttk::theme::aqua {
# Combobox:
ttk::style configure TCombobox \
-foreground systemTextColor \
- -background systemTransparent \
- -selectforeground systemSelectedTextColor \
- -selectbackground systemSelectedTextBackgroundColor
+ -background systemTransparent
ttk::style map TCombobox \
-foreground {
disabled systemDisabledControlTextColor
} \
-selectforeground {
- !active systemTextColor
+ background systemTextColor
} \
-selectbackground {
- !active systemTextBackgroundColor
- !focus systemTextBackgroundColor
- focus systemSelectedTextBackgroundColor
+ background systemTransparent
}
# Spinbox
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 0fb1d53..f67460b 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -137,9 +137,9 @@ unsigned short releaseCode;
}
/*
- * Events are only received for the front Window on the Macintosh. So
+ * Key events are only received for the front Window on the Macintosh. So
* to build an XEvent we look up the Tk window associated to the Front
- * window. If a different window has a local grab we ignore the event.
+ * window.
*/
TkWindow *winPtr = TkMacOSXGetTkWindow(w);
@@ -148,11 +148,18 @@ unsigned short releaseCode;
if (tkwin) {
TkWindow *grabWinPtr = winPtr->dispPtr->grabWinPtr;
- if (grabWinPtr
- && grabWinPtr != winPtr
- && !winPtr->dispPtr->grabFlags /* this means the grab is local. */
- && grabWinPtr->mainPtr == winPtr->mainPtr) {
- return theEvent;
+ /*
+ * If a local grab is in effect, key events for windows in the
+ * grabber's application are redirected to the grabber. Key events
+ * for other applications are delivered normally. If a global
+ * grab is in effect all key events are redirected to the grabber.
+ */
+
+ if (grabWinPtr) {
+ if (winPtr->dispPtr->grabFlags || /* global grab */
+ grabWinPtr->mainPtr == winPtr->mainPtr){ /* same appl. */
+ tkwin = (Tk_Window) winPtr->dispPtr->focusPtr;
+ }
}
} else {
tkwin = (Tk_Window) winPtr->dispPtr->focusPtr;
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 4f9c044..952aa20 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -2095,7 +2095,7 @@ static void TrackElementDraw(
Tcl_GetDoubleFromObj(NULL, elem->fromObj, &from);
Tcl_GetDoubleFromObj(NULL, elem->toObj, &to);
Tcl_GetDoubleFromObj(NULL, elem->valueObj, &value);
- factor = RangeToFactor(to - from);
+ factor = RangeToFactor(to);
HIThemeTrackDrawInfo info = {
.version = 0,
diff --git a/tests/canvImg.test b/tests/canvImg.test
index 459a761..a5e8e10 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -803,6 +803,7 @@ test canvImg-11.3 {ImageChangedProc procedure} -constraints {
foo2 changed 0 0 0 0 80 60
.c create image 50 100 -image foo -tags image -anchor nw
.c create image 70 110 -image foo2 -anchor nw
+ update
set z {}
set timer [after 500 {lappend z "timed out"}]
image create test foo -variable x