summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Korop2017-02-19 22:30:03 +0200
committerAlexey Korop2017-02-19 22:30:03 +0200
commita1361b58f491c295e0ce164997952517146c0f66 (patch)
treecac1e92baddf133437c538f92770663a0549801b
parent0653a3ddecd2143758fb48883dc08e74c720fa6a (diff)
downloadaur-a1361b58f491c295e0ce164997952517146c0f66.tar.gz
mouse-through has become more reliable;
compliance with the new mainstream sources
-rw-r--r--PKGBUILD28
-rw-r--r--button_mask.patch12
-rw-r--r--xshape.patch104
3 files changed, 75 insertions, 69 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 258450111133..1954c652be2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,29 @@
-# Patches 'execgraph.patch' and 'xshape.patch' by Alexey Korop added.
+# Patches 'xshape.patch' and 'button_mask.patch' by Alexey Korop added.
# Original package info:
-# $Id: PKGBUILD 251435 2015-11-19 21:45:56Z bisson $
+# $Id: PKGBUILD 284823 2016-12-26 19:43:10Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: James Rayner <james@archlinux.org>
# Contributor: Partha Chowdhury <kira.laucas@gmail.com>
pkgname=conky-mt
-pkgver=1.10.4
+pkgver=1.10.6
pkgrel=1
pkgdesc='Lightweight system monitor for X'
url='https://github.com/brndnmtthws/conky'
license=('BSD' 'GPL')
arch=('i686' 'x86_64')
makedepends=('cmake' 'docbook2x' 'docbook-xml' 'man-db' 'git')
-depends=('glib2' 'curl' 'lua' 'wireless_tools' 'libxml2' 'libxft' 'libxdamage' 'imlib2')
-conflicts=('conky')
-provides=('conky')
+depends=('glib2' 'lua' 'wireless_tools' 'libxdamage' 'libxinerama' 'libxft'
+ 'imlib2' 'libxml2' 'libpulse')
source=("https://github.com/brndnmtthws/conky/archive/v${pkgver}.tar.gz"
- 'lua53.patch'
'xshape.patch'
- )
-sha1sums=('f2da0e3b8e6ff8ebc42b35f710f822e228616993'
- 'a3a74542b6524e5663ad37aaba292b48e8bea3b1'
- '4bb3ac31b61f46e57abb451df549186f455f8f8b'
- )
+ 'button_mask.patch'
+ 'lua53.patch')
+sha1sums=('54cb3322dc3a969f1fda03383012c61d57261345'
+ 'ba05be063488020bfbf0a594574ac58ed5a1eaec'
+ 'b5e774b6144164091852bab0996f79853664fb6f'
+ 'a3a74542b6524e5663ad37aaba292b48e8bea3b1')
options=('!strip' 'debug')
@@ -32,6 +31,7 @@ prepare() {
mv "${srcdir}/conky-${pkgver}" "${srcdir}/${pkgname}-${pkgver}"
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 -i ../lua53.patch # lua_gettable returns an int in lua-5.3
+ patch -p1 -i ../button_mask.patch
patch -p1 -i ../xshape.patch # https://github.com/brndnmtthws/conky/issues/158
}
@@ -41,14 +41,14 @@ build() {
cmake \
-D CMAKE_BUILD_TYPE=Release \
-D MAINTAINER_MODE=ON \
- -D BUILD_CURL=ON \
+ -D BUILD_WLAN=ON \
-D BUILD_XDBE=ON \
-D BUILD_IMLIB2=ON \
-D BUILD_XSHAPE=ON \
-D BUILD_RSS=ON \
-D BUILD_WEATHER_METAR=ON \
-D BUILD_WEATHER_XOAP=ON \
- -D BUILD_WLAN=ON \
+ -D BUILD_PULSEAUDIO=ON \
-D CMAKE_INSTALL_PREFIX=/usr \
.
diff --git a/button_mask.patch b/button_mask.patch
new file mode 100644
index 000000000000..f5e9d020cf00
--- /dev/null
+++ b/button_mask.patch
@@ -0,0 +1,12 @@
+--- a/src/x11.cc
++++ b/src/x11.cc
+@@ -974,7 +974,7 @@
+
+ XSelectInput(display, window.window, ExposureMask | PropertyChangeMask
+ #ifdef OWN_WINDOW
+- | (own_window.get(l) ? (StructureNotifyMask |
++ | (own ? (StructureNotifyMask |
+ ButtonPressMask | ButtonReleaseMask) : 0)
+ #endif
+ );
+
diff --git a/xshape.patch b/xshape.patch
index f84b5247d885..48a3f54806e5 100644
--- a/xshape.patch
+++ b/xshape.patch
@@ -1,11 +1,3 @@
-From d8d034f24154d08dfe558feccddfbed312d727d4 Mon Sep 17 00:00:00 2001
-From: Alexey Korop <avkorop@i.ua>
-Date: Sat, 24 Oct 2015 11:55:30 +0300
-Subject: Mouse transparency fix
-
-
-diff --git a/src/conky.cc b/src/conky.cc
-index b48fd7c..025ed20 100644
--- a/src/conky.cc
+++ b/src/conky.cc
@@ -60,6 +60,9 @@
@@ -16,14 +8,16 @@ index b48fd7c..025ed20 100644
+#include <X11/extensions/shape.h>
+#endif /* BUILD_XSHAPE */
#endif /* BUILD_X11 */
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -2042,6 +2045,21 @@ static void main_loop(void)
- sigaddset(&newmask, SIGUSR1);
+ #ifdef BUILD_NCURSES
+ #include <ncurses.h>
+@@ -2046,6 +2049,25 @@
+ int inotify_fd = -1;
#endif
+#ifdef BUILD_XSHAPE
++static bool need_null_shape = true;
+ /* allow only decorated windows to be given mouse input */
++void set_null_shape(void){
+ int major_version, minor_version;
+ if (!XShapeQueryVersion(display, &major_version, &minor_version)) {
+ NORM_ERR("Input shapes are not supported");
@@ -35,50 +29,50 @@ index b48fd7c..025ed20 100644
+ NULL, 0, ShapeSet, Unsorted);
+ }
+ }
++}
+#endif /* BUILD_XSHAPE */
+
- last_update_time = 0.0;
- next_update_time = get_time();
- info.looped = 0;
-diff --git a/src/x11.cc b/src/x11.cc
-index 48f5197..15db872 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>
++
+ static void main_loop(void)
+ {
+ int terminate = 0;
+@@ -2067,6 +2089,10 @@
+ sigaddset(&newmask, SIGTERM);
+ sigaddset(&newmask, SIGUSR1);
#endif
-@@ -716,26 +712,6 @@ static void init_window(lua::state &l __attribute__((unused)), bool own)
++
++#ifdef BUILD_XSHAPE
++ set_null_shape();
++#endif /* BUILD_XSHAPE */
- wmHint.flags = InputHint | StateHint;
- /* 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 {
+ last_update_time = 0.0;
+ next_update_time = get_time() - fmod(get_time(), active_update_interval());
+@@ -2335,7 +2361,12 @@
+ own_window_type.get(*state) == TYPE_DESKTOP) {
+ /* allow conky to hold input focus. */
+ break;
+- } else {
++ }
++#ifdef BUILD_XSHAPE
++ else if (need_null_shape)
++ set_null_shape();
++#endif /* BUILD_XSHAPE */
++ else {
+ /* forward the click to the desktop window */
+ XUngrabPointer(display, ev.xbutton.time);
+ ev.xbutton.window = window.desktop;
+@@ -2356,7 +2387,12 @@
+ not TEST_HINT(own_window_hints.get(*state), HINT_UNDECORATED)) {
+ /* allow conky to hold input focus. */
+ break;
+- } else {
++ }
++#ifdef BUILD_XSHAPE
++ else if (need_null_shape)
++ set_null_shape();
++#endif /* BUILD_XSHAPE */
++ else {
+ /* forward the release to the desktop window */
+ ev.xbutton.window = window.desktop;
+ ev.xbutton.x = ev.xbutton.x_root;
+