[gimp/gimp-2-8] build/osx: add GTK+ patch that was committed after 2.24.30 release



commit b89fbdaa7f4e1f7cbaad27da2ce5e0268f840b90
Author: Kristian Rietveld <kris loopnest org>
Date:   Sat Jul 16 21:30:31 2016 +0200

    build/osx: add GTK+ patch that was committed after 2.24.30 release
    
    In the near future, we should probably ship the top of tree of the
    gtk-2-24 branch in the DMG instead of the latest tarball release.

 build/osx/gimp.modules                             |    1 +
 ...dle-didMove-and-didResize-in-the-same-way.patch |   82 ++++++++++++++++++++
 2 files changed, 83 insertions(+), 0 deletions(-)
---
diff --git a/build/osx/gimp.modules b/build/osx/gimp.modules
index 09a1bdc..b8083fd 100644
--- a/build/osx/gimp.modules
+++ b/build/osx/gimp.modules
@@ -260,6 +260,7 @@
        <autotools id="gtk+-2.24" autogen-sh="configure"
                autogenargs="--with-gdktarget=quartz --enable-debug=yes --disable-gtk-doc 
--enable-quartz-relocation --without-x --with-xinput --enable-xinerama">
                <branch module="gtk+/2.24/gtk+-2.24.30.tar.xz" version="2.24.30">
+                       <patch file="gtk2-quartz-handle-didMove-and-didResize-in-the-same-way.patch" 
strip="1" />
                </branch>
                <dependencies>
                        <dep package="glib" />
diff --git a/build/osx/patches/gtk2-quartz-handle-didMove-and-didResize-in-the-same-way.patch 
b/build/osx/patches/gtk2-quartz-handle-didMove-and-didResize-in-the-same-way.patch
new file mode 100644
index 0000000..7d15223
--- /dev/null
+++ b/build/osx/patches/gtk2-quartz-handle-didMove-and-didResize-in-the-same-way.patch
@@ -0,0 +1,82 @@
+From 70124c7e46b2d55f6284bf7c4a75532aec137baf Mon Sep 17 00:00:00 2001
+From: Kristian Rietveld <kris loopnest org>
+Date: Sat, 16 Apr 2016 18:44:13 +0100
+Subject: [PATCH] quartz: handle didMove and didResize in the same way
+
+This fixes bugs with applications that try to allocate large windows,
+but are not allocated the full requested size. See for example
+GNOME Bugzilla #765120.
+---
+ gdk/quartz/GdkQuartzWindow.c | 42 +++++++++++++++++-------------------------
+ 1 file changed, 17 insertions(+), 25 deletions(-)
+
+diff --git a/gdk/quartz/GdkQuartzWindow.c b/gdk/quartz/GdkQuartzWindow.c
+index 7aab759..dabf051 100644
+--- a/gdk/quartz/GdkQuartzWindow.c
++++ b/gdk/quartz/GdkQuartzWindow.c
+@@ -183,28 +183,13 @@
+     }
+ }
+ 
+--(void)windowDidMove:(NSNotification *)aNotification
+-{
+-  GdkWindow *window = [[self contentView] gdkWindow];
+-  GdkWindowObject *private = (GdkWindowObject *)window;
+-  GdkEvent *event;
+-
+-  _gdk_quartz_window_update_position (window);
+-
+-  /* Synthesize a configure event */
+-  event = gdk_event_new (GDK_CONFIGURE);
+-  event->configure.window = g_object_ref (window);
+-  event->configure.x = private->x;
+-  event->configure.y = private->y;
+-  event->configure.width = private->width;
+-  event->configure.height = private->height;
+-
+-  _gdk_event_queue_append (gdk_display_get_default (), event);
+-
+-  [self checkSendEnterNotify];
+-}
+-
+--(void)windowDidResize:(NSNotification *)aNotification
++/* Always update both the position and size. Certain resize operations
++ * (e.g. going fullscreen) also move the origin of the window. Move
++ * notifications sometimes also indicate a different window size (for
++ * example if the window size requested in the configure request was not
++ * fully granted).
++ */
++-(void)handleDidMoveResize
+ {
+   NSRect content_rect = [self contentRectForFrameRect:[self frame]];
+   GdkWindow *window = [[self contentView] gdkWindow];
+@@ -214,9 +199,6 @@
+   private->width = content_rect.size.width;
+   private->height = content_rect.size.height;
+ 
+-  /* Certain resize operations (e.g. going fullscreen), also move the
+-   * origin of the window.
+-   */
+   _gdk_quartz_window_update_position (window);
+ 
+   [[self contentView] setFrame:NSMakeRect (0, 0, private->width, private->height)];
+@@ -236,6 +218,16 @@
+   [self checkSendEnterNotify];
+ }
+ 
++-(void)windowDidMove:(NSNotification *)aNotification
++{
++  [self handleDidMoveResize];
++}
++
++-(void)windowDidResize:(NSNotification *)aNotification
++{
++  [self handleDidMoveResize];
++}
++
+ -(id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask 
backing:(NSBackingStoreType)backingType defer:(BOOL)flag screen:(NSScreen *)screen
+ {
+   self = [super initWithContentRect:contentRect
+-- 
+1.9.5 (Apple Git-50.3)
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]