mirror of https://github.com/GNOME/gimp.git
app: allow compiling on Mac OS where gimpimagewindow.c needs…
… an API that went private in GTK 3. Note from reviewer (Jehan): this API became public again in commit gtk@242b76a7, available since GTK 3.24.29. Before this, the function (gdk_quartz_window_get_nswindow()) was actually still in the ABI, so we could declare the function locally before using it. This is an ugly workaround, but it works. What we do is providing both solutions depending on GTK version, leaving build warnings as constant reminders so that we remember to get rid of the workaround when we bump minimum GTK requirement. Cf. discussions in gtk#2452 and gimp!483.
This commit is contained in:
parent
f87ec4bcfe
commit
e14f9fc500
|
@ -31,7 +31,16 @@
|
|||
#ifdef GDK_WINDOWING_QUARTZ
|
||||
#import <AppKit/AppKit.h>
|
||||
#include <gdk/gdkquartz.h>
|
||||
#endif /* !GDK_WINDOWING_QUARTZ */
|
||||
|
||||
#if GTK_CHECK_VERSION(3, 24, 29)
|
||||
#warning Using a workaround for older GTK versions.
|
||||
#warning If minimum requirement was bumped to 3.24.29 or over, remove it.
|
||||
#warning See MR !483
|
||||
#include "gdk/quartz/gdkquartz-cocoa-access.h"
|
||||
#else
|
||||
NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
|
||||
#endif /* GTK_CHECK_VERSION(3, 24, 29) */
|
||||
#endif /* GDK_WINDOWING_QUARTZ */
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
|
Loading…
Reference in New Issue