pkgsrc-Changes archive

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

CVS commit: pkgsrc/x11/gtk3



Module Name:    pkgsrc
Committed By:   maya
Date:           Tue Nov 20 08:13:56 UTC 2018

Modified Files:
        pkgsrc/x11/gtk3: Makefile distinfo
Added Files:
        pkgsrc/x11/gtk3/patches: patch-gdk_quartz_gdkmonitor-quartz.c
            patch-gdk_quartz_gdkmonitor-quartz.h
            patch-gdk_quartz_gdkscreen-quartz.c

Log Message:
gtk3: backport upstream commit to fix crashes on macOS

>From Jonathan Schleifer in PR pkg/53729


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 pkgsrc/x11/gtk3/Makefile
cvs rdiff -u -r1.59 -r1.60 pkgsrc/x11/gtk3/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c \
    pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h \
    pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/gtk3/Makefile
diff -u pkgsrc/x11/gtk3/Makefile:1.122 pkgsrc/x11/gtk3/Makefile:1.123
--- pkgsrc/x11/gtk3/Makefile:1.122      Wed Nov 14 22:22:42 2018
+++ pkgsrc/x11/gtk3/Makefile    Tue Nov 20 08:13:56 2018
@@ -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

Index: pkgsrc/x11/gtk3/distinfo
diff -u pkgsrc/x11/gtk3/distinfo:1.59 pkgsrc/x11/gtk3/distinfo:1.60
--- pkgsrc/x11/gtk3/distinfo:1.59       Tue Oct 30 17:49:37 2018
+++ pkgsrc/x11/gtk3/distinfo    Tue Nov 20 08:13:56 2018
@@ -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-aj) = cbfab43f27352f7c6bc57a
 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

Added files:

Index: pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c
diff -u /dev/null pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c:1.1
--- /dev/null   Tue Nov 20 08:13:56 2018
+++ pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.c        Tue Nov 20 08:13:56 2018
@@ -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;
+ }
Index: pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h
diff -u /dev/null pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h:1.1
--- /dev/null   Tue Nov 20 08:13:56 2018
+++ pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkmonitor-quartz.h        Tue Nov 20 08:13:56 2018
@@ -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 {
Index: pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c
diff -u /dev/null pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c:1.1
--- /dev/null   Tue Nov 20 08:13:56 2018
+++ pkgsrc/x11/gtk3/patches/patch-gdk_quartz_gdkscreen-quartz.c Tue Nov 20 08:13:56 2018
@@ -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