[arch-commits] Commit in conky/trunk (PKGBUILD mouse.patch out_to_x.patch)

Gaëtan Bisson bisson at archlinux.org
Tue Jan 23 19:29:36 UTC 2018


    Date: Tuesday, January 23, 2018 @ 19:29:35
  Author: bisson
Revision: 315321

proper upstream fix rather than revert

Added:
  conky/trunk/out_to_x.patch
Modified:
  conky/trunk/PKGBUILD
Deleted:
  conky/trunk/mouse.patch

----------------+
 PKGBUILD       |    8 ++---
 mouse.patch    |   86 -------------------------------------------------------
 out_to_x.patch |   48 ++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 90 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-23 18:52:12 UTC (rev 315320)
+++ PKGBUILD	2018-01-23 19:29:35 UTC (rev 315321)
@@ -6,7 +6,7 @@
 
 pkgname=conky
 pkgver=1.10.7
-pkgrel=1
+pkgrel=2
 pkgdesc='Lightweight system monitor for X'
 url='https://github.com/brndnmtthws/conky'
 license=('BSD' 'GPL')
@@ -15,10 +15,10 @@
 depends=('glib2' 'lua' 'wireless_tools' 'libxdamage' 'libxinerama' 'libxft'
          'imlib2' 'libxml2' 'libpulse')
 source=("https://github.com/brndnmtthws/conky/archive/v${pkgver}.tar.gz"
-        'mouse.patch'
+        'out_to_x.patch'
         'lua53.patch')
 sha256sums=('23bb9609c522f248cba287146943a872cc045b45cecfa5668bca76e95ecc06ac'
-            '9c323485e130d253b9e68af4880eed6bcc4ce8866b216224aaf550a31f4bb63c'
+            '0bf5851f9b7a4c8c40970a658625a72969f1f0b205c61ce2fc5295ebcc9ca847'
             '16516bdae848f85be949185746418fa5810d426e1f25b6dbbcefdbf4a0b8e6f3')
 
 options=('!strip' 'debug')
@@ -26,7 +26,7 @@
 prepare() {
 	cd "${srcdir}/${pkgname}-${pkgver}"
 	patch -p1 -i ../lua53.patch # lua_gettable returns an int in lua-5.3
-	patch -p1 -i ../mouse.patch --reverse # https://github.com/brndnmtthws/conky/issues/454
+	patch -p1 -i ../out_to_x.patch
 }
 
 build() {

Deleted: mouse.patch
===================================================================
--- mouse.patch	2018-01-23 18:52:12 UTC (rev 315320)
+++ mouse.patch	2018-01-23 19:29:35 UTC (rev 315321)
@@ -1,86 +0,0 @@
-From d97f4dfd8a4f395ef65abfd67d5a758aadb46042 Mon Sep 17 00:00:00 2001
-From: Alexey Korop <akorop at gmail.com>
-Date: Fri, 19 Jan 2018 16:12:08 +0200
-Subject: [PATCH] Make mouse-through workable (#213)
-
----
- src/conky.cc | 18 ++++++++++++++++++
- src/x11.cc   | 22 ----------------------
- 2 files changed, 18 insertions(+), 22 deletions(-)
-
-diff --git a/src/conky.cc b/src/conky.cc
-index b483af33..7163d776 100644
---- a/src/conky.cc
-+++ b/src/conky.cc
-@@ -60,6 +60,9 @@
- #ifdef BUILD_IMLIB2
- #include "imlib2.h"
- #endif /* BUILD_IMLIB2 */
-+#ifdef BUILD_XSHAPE
-+#include <X11/extensions/shape.h>
-+#endif /* BUILD_XSHAPE */
- #endif /* BUILD_X11 */
- #ifdef BUILD_NCURSES
- #include <ncurses.h>
-@@ -2070,6 +2073,21 @@ static void main_loop(void)
- 	sigaddset(&newmask, SIGUSR1);
- #endif
- 
-+#ifdef BUILD_XSHAPE
-+	/* allow only decorated windows to be given mouse input */
-+	int major_version, minor_version;
-+	if (!XShapeQueryVersion(display, &major_version, &minor_version)) {
-+		NORM_ERR("Input shapes are not supported");
-+	} else {
-+		if (own_window.get(*state) &&
-+		    (own_window_type.get(*state) != TYPE_NORMAL ||
-+		     (TEST_HINT(own_window_hints.get(*state), HINT_UNDECORATED)))) {
-+			XShapeCombineRectangles(display, window.window, ShapeInput, 0, 0,
-+			   NULL, 0, ShapeSet, Unsorted);
-+		}
-+	}
-+#endif /* BUILD_XSHAPE */
-+
- 	last_update_time = 0.0;
- 	next_update_time = get_time() - fmod(get_time(), active_update_interval());
- 	info.looped = 0;
-diff --git a/src/x11.cc b/src/x11.cc
-index 216fe22e..c245c25d 100644
---- a/src/x11.cc
-+++ b/src/x11.cc
-@@ -47,10 +47,6 @@
- #ifdef BUILD_XFT
- #include <X11/Xft/Xft.h>
- #endif
--#ifdef BUILD_XSHAPE
--#include <X11/extensions/shape.h>
--#include <X11/extensions/shapeconst.h>
--#endif
- #ifdef BUILD_XINERAMA
- #include <X11/extensions/Xinerama.h>
- #endif
-@@ -771,24 +767,6 @@ static void init_window(lua::state &l __attribute__((unused)), bool own)
- 			/* allow decorated windows to be given input focus by WM */
- 			wmHint.input =
- 				TEST_HINT(hints, HINT_UNDECORATED) ? False : True;
--#ifdef BUILD_XSHAPE
--			if (!wmHint.input) {
--				int event_base, error_base;
--				if (XShapeQueryExtension(display, &event_base, &error_base)) {
--					int major_version = 0, minor_version = 0;
--					XShapeQueryVersion(display, &major_version, &minor_version);
--					if ((major_version > 1) || ((major_version == 1) && (minor_version >=1))) {
--						Region empty_region = XCreateRegion();
--						XShapeCombineRegion(display, window.window, ShapeInput, 0, 0, empty_region, ShapeSet);
--						XDestroyRegion(empty_region);
--					} else {
--						NORM_ERR("Input shapes are not supported");
--					}
--				} else {
--					NORM_ERR("No shape extension found");
--				}
--			}
--#endif
- 			if (own_window_type.get(l) == TYPE_DOCK || own_window_type.get(l) == TYPE_PANEL) {
- 				wmHint.initial_state = WithdrawnState;
- 			} else {

Added: out_to_x.patch
===================================================================
--- out_to_x.patch	                        (rev 0)
+++ out_to_x.patch	2018-01-23 19:29:35 UTC (rev 315321)
@@ -0,0 +1,48 @@
+commit 562c7375883445acb58388ff16d9eb126b7e12a1
+Author: Brenden Matthews <brenden at diddyinc.com>
+Date:   Tue Jan 23 13:52:11 2018 -0500
+
+    Fix segfault when out_to_x = false. (#455)
+    
+    This resolves #454.
+
+diff --git a/src/conky.cc b/src/conky.cc
+index 48256ecc..f10d08fb 100644
+--- a/src/conky.cc
++++ b/src/conky.cc
+@@ -2076,20 +2076,24 @@ static void main_loop(void)
+ 	sigaddset(&newmask, SIGUSR1);
+ #endif
+ 
++#ifdef BUILD_X11
+ #ifdef BUILD_XSHAPE
+-	/* allow only decorated windows to be given mouse input */
+-	int major_version, minor_version;
+-	if (!XShapeQueryVersion(display, &major_version, &minor_version)) {
+-		NORM_ERR("Input shapes are not supported");
+-	} else {
+-		if (own_window.get(*state) &&
+-		    (own_window_type.get(*state) != TYPE_NORMAL ||
+-		     (TEST_HINT(own_window_hints.get(*state), HINT_UNDECORATED)))) {
+-			XShapeCombineRectangles(display, window.window, ShapeInput, 0, 0,
+-			   NULL, 0, ShapeSet, Unsorted);
++	if (out_to_x.get(*state)) {
++		/* allow only decorated windows to be given mouse input */
++		int major_version, minor_version;
++		if (!XShapeQueryVersion(display, &major_version, &minor_version)) {
++			NORM_ERR("Input shapes are not supported");
++		} else {
++			if (own_window.get(*state) &&
++					(own_window_type.get(*state) != TYPE_NORMAL ||
++					 (TEST_HINT(own_window_hints.get(*state), HINT_UNDECORATED)))) {
++				XShapeCombineRectangles(display, window.window, ShapeInput, 0, 0,
++						NULL, 0, ShapeSet, Unsorted);
++			}
+ 		}
+ 	}
+ #endif /* BUILD_XSHAPE */
++#endif /* BUILD_X11 */
+ 
+ 	last_update_time = 0.0;
+ 	next_update_time = get_time() - fmod(get_time(), active_update_interval());
+



More information about the arch-commits mailing list