Re: 4 modal dialog limit -- wm transient bug
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: 4 modal dialog limit -- wm transient bug

From: <seannakasone@yahoo.com>
Date: Wed Mar 22 2006 - 20:58:16 CET

Yes, we originally had it as a single level transient, but we changed
it because of another bug exhibited by this code.
After the 4th dialog is opened, try clicking on another app in the
windows taskbar, you'll notice that sometimes (like 50% of the time),
the 4th dialog will be covered by the 3rd dialog. And in our case the
4th dialog was small, so you could not see it, and since it had a grab,
our app appeared to be frozen. The only way to bring the 4th dialog
back to the top is to click on our app in the taskbar.

proc opendlg3 {} {
   toplevel .t.t.t

   wm transient .t.t.t . ;# this keeps .t on top of .
   wm geometry .t.t.t +10+10
   wm withdraw .t.t.t
   wm title .t.t.t "my title3"
   button .t.t.t.b -text "clickme" -width 30 -height 30 -command ""
   pack .t.t.t.b

   wm deiconify .t.t.t
   grab .t.t.t
   update
}

proc opendlg2 {} {
   toplevel .t.t

   wm transient .t.t . ;# this keeps .t on top of .
   wm geometry .t.t +10+10
   wm withdraw .t.t
   wm title .t.t "my title2"
   button .t.t.b -text "clickme" -width 30 -height 30 -command
"opendlg3"
   pack .t.t.b

   wm deiconify .t.t
   grab .t.t
   update
}

proc opendlg {} {
   toplevel .t

   wm transient .t . ;# this keeps .t on top of .
   wm geometry .t +10+10
   wm withdraw .t
   wm title .t "my title"
   button .t.b -text "clickme" -width 30 -height 30 -command "opendlg2"
   pack .t.b

   wm deiconify .t
   grab .t
   update
}

button .b -text "multi-click me" -width 30 -height 30 -command
"opendlg"
pack .b
Received on Sun Apr 30 02:46:08 2006