summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-11-06 02:15:55 (GMT)
committerjenglish <jenglish@flightlab.com>2007-11-06 02:15:55 (GMT)
commita5ce701b3c9e1a38ff7dfdd113a257ae677cf153 (patch)
tree4cf54cd464a3f722d5257104190a3d7af154b1ed
parent8496c7c6845c751453f883cb2af48738e39cce90 (diff)
downloadtk-a5ce701b3c9e1a38ff7dfdd113a257ae677cf153.zip
tk-a5ce701b3c9e1a38ff7dfdd113a257ae677cf153.tar.gz
tk-a5ce701b3c9e1a38ff7dfdd113a257ae677cf153.tar.bz2
* library/ttk/combobox.tcl: Set focus to listbox in <Map> binding
instead of in Post command (see #1349811 for info).
-rw-r--r--ChangeLog5
-rw-r--r--library/ttk/combobox.tcl13
2 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 187832f..167a5ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-05 Joe English <jenglish@users.sourceforge.net>
+
+ * library/ttk/combobox.tcl: Set focus to listbox in <Map> binding
+ instead of in Post command (see #1349811 for info).
+
2007-11-05 Andreas Kupries <andreask@activestate.com>
* doc/CrtConsoleChan.3: New file providing minimal documentation
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl
index d19a1fd..2c65395 100644
--- a/library/ttk/combobox.tcl
+++ b/library/ttk/combobox.tcl
@@ -1,5 +1,5 @@
#
-# $Id: combobox.tcl,v 1.9 2007/10/31 04:25:23 jenglish Exp $
+# $Id: combobox.tcl,v 1.10 2007/11/06 02:15:55 jenglish Exp $
#
# Combobox bindings.
#
@@ -28,12 +28,16 @@
# The "noActivates" attribute prevents the parent toplevel
# from deactivating when the popdown is posted, and is also
# necessary for "help" windows to receive mouse events.
-# "hideOnSuspend" makes the popdown disappear (resp. reappear)
+# "hideOnSuspend" makes the popdown disappear (resp. reappear)
# when the parent toplevel is deactivated (resp. reactivated).
# (see [#1814778]). Also set [wm resizable 0 0], to prevent
# TkAqua from shrinking the scrollbar to make room for a grow box
# that isn't there.
#
+# In order to work around other platform quirks in TkAqua,
+# [grab] and [focus] are set in <Map> bindings instead of
+# immediately after deiconifying the window.
+#
namespace eval ttk::combobox {
variable Values ;# Values($cb) is -listvariable of listbox widget
@@ -67,7 +71,6 @@ bind TCombobox <<TraverseIn>> { ttk::combobox::TraverseIn %W }
### Combobox listbox bindings.
#
-bind ComboboxListbox <ButtonPress-1> { focus %W ; continue }
bind ComboboxListbox <ButtonRelease-1> { ttk::combobox::LBSelected %W }
bind ComboboxListbox <KeyPress-Return> { ttk::combobox::LBSelected %W }
bind ComboboxListbox <KeyPress-Escape> { ttk::combobox::LBCancel %W }
@@ -75,6 +78,7 @@ bind ComboboxListbox <KeyPress-Tab> { ttk::combobox::LBTab %W next }
bind ComboboxListbox <<PrevWindow>> { ttk::combobox::LBTab %W prev }
bind ComboboxListbox <Destroy> { ttk::combobox::LBCleanup %W }
bind ComboboxListbox <Motion> { ttk::combobox::LBHover %W %x %y }
+bind ComboboxListbox <Map> { focus -force %W }
switch -- [tk windowingsystem] {
win32 {
@@ -286,7 +290,7 @@ proc ttk::combobox::PopdownWindow {cb} {
## PopdownToplevel -- Create toplevel window for the combobox popdown
#
# See also <<NOTE-WM-TRANSIENT>>
-#
+#
proc ttk::combobox::PopdownToplevel {w} {
toplevel $w -class ComboboxPopdown
wm withdraw $w
@@ -389,7 +393,6 @@ proc ttk::combobox::Post {cb} {
#
wm deiconify $popdown
raise $popdown
- focus $popdown.l
}
## Unpost $cb --