summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2017-11-06 10:00:57 +0000
committertnn <tnn@pkgsrc.org>2017-11-06 10:00:57 +0000
commitff1707c6a4b4c4ff363e2bcb447ee0e91e190fc9 (patch)
treeba82676611c4870dfd76c92c0a0c79cf1a1d2ecc /x11
parentb9594acaf813648f4a974f5dad213eb2fbb80807 (diff)
downloadpkgsrc-ff1707c6a4b4c4ff363e2bcb447ee0e91e190fc9.tar.gz
gtk3: apply upstream fix for remote X11 rendering issue
This fixes context menus not appearing correctly in packages such as emacs and firefox when using Xnest, Xephyr or tunneled X11. while here, regen patch-gtk_fallback-c89.c with more diff context.
Diffstat (limited to 'x11')
-rw-r--r--x11/gtk3/Makefile3
-rw-r--r--x11/gtk3/distinfo5
-rw-r--r--x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c89
-rw-r--r--x11/gtk3/patches/patch-gtk_fallback-c89.c12
4 files changed, 101 insertions, 8 deletions
diff --git a/x11/gtk3/Makefile b/x11/gtk3/Makefile
index 295066c7c56..87b31b46f8f 100644
--- a/x11/gtk3/Makefile
+++ b/x11/gtk3/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.103 2017/10/16 09:50:58 adam Exp $
+# $NetBSD: Makefile,v 1.104 2017/11/06 10:00:57 tnn Exp $
DISTNAME= gtk+-3.22.24
+PKGREVISION= 1
PKGNAME= ${DISTNAME:S/gtk/gtk3/}
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gtk+/${PKGVERSION_NOREV:R}/}
diff --git a/x11/gtk3/distinfo b/x11/gtk3/distinfo
index a0e6adf07cd..10ca6bff4a0 100644
--- a/x11/gtk3/distinfo
+++ b/x11/gtk3/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.50 2017/10/16 09:50:58 adam Exp $
+$NetBSD: distinfo,v 1.51 2017/11/06 10:00:57 tnn Exp $
SHA1 (gtk+-3.22.24.tar.xz) = 13f09656af70ab1106fd68309ff84782a5cc74d4
RMD160 (gtk+-3.22.24.tar.xz) = 028c5d7dc86bdd9be9bc9c1e4cf478f5d39195c6
@@ -8,7 +8,8 @@ SHA1 (patch-aj) = cbfab43f27352f7c6bc57a7c562c2d84c69da07a
SHA1 (patch-config.h.in) = dc5f8741eed554f88c0b6834cadad95083e4dc8f
SHA1 (patch-configure) = 1dca87c6a85ee927b85d4edc14b0985c5130c0d9
SHA1 (patch-configure.ac) = 68793f40752f25ccaecc958c72c23a504670bea5
+SHA1 (patch-gdk_x11_gdkscreen-x11.c) = 2a656cf89ab3cdeac30852c35385a9c97154c1e6
SHA1 (patch-gdk_x11_gdkscreen-x11.h) = 455d6c3de8421984ba3c99baf51cd31982a3df78
SHA1 (patch-gdk_x11_gdkwindow-x11.h) = c80f7c9d5a570817e54fd74fa903a53400dc6f64
SHA1 (patch-gtk_a11y_gtkaccessibility.c) = 13232c85bd570f21ea03153dacde4ca98c7c76a8
-SHA1 (patch-gtk_fallback-c89.c) = 18b752f47e88ef2c052c48ddaeed51f130bce85b
+SHA1 (patch-gtk_fallback-c89.c) = eaf5ac8aace9eab673eed0e265d4cb2617bf1fcd
diff --git a/x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c b/x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c
new file mode 100644
index 00000000000..9e41af681cb
--- /dev/null
+++ b/x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c
@@ -0,0 +1,89 @@
+$NetBSD: patch-gdk_x11_gdkscreen-x11.c,v 1.1 2017/11/06 10:00:57 tnn Exp $
+
+From 74720117c9f12b01099ab55043d80c9fa21f44a5 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Sat, 28 Oct 2017 10:22:30 -0400
+Subject: Revert "gdkscreen-x11: Enable RandR on VirtualBox"
+
+This reverts commit f2ba6ca47322a17b37fb92662fc9552b4f106f10.
+
+This change was causing problems with several X servers,
+see https://bugzilla.gnome.org/show_bug.cgi?id=780101
+
+--- gdk/x11/gdkscreen-x11.c.orig 2017-10-02 16:00:49.000000000 +0000
++++ gdk/x11/gdkscreen-x11.c
+@@ -408,6 +408,7 @@ init_randr15 (GdkScreen *screen, gboolea
+ RROutput primary_output = None;
+ RROutput first_output = None;
+ int i;
++ gboolean randr12_compat = FALSE;
+ XRRMonitorInfo *rr_monitors;
+ int num_rr_monitors;
+ int old_primary;
+@@ -452,6 +453,9 @@ init_randr15 (GdkScreen *screen, gboolea
+ if (output_info == NULL)
+ continue;
+
++ /* Non RandR1.2+ X driver have output name "default" */
++ randr12_compat |= !g_strcmp0 (output_info->name, "default");
++
+ if (output_info->connection == RR_Disconnected)
+ {
+ XRRFreeOutputInfo (output_info);
+@@ -531,6 +535,19 @@ init_randr15 (GdkScreen *screen, gboolea
+ XRRFreeMonitors (rr_monitors);
+ XRRFreeScreenResources (resources);
+
++ /* non RandR 1.2+ X driver doesn't return any usable multihead data */
++ if (randr12_compat)
++ {
++ for (i = 0; i < x11_display->monitors->len; i++)
++ {
++ GdkX11Monitor *monitor = x11_display->monitors->pdata[i];
++ if (monitor->remove)
++ gdk_display_monitor_removed (display, GDK_MONITOR (monitor));
++ }
++ g_ptr_array_remove_range (x11_display->monitors, 0, x11_display->monitors->len);
++ return FALSE;
++ }
++
+ for (i = x11_display->monitors->len - 1; i >= 0; i--)
+ {
+ GdkX11Monitor *monitor = x11_display->monitors->pdata[i];
+@@ -593,6 +610,7 @@ init_randr13 (GdkScreen *screen, gboolea
+ RROutput primary_output = None;
+ RROutput first_output = None;
+ int i;
++ gboolean randr12_compat = FALSE;
+ int old_primary;
+
+ if (!x11_display->have_randr13)
+@@ -616,6 +634,9 @@ init_randr13 (GdkScreen *screen, gboolea
+ XRROutputInfo *output_info =
+ XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
+
++ /* Non RandR1.2+ X driver have output name "default" */
++ randr12_compat |= !g_strcmp0 (output_info->name, "default");
++
+ if (output_info->connection == RR_Disconnected)
+ {
+ XRRFreeOutputInfo (output_info);
+@@ -696,7 +717,17 @@ init_randr13 (GdkScreen *screen, gboolea
+
+ XRRFreeScreenResources (resources);
+
+- /* Which usable multihead data is not returned in non RandR 1.2+ X driver? */
++ if (randr12_compat)
++ {
++ for (i = 0; i < x11_display->monitors->len; i++)
++ {
++ GdkX11Monitor *monitor = x11_display->monitors->pdata[i];
++ if (monitor->remove)
++ gdk_display_monitor_removed (display, GDK_MONITOR (monitor));
++ }
++ g_ptr_array_remove_range (x11_display->monitors, 0, x11_display->monitors->len);
++ return FALSE;
++ }
+
+ for (i = x11_display->monitors->len - 1; i >= 0; i--)
+ {
diff --git a/x11/gtk3/patches/patch-gtk_fallback-c89.c b/x11/gtk3/patches/patch-gtk_fallback-c89.c
index 325dcb118d3..cc4c35db257 100644
--- a/x11/gtk3/patches/patch-gtk_fallback-c89.c
+++ b/x11/gtk3/patches/patch-gtk_fallback-c89.c
@@ -1,12 +1,12 @@
-$NetBSD: patch-gtk_fallback-c89.c,v 1.2 2015/11/07 20:20:01 wiz Exp $
+$NetBSD: patch-gtk_fallback-c89.c,v 1.3 2017/11/06 10:00:57 tnn Exp $
Work around the fact that math.h may declare these functions
non-static.
https://bugzilla.gnome.org/show_bug.cgi?id=757748
---- gtk/fallback-c89.c.orig 2014-03-06 04:42:58.000000000 +0000
+--- gtk/fallback-c89.c.orig 2017-05-25 10:47:34.000000000 +0000
+++ gtk/fallback-c89.c
-@@ -22,19 +22,20 @@
+@@ -24,19 +24,20 @@
/* Workaround for round() for non-GCC/non-C99 compilers */
#ifndef HAVE_ROUND
static inline double
@@ -29,7 +29,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=757748
{
if (ceil (x + 0.5) == floor (x + 0.5))
{
-@@ -53,6 +54,7 @@ rint (double x)
+@@ -55,6 +56,7 @@ rint (double x)
return ceil (x - 0.5);
}
}
@@ -37,7 +37,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=757748
#endif
#ifndef HAVE_NEARBYINT
-@@ -60,8 +62,9 @@ rint (double x)
+@@ -62,10 +64,11 @@ rint (double x)
/* This is quite similar to rint() in most respects */
static inline double
@@ -48,3 +48,5 @@ https://bugzilla.gnome.org/show_bug.cgi?id=757748
}
+#define nearbyint(x) my_nearbyint(x)
#endif
+
+ #ifndef HAVE_DECL_ISINF