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 486445 - Don't change focus to new window if it is concealed
Don't change focus to new window if it is concealed
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.20.x
Other All
: High normal
: 2.21.1
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2007-10-13 23:41 UTC by Olav Vitters
Modified: 2008-07-14 20:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Olav Vitters 2007-10-13 23:41:27 UTC
If a window is created AND the entire area of the window is concealed, then focus should remain as it was before, AND attention hint is set on the window.

Apparently a new window can only be concealed if there is an existing window that has 'always on top' set. However, possibly a window might set a 'appear always under other windows'. In those cases the new window (if fully concealed) should also not get focus.

Use case:
 * You watch a movie in a fullscreen + always on top MPlayer
 * Some window pops under the movie
 * You suddenly cannot pause the movie anymore with 'space'. It goes to some window you cannot even see. Usually activating whatever button might have the default focus of that window

Same happens with games btw, although I think those don't have always on top set (so metacity should prevent windows from being seen even).
Comment 1 Thomas Thurman 2007-10-16 22:31:47 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

http://svn.gnome.org/viewvc/metacity?view=revision&revision=3358

(Please let me know how you get on with this and then I'll backport it to 2.20.)
Comment 2 Olav Vitters 2007-10-20 19:46:36 UTC
Fix doesn't work properly:
 * If you switch between workspace with the fullscreen program, it will make the other programs behind it 'blink'
 * file-roller popup usually pops up 'centered' (horizontal+vertical of screen).. if focus is prevented, it doesn't seem to popup in the center
 * I think it doesn't work if many windows popup within max 1 second (e.g., if Firefox restarts and loads the 5+ windows again)
Comment 3 Olav Vitters 2007-10-21 09:33:13 UTC
testing..
Comment 4 Thomas Thurman 2007-11-09 12:51:18 UTC
This needs to be fixed before 2.21.1 releases; I hope to work on it this weekend.
Comment 5 Thomas Thurman 2007-11-12 02:04:21 UTC
For your three problems:

1) Well spotted; this was a slip I made in the condition of the "if" statement: the stacking adjustment, etc., should never be made for windows being mapped after their first mapping.

http://svn.gnome.org/viewvc/metacity?view=revision&revision=3386

2) File-roller doesn't come up centred for me anyway, but perhaps I'm doing it wrongly.

3) I'm not sure how to reproduce this.

Let me know whether the new fix works for you.
Comment 6 Richard Laager 2008-07-09 06:27:44 UTC
We at the Pidgin project received a bug report that we think may be related to this fix. If a conversation window is open on the non-active workspace and you double-click that buddy (or chat) in the buddy list, we call gtk_window_present() on the conversation window. Previously, that would bring it to your current workspace and focus it. Now, you get a taskbar item on your current workspace that blinks. If you click it, it changes to the other (previously non-active) workspace and focuses the window.

Do you think that was caused by this change? If so, was that intentional?

Thanks for any help you can provide!
Comment 7 Olav Vitters 2008-07-14 20:46:02 UTC
That wasn't the intention of this bug. I think the behaviour you describe was changed in another bug ( IIRC bug 482354).