+2002-09-20 Fernando Nasser <fnasser@totem.toronto.redhat.com>
+
+ * library/combobox.tcl (build): New variable to save grabs.
+ (widgetProc): Save and restore previous grabs.
+
2002-07-03 Martin M. Hunt <hunt@redhat.com>
* library/panedwindow.tcl (_placePlanes): Make certain things
variable options
variable oldValue
variable ignoreTrace
+ variable grablist
+ variable grabstatus
variable this
array set widgets {}
proc ::combobox::widgetProc {w command args} {
upvar ::combobox::${w}::widgets widgets
upvar ::combobox::${w}::options options
+ upvar ::combobox::${w}::grablist grablist
+ upvar ::combobox::${w}::grabstatus grabstatus
# this is just shorthand notation...
set doWidgetCommand \
# *gasp* do a global grab!!! Mom always told not to
# do things like this... :-)
+ set grablist [grab current]
+ foreach grabitem $grablist {
+ lappend grabstatus [grab status $grabitem]
+ }
grab -global $widgets(this)
# fake the listbox into thinking it has focus
}
# hides the listbox
grab release $widgets(this)
+ foreach grabitem $grablist itemstatus $grabstatus {
+ if {$itemstatus == "global"} {
+ grab set -global $grabitem
+ } else {
+ grab set $grabitem
+ }
+ }
+ set grablist {}
+ set grabstatus {}
$widgets(button) configure -relief raised
wm withdraw $widgets(popup)