GNOME Bugzilla – Bug 669808
FIX: fullscreen/unscreen was broken for Quartz on OS X earlier than 10.7
Last modified: 2012-12-28 21:17:38 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.
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).
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.
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