[arch-commits] Commit in lib32-gtk3/trunk (3 files)

Maxime Gauduin alucryd at archlinux.org
Sun Jan 24 12:08:35 UTC 2016


    Date: Sunday, January 24, 2016 @ 13:08:35
  Author: alucryd
Revision: 158729

upgpkg: lib32-gtk3 3.18.6-1

Added:
  lib32-gtk3/trunk/0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch
  lib32-gtk3/trunk/0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch
Modified:
  lib32-gtk3/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch  |   85 +++++++++
 0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch |   94 ++++++++++
 PKGBUILD                                                        |   17 +
 3 files changed, 193 insertions(+), 3 deletions(-)

Added: 0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch
===================================================================
--- 0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch	                        (rev 0)
+++ 0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch	2016-01-24 12:08:35 UTC (rev 158729)
@@ -0,0 +1,85 @@
+From affd6e70734d7897324409d6fc0beb7b4eb7235a Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Wed, 6 Jan 2016 14:54:33 -0500
+Subject: [PATCH 1/2] x11: Only do cursor name fallback for standard names
+
+Always returning a left_ptr if we can't find anything better
+broke firefox application-specific fallback for missing cursors.
+Keep that working by only doing the fallback for the CSS cursor
+names, not for things like hashes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=760141
+---
+ gdk/x11/gdkcursor-x11.c | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
+index 540f48e..d619f58 100644
+--- a/gdk/x11/gdkcursor-x11.c
++++ b/gdk/x11/gdkcursor-x11.c
+@@ -611,17 +611,23 @@ static const struct {
+   const gchar *css_name, *traditional_name;
+ } name_map[] = {
+   { "default",      "left_ptr" },
++  { "help",         "left_ptr" },
++  { "context-menu", "left_ptr" },
+   { "pointer",      "hand" },
+   { "progress",     "left_ptr_watch" },
+   { "wait",         "watch" },
+   { "cell",         "crosshair" },
+   { "crosshair",    "cross" },
+   { "text",         "xterm" },
++  { "vertical-text","xterm" },
+   { "alias",        "dnd-link" },
+   { "copy",         "dnd-copy" },
++  { "move",         "dnd-move" },
+   { "no-drop",      "dnd-none" },
+   { "not-allowed",  "crossed_circle" },
+   { "grab",         "hand2" },
++  { "grabbing",     "hand2" },
++  { "all-scroll",   "left_ptr" },
+   { "col-resize",   "h_double_arrow" },
+   { "row-resize",   "v_double_arrow" },
+   { "n-resize",     "top_side" },
+@@ -636,6 +642,8 @@ static const struct {
+   { "ns-resize",    "v_double_arrow" },
+   { "nesw-resize",  "fd_double_arrow" },
+   { "nwse-resize",  "bd_double_arrow" },
++  { "zoom-in",      "left_ptr" },
++  { "zoom-out",     "left_ptr" },
+   { NULL, NULL }
+ };
+ 
+@@ -650,7 +658,7 @@ name_fallback (const gchar *name)
+         return name_map[i].traditional_name;
+     }
+ 
+-  return "left_ptr";
++  return NULL;
+ }
+ 
+ GdkCursor*
+@@ -683,9 +691,17 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay  *display,
+       xdisplay = GDK_DISPLAY_XDISPLAY (display);
+       xcursor = XcursorLibraryLoadCursor (xdisplay, name);
+       if (xcursor == None)
+-        xcursor = XcursorLibraryLoadCursor (xdisplay, name_fallback (name));
+-      if (xcursor == None)
+-        xcursor = XcursorLibraryLoadCursor (xdisplay, "left_ptr");
++        {
++          const char *fallback;
++
++          fallback = name_fallback (name);
++          if (fallback)
++            {
++              xcursor = XcursorLibraryLoadCursor (xdisplay, fallback);
++              if (xcursor == None)
++                xcursor = XcursorLibraryLoadCursor (xdisplay, "left_ptr");
++            }
++        }
+       if (xcursor == None)
+         return NULL;
+     }
+-- 
+2.7.0
+


Property changes on: lib32-gtk3/trunk/0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: 0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch
===================================================================
--- 0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch	                        (rev 0)
+++ 0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch	2016-01-24 12:08:35 UTC (rev 158729)
@@ -0,0 +1,94 @@
+From 81a287478a4db9ce650cc764474b9c173b137dee Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Wed, 6 Jan 2016 14:56:06 -0500
+Subject: [PATCH 2/2] wayland: Only do cursor name fallback for standard names
+
+Always returning a left_ptr if we can't find anything better
+broke firefox application-specific fallback for missing cursors.
+Keep that working by only doing the fallback for the CSS cursor
+names, not for things like hashes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=760141
+---
+ gdk/wayland/gdkcursor-wayland.c | 29 +++++++++++++++++++++--------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
+
+diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c
+index 8aee5ae..bdfa316 100644
+--- a/gdk/wayland/gdkcursor-wayland.c
++++ b/gdk/wayland/gdkcursor-wayland.c
+@@ -87,17 +87,23 @@ static const struct {
+   const gchar *css_name, *traditional_name;
+ } name_map[] = {
+   { "default",      "left_ptr" },
++  { "help",         "left_ptr" },
++  { "context-menu", "left_ptr" },
+   { "pointer",      "hand" },
+   { "progress",     "left_ptr_watch" },
+   { "wait",         "watch" },
+   { "cell",         "crosshair" },
+   { "crosshair",    "cross" },
+   { "text",         "xterm" },
++  { "vertical-text","xterm" },
+   { "alias",        "dnd-link" },
+   { "copy",         "dnd-copy" },
++  { "move",         "dnd-move" },
+   { "no-drop",      "dnd-none" },
+   { "not-allowed",  "crossed_circle" },
+   { "grab",         "hand2" },
++  { "grabbing",     "hand2" },
++  { "all-scroll",   "left_ptr" },
+   { "col-resize",   "h_double_arrow" },
+   { "row-resize",   "v_double_arrow" },
+   { "n-resize",     "top_side" },
+@@ -112,6 +118,8 @@ static const struct {
+   { "ns-resize",    "v_double_arrow" },
+   { "nesw-resize",  "fd_double_arrow" },
+   { "nwse-resize",  "bd_double_arrow" },
++  { "zoom-in",      "left_ptr" },
++  { "zoom-out",     "left_ptr" },
+   { NULL, NULL }
+ };
+ 
+@@ -126,7 +134,7 @@ name_fallback (const gchar *name)
+         return name_map[i].traditional_name;
+     }
+ 
+-  return "left_ptr";
++  return NULL;
+ }
+ 
+ static gboolean
+@@ -144,17 +152,22 @@ _gdk_wayland_cursor_update (GdkWaylandDisplay *wayland_display,
+                                                         cursor->scale);
+   c = wl_cursor_theme_get_cursor (theme, cursor->name);
+   if (!c)
+-    c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
++    {
++      const char *fallback;
++
++      fallback = name_fallback (cursor->name);
++      if (fallback)
++        {
++          c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
++          if (!c)
++            c = wl_cursor_theme_get_cursor (theme, "left_ptr");
++        }
++    }
+ 
+   if (!c)
+     {
+       g_warning (G_STRLOC ": Unable to load %s from the cursor theme", cursor->name);
+-
+-      /* return the left_ptr cursor as a fallback */
+-      c = wl_cursor_theme_get_cursor (theme, "left_ptr");
+-
+-      if (!c)
+-        return FALSE;
++      return FALSE;
+     }
+ 
+   cursor->wl_cursor = c;
+-- 
+2.7.0
+


Property changes on: lib32-gtk3/trunk/0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-01-24 11:43:59 UTC (rev 158728)
+++ PKGBUILD	2016-01-24 12:08:35 UTC (rev 158729)
@@ -4,7 +4,7 @@
 # Contributor: GordonGR <ntheo1979 at gmail.com>
 
 pkgname=lib32-gtk3
-pkgver=3.18.5
+pkgver=3.18.6
 pkgrel=1
 pkgdesc='GObject-based multi-platform GUI toolkit (v3)'
 arch=('x86_64')
@@ -16,9 +16,20 @@
          'lib32-libxkbcommon' 'lib32-libxrandr' 'lib32-pango' 'lib32-rest')
 makedepends=('gcc-multilib' 'gobject-introspection')
 install='gtk3.install'
-source=("https://download.gnome.org/sources/gtk+/${pkgver:0:4}/gtk+-$pkgver.tar.xz")
-sha256sums=('107aeb9a4244ce3c044becdd6dffc32d83202595181597180d4c736302a71852')
+source=("https://download.gnome.org/sources/gtk+/${pkgver:0:4}/gtk+-$pkgver.tar.xz"
+        '0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch'
+        '0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch')
+sha256sums=('78cabf0fd5a662f8723f62d5ac633072c76c557c1d700454c9c3deaa37e441ef'
+            '0402c3b7801810beb0f24ad20e4fb2eb7519cf3984f39e093a6e2752a0f7d9de'
+            '94722b06284e76f628fc8933617ac19c14f6775a5250fe3c382defab63d7b10e')
 
+prepare() {
+  cd gtk+-${pkgver}
+
+  patch -Np1 -i ../0001-x11-Only-do-cursor-name-fallback-for-standard-names.patch
+  patch -Np1 -i ../0002-wayland-Only-do-cursor-name-fallback-for-standard-na.patch
+}
+
 build() {
   cd gtk+-${pkgver}
 



More information about the arch-commits mailing list