Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2018 12:46:44 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460469 - in head/sysutils/conky: . files
Message-ID:  <201801311246.w0VCkitZ076388@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Wed Jan 31 12:46:44 2018
New Revision: 460469
URL: https://svnweb.freebsd.org/changeset/ports/460469

Log:
  Import upstream patch to fix runtime crash.
  
  PR:		225523
  Submitted by:	Hatronmorus <ebirth@b0ss.net>
  Obtained from:	https://github.com/brndnmtthws/conky/commit/562c7375883445acb58388ff16d9eb126b7e12a1

Modified:
  head/sysutils/conky/Makefile
  head/sysutils/conky/files/patch-src_conky.cc

Modified: head/sysutils/conky/Makefile
==============================================================================
--- head/sysutils/conky/Makefile	Wed Jan 31 12:23:11 2018	(r460468)
+++ head/sysutils/conky/Makefile	Wed Jan 31 12:46:44 2018	(r460469)
@@ -3,6 +3,7 @@
 
 PORTNAME=	conky
 PORTVERSION=	1.10.7
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	sysutils
 

Modified: head/sysutils/conky/files/patch-src_conky.cc
==============================================================================
--- head/sysutils/conky/files/patch-src_conky.cc	Wed Jan 31 12:23:11 2018	(r460468)
+++ head/sysutils/conky/files/patch-src_conky.cc	Wed Jan 31 12:46:44 2018	(r460469)
@@ -1,6 +1,6 @@
---- src/conky.cc.orig	2016-10-04 07:49:19 UTC
+--- src/conky.cc.orig	2018-01-19 14:12:08 UTC
 +++ src/conky.cc
-@@ -129,7 +129,7 @@
+@@ -132,7 +132,7 @@
  #include <microhttpd.h>
  #endif
  
@@ -9,3 +9,38 @@
  #include <bsd/bsd.h>
  #endif
  
+@@ -2073,20 +2073,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());



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801311246.w0VCkitZ076388>