GNOME Bugzilla – Bug 164716
focus modal dialog when you select parent from alt-tab switcher
Last modified: 2005-01-25 17:27:17 UTC
In new metacity, dialogs do not appear in the alt-tab switcher (as they do not appear in the taskbar). This is very sensible (unless you have an unparented dialog, but that's a different bug). However, when you alt-tab to the parent, and it's currently showing a modal dialog, the dialog should be focused instead.
I thought this was a duplicate. However, it looks like it was just a sidenote in bug 126489, comment 2 (though stated slightly differently). It takes too long to find the bugs about modal dialogs (even though there's only about 4), so I'm going to make a new tracker...
Created attachment 36495 [details] [review] focus modal transients of a window instead of the window This patch works whenever trying to focus a window, not just whenever trying to focus a window with alt-tab. Which makes sense, because windows with a transient modal window can't receive input anyway, so why focus them? Further, the patch also moves any transient modal dialog to the current workspace if it's not already there. I think it's a really nice way from a user interface point of view to reinforce the idea that a modal window must be dealt with before the main window can be interacted with again. However, I'm not so sure this patch is correct because of applications with multiple windows and a modal transient. For example, open a couple gnome-terminal windows. Make sure one has multiple tabs. Go to close the one with multiple tabs, but leave the modal confirmation dialog that comes up open. Now, leave the dialog alone, but try to work in the gnome-terminal windows. Understandably, the one you started to close doesn't work. Surprisingly, the other gnome-terminal windows don't work either. This can also happen for other windows, such as Mozilla. This was discussed some in bug 126489. I don't know how to handle it. There's also the issue of group modal dialogs (which I didn't know about but which Gregory points out in bug 126489)--I don't handle those either. So...thoughts?
Comment on attachment 36495 [details] [review] focus modal transients of a window instead of the window Looks OK to me. This doesn't seem to make things *worse* for app-model (rather than parent-window-model) windows, so we may as well put it in. GTK does support only-modal-for-parent-window but nobody uses it because people are using modality as a programming crutch rather than a UI feature.
I committed, so I'm going to go ahead and mark as FIXED (bug 126489 can remain open for the Metacity handling of app-modal vs. parent-window-modal issue).