pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/gtk3 gtk3: apply upstream fix for remote X11 rende...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cdee7b651378
branches:  trunk
changeset: 371141:cdee7b651378
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Mon Nov 06 10:00:57 2017 +0000

description:
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:

 x11/gtk3/Makefile                              |   3 +-
 x11/gtk3/distinfo                              |   5 +-
 x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c |  89 ++++++++++++++++++++++++++
 x11/gtk3/patches/patch-gtk_fallback-c89.c      |  12 ++-
 4 files changed, 101 insertions(+), 8 deletions(-)

diffs (167 lines):

diff -r d3b504f3a61d -r cdee7b651378 x11/gtk3/Makefile
--- a/x11/gtk3/Makefile Sun Nov 05 23:01:14 2017 +0000
+++ b/x11/gtk3/Makefile Mon Nov 06 10:00:57 2017 +0000
@@ -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 -r d3b504f3a61d -r cdee7b651378 x11/gtk3/distinfo
--- a/x11/gtk3/distinfo Sun Nov 05 23:01:14 2017 +0000
+++ b/x11/gtk3/distinfo Mon Nov 06 10:00:57 2017 +0000
@@ -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-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 -r d3b504f3a61d -r cdee7b651378 x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk3/patches/patch-gdk_x11_gdkscreen-x11.c    Mon Nov 06 10:00:57 2017 +0000
@@ -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@localhost>
+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 -r d3b504f3a61d -r cdee7b651378 x11/gtk3/patches/patch-gtk_fallback-c89.c
--- a/x11/gtk3/patches/patch-gtk_fallback-c89.c Sun Nov 05 23:01:14 2017 +0000
+++ b/x11/gtk3/patches/patch-gtk_fallback-c89.c Mon Nov 06 10:00:57 2017 +0000
@@ -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 @@
  {
    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 @@
  #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 @@
  }
 +#define nearbyint(x)  my_nearbyint(x)
  #endif
+ 
+ #ifndef HAVE_DECL_ISINF



Home | Main Index | Thread Index | Old Index