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 165243 - Splash screen windows set always-on-top
Splash screen windows set always-on-top
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2005-01-25 22:39 UTC by Billy Biggs
Modified: 2005-01-27 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Treat splashscreens same as other windows for stacking; fix unrelated warning about lack of prototype stuff (1.36 KB, patch)
2005-01-27 05:15 UTC, Elijah Newren
accepted-commit_now Details | Review

Description Billy Biggs 2005-01-25 22:39:04 UTC
Using metacity 2.8.6 from FC3, I noticed that windows using the type hint
_NET_WM_WINDOW_TYPE_SPLASH are always-on-top of other windows.  This is awkward
for applications which can take a long time to start up, as the window obscures
other applications.

We use:

  gtk_window_set_type_hint(main, GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);

to give our splash screen window this hint.
Comment 1 Elijah Newren 2005-01-25 23:04:14 UTC
Apparently, this was intentional.  From stack.h:
  META_LAYER_DESKTOP        = 0,
  META_LAYER_BOTTOM         = 1,
  META_LAYER_NORMAL         = 2,
  META_LAYER_TOP            = 3,
  META_LAYER_DOCK           = 4,
  META_LAYER_FULLSCREEN     = 5,
  META_LAYER_SPLASH         = 6,

What would you suggest?  I probably wouldn't have a problem with using
META_LAYER_NORMAL instead of META_LAYER_SPLASH in most cases because it would
just appear on top of other windows when mapped and the user would probably just
sit and wait most of the time for the real app window to appear.  This would
also allow the user to interact with other windows if they really wanted to.

However, there's somewhat of a sticking point--what about windows that are "On
Top" (_NET_WM_STATE_ABOVE) or other docks (a11y stuff like gok or whatever)?  If
the user has any of those (besides of course the standard panels that should
only be found at the screen edges), then the splashscreen could appear below
such windows, which may not be what we want.  Of course, it might be exactly
what we want.  I'm not sure.

Havoc, usability people -- thoughts?
Comment 2 Billy Biggs 2005-01-25 23:15:33 UTC
I assumed it was intentional, but it's not required or implied by the standard,
and it is causing problems for users of our application which can take about 30
seconds to start up (obscuring their other applications in the process).  I
would suggest that it be treated as a normal window in terms of stacking order
(META_LAYER_NORMAL).
Comment 3 Havoc Pennington 2005-01-26 01:49:41 UTC
If you ask the usability people they are just going to tell you splash screens
are evil I bet, fair warning ;-)

Normal stacking is probably fine. I thought about some fancier stuff (e.g.
minimize on click) but it could all cause problems.

A really fancy trick would be if there's a splash, associate it with the
"starting ..." button in the task list so you could minimize/unminimize it, but
that sounds hard and not too worthwhile.
Comment 4 Vidar Braut Haarr 2005-01-26 08:51:36 UTC
IIRC, the GNOME splash screen that displays while logging in can be removed
simply by clicking on it once - perhaps this could be adopted to all
META_LAYER_SPLASH-windows?

It's a fairly simple thing, and it's also a very natural "reaction" to apply to
a splashscreen you want to go away, I'd think.

Of course, this doesn't solve it for users without a mouse ... Perhaps it could
be made to vanish on 'Esc' as well?
Comment 5 Billy Biggs 2005-01-26 14:10:02 UTC
Do you know off-hand which version of metacity introduced this stacking order
for splash screens?  We will probably have to stop using the hint in eclipse
because of this problem.

  https://bugs.eclipse.org/bugs/show_bug.cgi?id=83667
Comment 6 Elijah Newren 2005-01-26 16:44:20 UTC
Havoc: Well, I almost made the evil comment myself--although perhaps that is due
to being used to a window manager that makes them evil?  ;-)

Billy: The following appears to be the ChangeLog commit:

2002-02-09  Havoc Pennington  <hp@pobox.com>

        * src/themes/Atlanta/metacity-theme-1.xml: put in some kind of
        distinctive frame for UTILITY, though it's ugly. Also put in the
        borderless look for maximized windows.

        * src/stack.c (compute_layer): put splash screen in the splash
        layer

        * src/stack.h (enum): create a splash screen layer

   ...

Which pre-dates Gnome 2.0 and I believe means that it has been in every stable
Metacity release so far.

As far as making splashscreens disappear when they are clicked on or when they
have focus and the user presses Escape--wouldn't that be something that would be
better done at the gtk+ level?
Comment 7 Havoc Pennington 2005-01-26 16:58:11 UTC
As a general principle I would not advise working around WM bugs in apps; you
get in infinite loops where not all the bugs can be fixed. For example in this
case you could easily create other bugs since metacity won't know what kind of
window that is, and then I can't fix those bugs in metacity.

My favorite historical examples of everyone working around everyone else and
breaking things are:
 - clipboard; app A used CLIPBOARD and app B used PRIMARY, then in the 
   next release they swap to work around each other, multiply times 
   100 apps and watch everything be broken indefinitely
 - handling of backspace/delete in the terminal; apps kept changing to 
   treat one sequence as bs and another as delete (see the options in
   gnome-terminal), and terminals kept changing what they sent when 
   you pressed bs/del to work around the apps. Watch everything be broken
   indefinitely.

The way to avoid these eternal bugs is always the same: write down the spec, and
everyone follow the spec instead of chasing everyone else's tail.

I'd say this is especially true of bugs that aren't critical in nature, as this
one is not. You may as well take the course of action that leads to an eventual
steady-state.

</today's editorial>
Comment 8 Billy Biggs 2005-01-26 17:53:41 UTC
This bug in particular is more awkward than it may appear.  On startup, while
showing the splash screen, eclipse pops up a dialog asking where it should look
for data.  This dialog is now being obscured by the splash screen under
metacity.  Similar problems can occur if the Java VM crashes, which will also
cause a dialog to pop up while the splash screen is still present.

I have confirmed that the splash screen is always on top on older versions of
metacity, and since this makes it difficult to start eclipse due to the dialog
being obscured, I am going to have to stop using the hint.

It would be nice if metacity announced its version number in a window property,
as I would really like to use the appropriate hint for our window.  In general I
agree that work arounds are dangerous and should be avoided.  However, if the
side effects are too awkward and the work around is carefully written, they can
be quite useful.  Specs are great, but so are reference platforms and tested code.

</op-ed>
Comment 9 Havoc Pennington 2005-01-26 21:31:34 UTC
That sounds fine, as long as you're thinking about it in each case.

I'm not opposed to a _METACITY_VERSION hint on the WM check window, that's
pretty trivial for us to do.
Comment 10 Billy Biggs 2005-01-26 21:37:47 UTC
I filed bug 165350 about the hint.
Comment 11 Elijah Newren 2005-01-27 05:15:11 UTC
Created attachment 36584 [details] [review]
Treat splashscreens same as other windows for stacking; fix unrelated warning about lack of prototype stuff
Comment 12 Elijah Newren 2005-01-27 18:28:16 UTC
committed.