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 93022 - raise focused window above all other windows
raise focused window above all other windows
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
unspecified
Other other
: Normal normal
: GNOME2.x
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on: 96140 96973
Blocks:
 
 
Reported: 2002-09-11 13:15 UTC by Bugtraq+/Bugzilla Gateway
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Please check the patch attached. (4.23 KB, patch)
2002-09-15 04:21 UTC, JeyaSudha
none Details | Review

Description Bugtraq+/Bugzilla Gateway 2002-09-11 13:16:36 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.

Comment 1 Tim Foster 2002-09-11 13:19:30 UTC
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


Comment 2 Havoc Pennington 2002-09-11 13:47:36 UTC
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.
Comment 3 Tim Foster 2002-09-11 14:01:56 UTC
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.
Comment 4 Havoc Pennington 2002-09-11 15:16:28 UTC
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.
Comment 5 JeyaSudha 2002-09-13 05:43:30 UTC
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.
Comment 6 JeyaSudha 2002-09-14 11:44:58 UTC
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?
Comment 7 JeyaSudha 2002-09-14 15:50:49 UTC
What is the expected behavior?  fullscreen mode override the panel or
not?
Comment 8 Havoc Pennington 2002-09-14 17:18:15 UTC
fullscreen mode is supposed to cover the panel.
Comment 9 JeyaSudha 2002-09-15 04:20:33 UTC
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.
Comment 10 JeyaSudha 2002-09-15 04:21:26 UTC
Created attachment 11081 [details] [review]
Please check the patch attached.
Comment 11 Havoc Pennington 2002-09-24 21:28:12 UTC
I added a FOCUSED_WINDOW layer and stick the focused window in that.
This may have funky unintended side effects, but we'll see.
Comment 12 Shane O'Connor 2002-09-26 15:45:10 UTC
verified on suns beta2 build10 - i can alt-tab between windows when
some are full screen.
Comment 13 Tim Foster 2002-11-06 09:09:54 UTC
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 ?
Comment 14 Tim Foster 2002-11-06 15:11:16 UTC
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)
Comment 15 Havoc Pennington 2002-11-06 16:44:04 UTC
It may well be http://bugzilla.gnome.org/show_bug.cgi?id=96140
Comment 16 Havoc Pennington 2002-11-06 16:45:20 UTC
It could also be caused by
http://bugzilla.gnome.org/show_bug.cgi?id=96973 perhaps.
Comment 17 Rob Adams 2003-05-30 20:54:32 UTC
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.
Comment 18 Tim Foster 2003-06-02 07:51:20 UTC
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.