pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gtk3 gtk3: backport upstream commit to fix crashes...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ce98443d693b
branches:  trunk
changeset: 325518:ce98443d693b
user:      maya <maya%pkgsrc.org@localhost>
date:      Tue Nov 20 08:13:56 2018 +0000

description:
gtk3: backport upstream commit to fix crashes on macOS

>From Jonathan Schleifer in PR pkg/53729

diffstat:

 x11/gtk3/Makefile                                     |   4 +-
 x11/gtk3/distinfo                                     |   5 +-
 x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c |  41 +++++++++++++++++++
 x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h |  24 +++++++++++
 x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c  |  24 +++++++++++
 5 files changed, 95 insertions(+), 3 deletions(-)

diffs (134 lines):

diff -r 3c1be6e835f2 -r ce98443d693b x11/gtk3/Makefile
--- a/x11/gtk3/Makefile Tue Nov 20 08:04:59 2018 +0000
+++ b/x11/gtk3/Makefile Tue Nov 20 08:13:56 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.122 2018/11/14 22:22:42 kleink Exp $
+# $NetBSD: Makefile,v 1.123 2018/11/20 08:13:56 maya Exp $
 
 DISTNAME=      gtk+-3.24.1
 PKGNAME=       ${DISTNAME:S/gtk/gtk3/}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    x11 gnome
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/gtk+/${PKGVERSION_NOREV:R}/}
 EXTRACT_SUFX=  .tar.xz
diff -r 3c1be6e835f2 -r ce98443d693b x11/gtk3/distinfo
--- a/x11/gtk3/distinfo Tue Nov 20 08:04:59 2018 +0000
+++ b/x11/gtk3/distinfo Tue Nov 20 08:13:56 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.59 2018/10/30 17:49:37 leot Exp $
+$NetBSD: distinfo,v 1.60 2018/11/20 08:13:56 maya Exp $
 
 SHA1 (gtk+-3.24.1.tar.xz) = 0a5ce28ba6065a484308093bdb56ff6056b0db3c
 RMD160 (gtk+-3.24.1.tar.xz) = f1e26685ff6a267ad0a81e0f8dd06112b6a5a5b8
@@ -8,6 +8,9 @@
 SHA1 (patch-config.h.in) = dc5f8741eed554f88c0b6834cadad95083e4dc8f
 SHA1 (patch-configure) = d531b33e52facf960058f1223b70db680da35300
 SHA1 (patch-configure.ac) = 68793f40752f25ccaecc958c72c23a504670bea5
+SHA1 (patch-gdk_quartz_gdkmonitor-quartz.c) = a35b7ed5de20ae5d4586c1c09dbc39fe50b8c726
+SHA1 (patch-gdk_quartz_gdkmonitor-quartz.h) = 4b54b2a4a2ff5758520b5e25545b277e3ca4b767
+SHA1 (patch-gdk_quartz_gdkscreen-quartz.c) = 4bcbbc0afc7966b8b6c3110cd2af3ab61685a0a0
 SHA1 (patch-gdk_x11_gdkscreen-x11.h) = 455d6c3de8421984ba3c99baf51cd31982a3df78
 SHA1 (patch-gdk_x11_gdkwindow-x11.h) = c80f7c9d5a570817e54fd74fa903a53400dc6f64
 SHA1 (patch-gtk_a11y_gtkaccessibility.c) = 13232c85bd570f21ea03153dacde4ca98c7c76a8
diff -r 3c1be6e835f2 -r ce98443d693b x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c     Tue Nov 20 08:13:56 2018 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-gdk_quartz_gdkmonitor-quartz.c,v 1.1 2018/11/20 08:13:56 maya Exp $
+From 2a392c220d992ba21b1e250be2497248658cfcdb Mon Sep 17 00:00:00 2001
+From: Ignacio Casal Quinteiro <qignacio%amazon.com@localhost>
+Date: Sun, 7 Oct 2018 21:51:35 +0200
+Subject: [PATCH] quartz: do not cache the screen in the gdkmonitor
+
+Instead we just cache the monitor number and get
+out of it the nsscreen when it is needed. This is
+a requirement since it nsscreen it is not supposed
+to be cached.
+
+Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
+
+--- gdk/quartz/gdkmonitor-quartz.c.orig        2018-11-17 23:32:33.000000000 +0000
++++ gdk/quartz/gdkmonitor-quartz.c
+@@ -35,12 +35,19 @@ gdk_quartz_monitor_get_workarea (GdkMoni
+ 
+   GDK_QUARTZ_ALLOC_POOL;
+ 
+-  NSRect rect = [quartz_monitor->nsscreen visibleFrame];
+-
+-  dest->x = rect.origin.x - quartz_screen->min_x;
+-  dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
+-  dest->width = rect.size.width;
+-  dest->height = rect.size.height;
++  NSArray *array = [NSScreen screens];
++  if (quartz_monitor->monitor_num < [array count])
++    {
++      NSScreen *screen = [array objectAtIndex:quartz_monitor->monitor_num];
++      NSRect rect = [screen visibleFrame];
++
++      dest->x = rect.origin.x - quartz_screen->min_x;
++      dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
++      dest->width = rect.size.width;
++      dest->height = rect.size.height;
++    }
++  else
++    *dest = monitor->geometry;
+ 
+   GDK_QUARTZ_RELEASE_POOL;
+ }
diff -r 3c1be6e835f2 -r ce98443d693b x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h     Tue Nov 20 08:13:56 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-gdk_quartz_gdkmonitor-quartz.h,v 1.1 2018/11/20 08:13:56 maya Exp $
+From 2a392c220d992ba21b1e250be2497248658cfcdb Mon Sep 17 00:00:00 2001
+From: Ignacio Casal Quinteiro <qignacio%amazon.com@localhost>
+Date: Sun, 7 Oct 2018 21:51:35 +0200
+Subject: [PATCH] quartz: do not cache the screen in the gdkmonitor
+
+Instead we just cache the monitor number and get
+out of it the nsscreen when it is needed. This is
+a requirement since it nsscreen it is not supposed
+to be cached.
+
+Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
+
+--- gdk/quartz/gdkmonitor-quartz.h.orig        2018-11-17 23:32:33.000000000 +0000
++++ gdk/quartz/gdkmonitor-quartz.h
+@@ -30,7 +30,7 @@ struct _GdkQuartzMonitor
+ {
+   GdkMonitor parent;
+ 
+-  NSScreen *nsscreen;
++  gint monitor_num;
+ };
+ 
+ struct _GdkQuartzMonitorClass {
diff -r 3c1be6e835f2 -r ce98443d693b x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c      Tue Nov 20 08:13:56 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-gdk_quartz_gdkscreen-quartz.c,v 1.1 2018/11/20 08:13:56 maya Exp $
+From 2a392c220d992ba21b1e250be2497248658cfcdb Mon Sep 17 00:00:00 2001
+From: Ignacio Casal Quinteiro <qignacio%amazon.com@localhost>
+Date: Sun, 7 Oct 2018 21:51:35 +0200
+Subject: [PATCH] quartz: do not cache the screen in the gdkmonitor
+
+Instead we just cache the monitor number and get
+out of it the nsscreen when it is needed. This is
+a requirement since it nsscreen it is not supposed
+to be cached.
+
+Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
+
+--- gdk/quartz/gdkscreen-quartz.c.orig 2018-11-17 23:32:33.000000000 +0000
++++ gdk/quartz/gdkscreen-quartz.c
+@@ -156,7 +156,7 @@ gdk_quartz_screen_calculate_layout (GdkQ
+                                                 "display", display,
+                                                 NULL);
+       g_ptr_array_add (display_quartz->monitors, monitor);
+-      monitor->nsscreen = [array objectAtIndex:i];
++      monitor->monitor_num = i;
+ 
+       NSRect rect = [[array objectAtIndex:i] frame];
+ 



Home | Main Index | Thread Index | Old Index