GNOME Bugzilla – Bug 737561
quartz: gtk+ 3.14.0 fails to build on 10.6.8, 'NSFullScreenWindowMask' undeclared
Last modified: 2014-10-27 10:51:00 UTC
See MacPorts ticket https://trac.macports.org/ticket/45202 for full details including build log Building Quartz backend fails for 10.6 and earlier as follows: GdkQuartzNSWindow.c: In function '-[GdkQuartzNSWindow initWithContentRect:styleMask:backing:defer:screen:]': GdkQuartzNSWindow.c:236: warning: class 'GdkQuartzNSWindow' does not implement the 'NSWindowDelegate' protocol GdkQuartzNSWindow.c: In function '-[GdkQuartzNSWindow setStyleMask:]': GdkQuartzNSWindow.c:662: error: 'NSFullScreenWindowMask' undeclared (first use in this function) NSFullScreenWindowMask was not introduced until 10.7 This appears to be due to commit https://git.gnome.org/browse/gtk+/commit/?id=ec17a649aed65fb0a27d6cf10ab097a5f310dfc6 which purports to add native full screen window support for 10.7+. Most of the code added is guarded by the AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER availability macro but the code that adds the setStyleMask method to GdkQuartzNSWindow is not so protected, hence the failure.
*** This bug has been marked as a duplicate of bug 735054 ***
Please note this is NOT a duplicate of bug 735054. It is a separate of instance of the same type of problem.
Issue remains after update to gtk+ 3.14.1 (containing fix for bug 735054).
Created attachment 289338 [details] [review] quartz: fix build on 10.6 and below Most of the native full screen support introduced in ec17a649 is guarded by ifdef directives, except for setStyleMask:. NSWindow's setStyleMask: was introduced in 10.6 but NSFullScreenWindowMask didn't appear until 10.7. Adding ifdef guards around it as well should be enough to make it build on earlier OS X releases. I have created a patch but I don't have access to a system running 10.6 so I can't verify that it works.
Just tested Marcus's patch on 10.6; make now fails with gdkwindow-quartz.c:1177: error: previous implicit declaration of 'get_fullscreen_geometry' was here
Looks like the declaration of get_fullscreen_geometry in gdk/quartz/gdkwindow-quartz.c needs to follow the definition of the FullscreenSavedGeometry struct; that plus the patch fixes it for me.
Attachment 289338 [details] pushed as a703437 - quartz: fix build on 10.6 and below