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 688710 - [PATCH] Splash screens shouldn't stay on top of all applications
[PATCH] Splash screens shouldn't stay on top of all applications
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
2.24.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
: 327976 686875 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-11-20 09:10 UTC by camillo.lugaresi+gnome
Modified: 2012-11-20 21:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch enabling hides-on-deactivate behavior for splashscreens (2.78 KB, text/plain)
2012-11-20 09:10 UTC, camillo.lugaresi+gnome
  Details
Do the same for more window types (3.24 KB, patch)
2012-11-20 12:24 UTC, Michael Natterer
none Details | Review

Description camillo.lugaresi+gnome 2012-11-20 09:10:56 UTC
Created attachment 229456 [details]
patch enabling hides-on-deactivate behavior for splashscreens

Currently, windows with GDK_WINDOW_TYPE_HINT_SPLASHSCREEN are put on the
NSStatusWindowLevel on Mac. Unfortunately, this causes them to stay on top
of all other windows, even if another application is brought to the front.
This is very undesirable: splashscreens are typically used in programs with
a long startup sequence (e.g. the GIMP), which means the user is likely to
switch to another application to do something else during the wait (e.g.
check his e-mail), but he is currently obstructed by the splashscreen
covering any other programs he might try to use.

On the other hand, putting the splashscreen back on NSNormalWindowLevel
might violate the application's expectation that the splashscreen will be
stay above its own windows.

This patch solves the problem by activating the "hides on deactivate"
behavior for splashscreens: when another application is brought to the front,
the splashscreen is hidden so as not to obscure it. This is the expected
behavior for application-specific floating windows on OS X.

Note that GDK_WINDOW_TYPE_HINT_SPLASHSCREEN does not keep a window above
other applications even on Linux, so not even a cross-platform consistency
argument can support the current behavior on Mac.
Comment 1 camillo.lugaresi+gnome 2012-11-20 09:13:05 UTC
This should fix bugs #130734 and #688702, which were invalidly filed against the GIMP. I would be thankful if somebody could verify this by testing the patch.
Comment 2 camillo.lugaresi+gnome 2012-11-20 09:13:56 UTC
Also bug #327976.
Comment 3 Michael Natterer 2012-11-20 10:25:39 UTC
Very nice, thank you :)
Comment 4 Michael Natterer 2012-11-20 10:26:49 UTC
*** Bug 327976 has been marked as a duplicate of this bug. ***
Comment 5 Michael Natterer 2012-11-20 10:27:44 UTC
*** Bug 130734 has been marked as a duplicate of this bug. ***
Comment 6 Michael Natterer 2012-11-20 11:05:14 UTC
*** Bug 686875 has been marked as a duplicate of this bug. ***
Comment 7 Michael Natterer 2012-11-20 12:24:55 UTC
Created attachment 229468 [details] [review]
Do the same for more window types

Updated patch that hides all windows that are not "main windows", afaics.
Comment 8 Kristian Rietveld 2012-11-20 15:47:28 UTC
(In reply to comment #7)
> Created an attachment (id=229468) [details] [review]
> Do the same for more window types
> 
> Updated patch that hides all windows that are not "main windows", afaics.

This makes a lot of sense to me, though I am a bit worried about popup windows such as context menus and tooltips.  When an application loses focus, shouldn't these be fully popped down and not just hidden during deactivation?  What happens with an open context menu, when you deactivate the application and activate it again?  I don't think you want such context menus to reappear and we want to make sure these are really popped and destroyed on application deactivation.
Comment 9 Michael Natterer 2012-11-20 20:20:27 UTC
I think you are right, we should not hide this de-facto bug. I'll change
the patch to only hide torn-off menus and commit.
Comment 10 Michael Natterer 2012-11-20 21:07:37 UTC
Fixed in master, gtk-2-24 and gtk-3-6:

commit 4f6e1fdf161747d98970e141e9bfbe7b9ac8771d
Author: Camillo Lugaresi <camillo.lugaresi@gmail.com>
Date:   Tue Nov 20 02:52:39 2012 -0600

    Bug 688710 - splashscreen shouldn't be always on top on OS X
    
    Activate the "hides on deactivate" behavior for splashscreens,
    torn-off menus, utility windows, tooltips and notifications: when
    another application is brought to the front, these windows are hidden
    so as not to obscure it. This is the expected behavior for
    application-specific floating windows on OS X.
    (cherry picked from commit 0596f5591f36f57b99103914ba03abbed5765e8b)