GNOME Bugzilla – Bug 93022
raise focused window above all other windows
Last modified: 2004-12-22 21:47:04 UTC
Package: metacity Product: metacity Synopsis: non gtk2 full screen apps won't allow switching to other windows/dialogs Severity: grave Priority: Urgent Bugzilla-Product: metacity BugBuddy-GnomeVersion: 2.0 tim.foster@sun.com 2002-09-10 In previous builds, while working in a full screen application, you could switch to other windows/dialogs despite the full-screen window being there - the new windows would appear on top of the full-screen one. In this build ( GNOME_INTERNAL_RELEASE=2.0_beta2_06 ) it's preventing the user from switching to these windows. This old behaviour was vital to using Forte : it means that any dialog boxes that appear during the course of your work will appear behind the full screen window, and you can't switch focus to those windows. I've tested this with Mozilla 1.1, Evolution 1.0.8 and dtcalc and they all exhibit this wm behaviour too (so it's not some weird java<-->window manager problem). Interestingly, gtk2-based applications like nautilus and gnome-terminal have no problems - with full screen nautilus, you bring up dialogs and they appear above the full-screen window as expected. Bugtraq+: 4744454 ------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-09-11 09:16 ------- Reassigning to the default owner of the component, hp@redhat.com.
Just to supply a litte more info : timf@cuprum[64] mcs -p `which metacity` /usr/gnome/bin/metacity: {GNOME 2.0 Beta 2 06}:metacity-2.4.0:sparc:2002-09-03:unsupported
It has to do with the group leader hint and window groups. I believe we need to patch metacity such that the focused window is always on top of all windows, regardless of what layer the windows are in, with possible exception of the panels. This is probably a somewhat tricky patch.
fwiw, as a user, I found the previous (2.3.987 ?) functionality nice : I'd get a full screen window, but could still alt-tab to terminals and the like. If the tricky bit is trying to ensure that one application gets control of the screen along with it's child windows, but other applications should be prevented from appearing, then I'd prefer the simpler option. (case in point, while using Forte/Netbeans, it's actually useful to switch back to other windows, like terminals from time to time... likewise Evolution alarms should still popup, etc.) Maybe I'm not understanding your comments correctly.
I'm saying I don't think we should use the window group, the focused window should just always come forward regardless of fullscreen windows. I'm not sure why it worked in 2.3.987, other than accidentally - fullscreen windows maybe weren't kept on top then, I guess. Now they are on top to be on top of the panel.
On commenting the following lines in window.c:1697, it works as before if (group) meta_group_update_layers (group); else meta_stack_update_layer (window->screen->stack, window); Only thing is that fullscreen window does not override the panel. It is like maximizing.
The things go like this. When fullscreen option is opted for a window, all its group windows are converted to the fullscreen layer. Thatz why it allows to switch between the group windows. And during meta_stack_raise, in the function meta_stack_sync_to_server all the stack layers (from 0 to 7) are updated and stored in root_children_stacked in the reverse order of stack layers (from 7 to 0). Hence META_LAYER_FULLSCREEN (=5) always overrides the META_LAYER_NORMAL(=2) Hence whenever any other window is selected,meta_stack_raise calls meta_stack_sync_to_server which updates the FULLSCREEN layer to be always top of NORMAL layer. 1. Either we can update the layer of all NORMAL layer windows to FULLSCREEN LAYER (instead of group_member_is_fullscreen something like normal_layer_member_is_fullscreen) 2. Or we can use only normal layer by commenting the following 3 lines in stack.c:313 compute_layer() if (group_member_is_fullscreen (window)) window->layer = META_LAYER_FULLSCREEN; else This allows to switch between all windows. Which portion of code is responsible to allow fullscreen windows to override the panel?
What is the expected behavior? fullscreen mode override the panel or not?
fullscreen mode is supposed to cover the panel.
I have used the first method. If any window is fullscreenenized then upgrade the layer of all windows in the display (not only group windows) to fullscreen. Only when the layer is higher than normal i.e., META_LAYER_FULLSCREEN, the window overrides panel. Hence i have used this way.
Created attachment 11081 [details] [review] Please check the patch attached.
I added a FOCUSED_WINDOW layer and stick the focused window in that. This may have funky unintended side effects, but we'll see.
verified on suns beta2 build10 - i can alt-tab between windows when some are full screen.
In GNOME_INTERNAL_RELEASE=2.0 stable-12 this problem still appears (mozilla windows, and SunONE studio in particular have problems - I've tried setting/unsetting the "disable workarounds" metacity setting, but neither has any effect. In addition, some dialogs get hidden when you fullscreen a window. For example, when I full screen SunONE Studio, and pull up the "New ..." dialog, it appears fine. When I try the "Print..." dialog, it pops up behind the main window, and I can't alt-tab to any other windows I'd be happy to demo this to anyone here locally ?
another quick update, this is still a problem to some extent on GNOME_INTERNAL_RELEASE=2.0 fcs-01 which I installed just now. Here though, as mentioned in my last post this morning, some dialog boxes of application pop up "under" the full screen window, and you have to alt-tab to get to them correctly. Though I can alt tab to other applications, so part of this bug is fixed. For example, the mozilla "File -> Send link" appears under the full screen window, where as "File -> Print" appears above the full screen window : this behaviour is inconsistent (and a bit annoying), and you have to alt-tab to get to the windows that pop up under the main application window. In particular, this behaviour is evident on SunONE studio, and that's where having a full screen window is most useful (to me at least)
It may well be http://bugzilla.gnome.org/show_bug.cgi?id=96140
It could also be caused by http://bugzilla.gnome.org/show_bug.cgi?id=96973 perhaps.
I get the impression that this bug is not a problem any more. I can alt tab from full screen apps, and the full screen app will drop out of the full screen layer. With the full screen patch I committed yesterday, I think that we can probably close this bug.
I don't have a recent build to test this, but as per my comments above, could you try the Mozilla File->Send link, which appears under the full screen window, incorrectly (imho). File->Print in Mozilla appears above the full screen window. Ideally, both should appear at the top of the stack, since they were created by a fullscreen app.