After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 164716 - focus modal dialog when you select parent from alt-tab switcher
focus modal dialog when you select parent from alt-tab switcher
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.9.x
Other All
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 164841
 
 
Reported: 2005-01-20 16:47 UTC by Danielle Madeley
Modified: 2005-01-25 17:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
focus modal transients of a window instead of the window (2.39 KB, patch)
2005-01-25 06:57 UTC, Elijah Newren
accepted-commit_now Details | Review

Description Danielle Madeley 2005-01-20 16:47:32 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.
Comment 1 Elijah Newren 2005-01-21 18:00:36 UTC
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...
Comment 2 Elijah Newren 2005-01-25 06:57:52 UTC
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 3 Havoc Pennington 2005-01-25 17:01:26 UTC
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.
Comment 4 Elijah Newren 2005-01-25 17:27:17 UTC
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).