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 669808 - FIX: fullscreen/unscreen was broken for Quartz on OS X earlier than 10.7
FIX: fullscreen/unscreen was broken for Quartz on OS X earlier than 10.7
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
Depends on:
Blocks:
 
 
Reported: 2012-02-10 15:06 UTC by Paul Davis
Modified: 2012-12-28 21:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix for fullscreen on pre-10.7 quartz (3.98 KB, text/plain)
2012-02-10 15:06 UTC, Paul Davis
Details
New version of fullscreen-for-pre-10.6 patch (4.42 KB, text/plain)
2012-11-30 19:26 UTC, Paul Davis
Details

Description Paul Davis 2012-02-10 15:06:30 UTC
Created attachment 207260 [details]
fix for fullscreen on pre-10.7 quartz

gdk_window_set_decorations() : the pre-10.7 version of this code works by creating a new top level window with or without a title bar, and then stuffing the existing contentView into it (the old top level window is released).

while this code works, its not enough: the window is not visible, and has not had all the properties of the old top level window carried over (e.g. title). so there are two parts to this patch: 

(1) in gdk_window_set_decorations(), we make sure that we map all the old window's properties (at least, all those that GDK/GTK touches) onto the new window.

(2a) in gdk_window_(un)fullscreen() make sure to call makeKeyAndOrderFront so that the new window created by gdk_window_set_decorations is visible. this has no adverse effects on 10.7, even though it didn't create a new window (just called setStyleMask on the existing window).

(2b) in gdk_window_fullscreen() explicitly resize the contentView to fill the new larger window, which otherwise doesn't appear to happen. 

the old code would have worked for code that made a window fullscreen before displaying it. it doesn't work for an app that can go in and out of fullscreen mode.

confirmation that this doesn't adversely affect the 10.7 functionality would be a good idea.
Comment 1 parafin 2012-09-09 15:20:37 UTC
Window title gets lost on OS X 10.8.1 after switching from/to fullscreen too. Tried this patch, it didn't help (though it doesn't seem to break anything either).
Comment 2 Paul Davis 2012-11-30 19:26:20 UTC
Created attachment 230332 [details]
New version of fullscreen-for-pre-10.6 patch

This patch also fixes the missing-name-after-unfullscreen bug noted above.
Comment 3 Kristian Rietveld 2012-12-28 21:17:38 UTC
Thanks for the patches! I committed them to gtk-2-24 including two more fixes. One of these fixes changes from release to close, which seems to be needed on 10.7 for the non-setStyleMask path to work correctly.


I didn't commit to gtk-3, if anyone wants to cherry pick there, please do so.
The commit ids are:

62f1d871b70a8e08b899942827386d6f3222c986
a8008b796f14444dff3ac46af884238fc4f214f6
30deba453a045107eadd4deea572e29192c298c1
184407309f83a06b9215c8123091263d483edc8b