| Ticket UUID: | 561708 | |||
| Title: | Make transient state mirror master state | |||
| Type: | Patch | Version: | None | |
| Submitter: | mdejong | Created on: | 2002-05-28 22:16:05 | |
| Subsystem: | 65. Generic Window Operations | Assigned To: | hobbs | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2002-06-13 02:10:58 | |
| Resolution: | Accepted | Closed By: | mdejong | |
| Closed on: | 2002-06-12 19:10:58 | |||
| Description: |
Here is a patch that changes the way transient windows and master windows work. The current implementation supports iconify of the transient when the master is iconified, but this does not work if you withdraw the master. Here is a quick example. toplevel .s ; toplevel .m wm transient .s .m If I run [wm iconify .m] at this point, both windows vanish from the display. If I were to instead run [wm withdraw .m] only the master window would be unmapped. The exact state that the transient is in at this point differs under Win32 and X. One might expect [wm deiconify .m] to work the same for a withdrawn master and an iconified master, but that too is broken. I have written up a bunch of test cases that deal with all of these state changes and the results under Win32 and X match exactly after my patch is applied. The patch also fixes a number of bugs in the current Win32 and X implementations of the wm transient command. I would feel much better about this change if someone could take a look at it to see if anything jumps out at them. I have run the full test suite under X and Win32 and the patch does not cause any failures. | |||
| User Comments: |
mdejong added on 2002-06-13 02:10:58:
Logged In: YES user_id=90858 Hearing no objections, I checked this patch into the CVS on 2002-06-12. jenglish added on 2002-06-08 08:48:52: Logged In: YES
user_id=68433
> Perhaps we just need to fix the bgerror command so that it
does not do this
That much at least is necessary -- right now
after idle { error "oops" } yields:
bgerror failed to handle background error.
Original error: oops
Error in bgerror: can't make ".bgerrorDialog" its own
master
I guess making .bgerrorDialog a non-transient is OK.
(Making it a transient of ".", as was done by default in Tk
8.3, led to a lot of problems in apps with multiple
toplevels.)
mdejong added on 2002-06-08 08:30:21: Logged In: YES user_id=90858 Well, this patch does not change that behavior. I did check a patch in on 2002-05-27 to define and test for that error. Under X, you can make a window a transient of itself, even though this makes no sense. Under Win32, it was not possible to make a window a transient of itself. If you did, it would silently set the transient to "" and do nothing. That edge case makes the code really wonky because you would not have a master to bind transient events to. Perhaps we just need to fix the bgerror command so that it does not do this. jenglish added on 2002-06-08 08:10:47: Logged In: YES user_id=68433 [wm transient .t .t] is actually a useful thing to do in some circumstances. (For example, the new bgerror dialog does this.) It has the effect of giving .t transient decorations (usually appropriate for dialog boxes), without linking it to any particular top-level. This is especially important for the bgerror dialog. mdejong added on 2002-06-07 06:09:35: Logged In: YES user_id=90858 Any objections to checking this in? If there is a maintainer for this area that I should assign this to, who would that be? mdejong added on 2002-05-29 05:16:33: File Added - 23917: wm.patch | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki