From: Fernando Nasser <fnasser@redhat.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: insight@sources.redhat.com, "Martin M. Hunt" <hunt@redhat.com>
Subject: Re: Modal Dialogs lose grab when comboboxes are used
Date: Wed, 18 Sep 2002 14:52:00 -0000 [thread overview]
Message-ID: <3D88F595.1040902@redhat.com> (raw)
In-Reply-To: <3D88E72F.3040406@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
Martin,
Here is a more complete version of the fix.
I was not keeping track if the old grabs were local or global.
Regards,
Fernando
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
[-- Attachment #2: COMBOBOX.PATCH --]
[-- Type: text/plain, Size: 1855 bytes --]
Index: library/combobox.tcl
===================================================================
RCS file: /cvs/src/src/libgui/library/combobox.tcl,v
retrieving revision 1.2
diff -c -p -r1.2 combobox.tcl
*** library/combobox.tcl 8 Sep 2001 22:34:46 -0000 1.2
--- library/combobox.tcl 18 Sep 2002 21:49:20 -0000
*************** proc ::combobox::build {w args } {
*** 106,111 ****
--- 106,113 ----
variable options
variable oldValue
variable ignoreTrace
+ variable grablist
+ variable grabstatus
variable this
array set widgets {}
*************** proc ::combobox::doInternalWidgetCommand
*** 677,682 ****
--- 679,686 ----
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 \
*************** proc ::combobox::widgetProc {w command a
*** 787,792 ****
--- 791,800 ----
# *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
*************** proc ::combobox::widgetProc {w command a
*** 802,807 ****
--- 810,824 ----
}
# 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)
next prev parent reply other threads:[~2002-09-18 21:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-18 13:50 Fernando Nasser
2002-09-18 14:52 ` Fernando Nasser [this message]
2002-09-20 10:39 ` Fernando Nasser
2002-09-24 20:16 ` Martin M. Hunt
2002-09-24 22:04 ` Fernando Nasser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D88F595.1040902@redhat.com \
--to=fnasser@redhat.com \
--cc=hunt@redhat.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).