Hello community,

here is the log from the commit of package sxhkd for openSUSE:Factory checked 
in at 2017-02-16 16:51:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sxhkd (Old)
 and      /work/SRC/openSUSE:Factory/.sxhkd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sxhkd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sxhkd/sxhkd.changes      2016-10-13 
11:29:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sxhkd.new/sxhkd.changes 2017-02-16 
16:51:40.425547664 +0100
@@ -1,0 +2,6 @@
+Fri Feb 10 03:42:07 UTC 2017 - [email protected]
+
+- Update to 0.5.7
+    * No changelog provided
+
+-------------------------------------------------------------------

Old:
----
  0.5.6.tar.gz

New:
----
  0.5.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sxhkd.spec ++++++
--- /var/tmp/diff_new_pack.xiaK0h/_old  2017-02-16 16:51:40.769498827 +0100
+++ /var/tmp/diff_new_pack.xiaK0h/_new  2017-02-16 16:51:40.769498827 +0100
@@ -1,7 +1,8 @@
 #
 # spec file for package sxhkd
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 Luke Jones, [email protected]
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +18,7 @@
 
 
 Name:           sxhkd
-Version:        0.5.6
+Version:        0.5.7
 Release:        0
 Summary:        Simple X hotkey daemon
 License:        BSD-2-Clause
@@ -27,8 +28,8 @@
 Source1:        
https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(xcb)
-BuildRequires:  pkgconfig(xcb-util)
 BuildRequires:  pkgconfig(xcb-keysyms)
+BuildRequires:  pkgconfig(xcb-util)
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ 0.5.6.tar.gz -> 0.5.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/Makefile new/sxhkd-0.5.7/Makefile
--- old/sxhkd-0.5.6/Makefile    2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/Makefile    2016-10-30 13:28:09.000000000 +0100
@@ -1,5 +1,6 @@
 NAME     = sxhkd
-VERSION := $(shell git describe 2> /dev/null || cat VERSION)
+VERCMD  ?= git describe 2> /dev/null
+VERSION := $(shell $(VERCMD) || cat VERSION)
 
 CPPFLAGS += -D_POSIX_C_SOURCE=200112L -DVERSION=\"$(VERSION)\"
 CFLAGS   += -std=c99 -pedantic -Wall -Wextra
@@ -10,8 +11,8 @@
 MANPREFIX ?= $(PREFIX)/share/man
 DOCPREFIX ?= $(PREFIX)/share/doc/$(NAME)
 
-SRC = $(wildcard *.c)
-OBJ = $(SRC:.c=.o)
+SRC := $(wildcard *.c)
+OBJ := $(SRC:.c=.o)
 
 all: $(NAME)
 
@@ -39,7 +40,7 @@
        rm -rf "$(DESTDIR)$(DOCPREFIX)"
 
 doc:
-       a2x -v -d manpage -f manpage -a revnumber=$(VERSION) doc/$(NAME).1.txt
+       a2x -v -d manpage -f manpage -a revnumber=$(VERSION) 
doc/$(NAME).1.asciidoc
 
 clean:
        rm -f $(OBJ) $(NAME)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/README.asciidoc 
new/sxhkd-0.5.7/README.asciidoc
--- old/sxhkd-0.5.6/README.asciidoc     2017-02-16 16:51:40.825490877 +0100
+++ new/sxhkd-0.5.7/README.asciidoc     1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to doc/sxhkd.1.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/README.md new/sxhkd-0.5.7/README.md
--- old/sxhkd-0.5.6/README.md   1970-01-01 01:00:00.000000000 +0100
+++ new/sxhkd-0.5.7/README.md   2016-10-30 13:28:09.000000000 +0100
@@ -0,0 +1,52 @@
+## Description
+
+*sxhkd* is an X daemon that reacts to input events by executing commands.
+
+Its configuration file is a series of bindings that define the associations 
between the input events and the commands.
+
+The format of the configuration file supports a simple notation for mapping 
multiple shortcuts to multiple commands in parallel.
+
+## Example Bindings
+
+       XF86Audio{Prev,Next}
+               mpc -q {prev,next}
+
+       @XF86LaunchA
+               scrot -s -e 'image_viewer $f'
+
+       super + shift + equal
+               sxiv -rt "$HOME/image"
+
+       XF86LaunchB
+               xdotool selectwindow | xsel -bi
+
+       super + {h,j,k,l}
+               bspc node -f {west,south,north,east}
+
+       super + alt + {0-9}
+               mpc -q seek {0-9}0%
+
+       super + {alt,ctrl,alt + ctrl} + XF86Eject
+               sudo systemctl {suspend,reboot,poweroff}
+
+       super + {_,shift + }{h,j,k,l}
+               bspc node -{f,s} {west,south,north,east}
+
+       {_,shift + ,super + }XF86MonBrightness{Down,Up}
+               bright {-1,-10,min,+1,+10,max}
+
+       super + o ; {e,w,m}
+               {gvim,firefox,thunderbird}
+
+       super + alt + control + {h,j,k,l} ; {0-9}
+               bspc node @{west,south,north,east} -r 0.{0-9}
+
+       super + alt + p
+               bspc config focus_follows_pointer {true,false}
+
+## Editor Plugins
+
+### Vim
+
+- [vim-sxhkdrc](https://github.com/baskerville/vim-sxhkdrc).
+- [sxhkd-vim](https://github.com/kovetskiy/sxhkd-vim).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/VERSION new/sxhkd-0.5.7/VERSION
--- old/sxhkd-0.5.6/VERSION     2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/VERSION     2016-10-30 13:28:09.000000000 +0100
@@ -1 +1 @@
-0.5.6
\ No newline at end of file
+0.5.7
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/doc/sxhkd.1 new/sxhkd-0.5.7/doc/sxhkd.1
--- old/sxhkd-0.5.6/doc/sxhkd.1 2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/doc/sxhkd.1 2016-10-30 13:28:09.000000000 +0100
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: sxhkd
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 03/15/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 10/30/2016
 .\"    Manual: Sxhkd Manual
-.\"    Source: Sxhkd 0.5.6
+.\"    Source: Sxhkd 0.5.7
 .\"  Language: English
 .\"
-.TH "SXHKD" "1" "03/15/2016" "Sxhkd 0\&.5\&.6" "Sxhkd Manual"
+.TH "SXHKD" "1" "10/30/2016" "Sxhkd 0\&.5\&.7" "Sxhkd Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -69,25 +69,10 @@
 Redirect the commands output to the given file\&.
 .RE
 .PP
-\fB\-o\fR \fIMOTION_SOCKET\fR
-.RS 4
-Write motion messages to the given SOCKET\&.
-.RE
-.PP
-\fB\-g\fR \fIMOTION_MSG_TPL\fR
-.RS 4
-Motion messages template\&.
-.RE
-.PP
 \fB\-s\fR \fISTATUS_FIFO\fR
 .RS 4
 Output status information to the given FIFO\&.
 .RE
-.PP
-\fB\-f\fR \fIFREQUENCY\fR
-.RS 4
-Set the maximum frequency for motion events\&.
-.RE
 .SH "BEHAVIOR"
 .sp
 \fBsxhkd\fR is a daemon that listens to keyboard events and execute commands\&.
@@ -176,70 +161,13 @@
 .sp
 If \fB~\fR is added at the beginning of the keysym, the captured event will be 
replayed for the other clients\&.
 .sp
-Mouse hotkeys can be defined by using one of the following special keysym 
names: \fIbutton1\fR, \fIbutton2\fR, \fIbutton3\fR, \&..., \fIbutton24\fR\&.
+Pointer hotkeys can be defined by using one of the following special keysym 
names: \fIbutton1\fR, \fIbutton2\fR, \fIbutton3\fR, \&..., \fIbutton24\fR\&.
 .sp
 The hotkey and the command may contain sequences of the form 
\fI{STRING_1,\&...,STRING_N}\fR\&.
 .sp
 In addition, the sequences can contain ranges of the form \fIA\fR\-\fIZ\fR 
where \fIA\fR and \fIZ\fR are alphanumeric characters\&.
 .sp
 The underscore character represents an empty sequence element\&.
-.SH "EXAMPLE BINDINGS"
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-XF86Audio{Prev,Next}
-    mpc \-q {prev,next}
-
-@XF86LaunchA
-    scrot \-s \-e \*(Aqimage_viewer $f\*(Aq
-
-super + shift + equal
-    sxiv \-rt "$HOME/image"
-
-XF86LaunchB
-    xdotool selectwindow | xsel \-bi
-
-super + {h,j,k,l}
-    bspc node \-f {west,south,north,east}
-
-super + alt + {0\-9}
-    mpc \-q seek {0\-9}0%
-
-super + {alt,ctrl,alt + ctrl} + XF86Eject
-    sudo systemctl {suspend,reboot,poweroff}
-
-~button1
-    bspc pointer \-g focus
-
-super + button{1\-3}
-    ; bspc pointer \-g {move,resize_side,resize_corner}
-
-super + @button{1\-3}
-    bspc pointer \-u
-
-super + {_,shift + }{h,j,k,l}
-    bspc node \-{f,s} {west,south,north,east}
-
-{_,shift + ,super + }XF86MonBrightness{Down,Up}
-    bright {\-1,\-10,min,+1,+10,max}
-
-super + o ; {e,w,m}
-    {gvim,firefox,thunderbird}
-
-super + m : {h,j,k,l}
-    xdo move {\-x \-5,\-y +5,\-y \-5,\-x +5}
-
-super + alt + control + {h,j,k,l} ; {0\-9}
-    bspc node @{west,south,north,east} \-r 0\&.{0\-9}
-
-super + alt + p
-    bspc config focus_follows_pointer {true,false}
-.fi
-.if n \{\
-.RE
-.\}
 .SH "AUTHOR"
 .sp
 Bastien Dejean <nihilhill at gmail\&.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/doc/sxhkd.1.asciidoc 
new/sxhkd-0.5.7/doc/sxhkd.1.asciidoc
--- old/sxhkd-0.5.6/doc/sxhkd.1.asciidoc        1970-01-01 01:00:00.000000000 
+0100
+++ new/sxhkd-0.5.7/doc/sxhkd.1.asciidoc        2016-10-30 13:28:09.000000000 
+0100
@@ -0,0 +1,125 @@
+:man source:   Sxhkd
+:man version:  {revnumber}
+:man manual:   Sxhkd Manual
+
+sxhkd(1)
+========
+
+Name
+----
+
+sxhkd - Simple X hotkey daemon
+
+Synopsis
+--------
+
+*sxhkd* [_OPTIONS_] [_EXTRA_CONFIG_ …]
+
+Description
+-----------
+
+sxhkd is a simple X hotkey daemon with a powerful and compact configuration 
syntax.
+
+Options
+-------
+
+
+*-h*::
+    Print the synopsis to standard output and exit.
+
+*-v*::
+    Print the version information to standard output and exit.
+
+*-m* _COUNT_::
+    Handle the first _COUNT_ mapping notify events.
+
+*-t* _TIMEOUT_::
+    Timeout in seconds for the recording of chord chains.
+
+*-c* _CONFIG_FILE_::
+    Read the main configuration from the given file.
+
+*-r* _REDIR_FILE_::
+    Redirect the commands output to the given file.
+
+*-s* _STATUS_FIFO_::
+    Output status information to the given FIFO.
+
+
+Behavior
+--------
+
+*sxhkd* is a daemon that listens to keyboard events and execute commands.
+
+It reads its configuration file from *$XDG_CONFIG_HOME/sxhkd/sxhkdrc* by 
default, or from the given file if the *-c* option is used.
+
+Additional configuration files can be passed as arguments.
+
+If *sxhkd* receives a _SIGUSR1_ (resp. _SIGUSR2_) signal, it will reload its 
configuration file (resp. toggle the grabbing state of all its bindings).
+
+The commands are executed via *SHELL* _-c_ *COMMAND* (hence you can use 
environment variables).
+
+*SHELL* will be the content of the first defined environment variable in the 
following list: *SXHKD_SHELL*, *SHELL*.
+
+If you have a non-QWERTY keyboard or a non-standard layout configuration, you 
should provide a _COUNT_ of _1_ to the *-m* option or _-1_ (interpreted as 
infinity) if you constantly switch from one layout to the other (*sxhkd* 
ignores all mapping notify events by default because the majority of those 
events are pointless).
+
+
+Configuration
+-------------
+
+Each line of the configuration file is interpreted as so:
+
+* If it is empty or starts with `#`, it is ignored.
+* If it starts with a space, it is read as a command.
+* Otherwise, it is read as a hotkey.
+
+General syntax:
+
+----
+HOTKEY
+    [;]COMMAND
+
+HOTKEY      := CHORD_1 ; CHORD_2 ; … ; CHORD_n
+CHORD_i     := [MODIFIERS_i +] [~][@]KEYSYM_i
+MODIFIERS_i := MODIFIER_i1 + MODIFIER_i2 + … + MODIFIER_ik
+----
+
+The valid modifier names are: _super_, _hyper_, _meta_, _alt_, _control_, 
_ctrl_, _shift_, _mode_switch_, _lock_, _mod1_, _mod2_, _mod3_, _mod4_, _mod5_ 
and _any_.
+
+The keysym names are given by the output of *xev*.
+
+Hotkeys and commands can be spread across multiple lines by ending each 
partial line with a backslash character.
+
+When multiple chords are separated by semicolons, the hotkey is a chord chain: 
the command will only be executed after receiving each chord of the chain in 
consecutive order.
+
+The colon character can be used instead of the semicolon to indicate that the 
chord chain shall not be aborted when the chain tail is reached.
+
+If a command starts with a semicolon, it will be executed synchronously, 
otherwise asynchronously.
+
+The _Escape_ key can be used to abort a chord chain.
+
+If *@* is added at the beginning of the keysym, the command will be run on key 
release events, otherwise on key press events.
+
+If *~* is added at the beginning of the keysym, the captured event will be 
replayed for the other clients.
+
+Pointer hotkeys can be defined by using one of the following special keysym 
names: _button1_, _button2_, _button3_, …, _button24_.
+
+The hotkey and the command may contain sequences of the form 
'{STRING_1,…,STRING_N}'.
+
+In addition, the sequences can contain ranges of the form _A_-_Z_ where _A_ 
and _Z_ are alphanumeric characters.
+
+The underscore character represents an empty sequence element.
+
+Author
+------
+
+Bastien Dejean <nihilhill at gmail.com>
+
+Mailing List
+------------
+
+sxhkd at librelist.com
+
+////
+vim: set ft=asciidoc:
+////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/doc/sxhkd.1.txt 
new/sxhkd-0.5.7/doc/sxhkd.1.txt
--- old/sxhkd-0.5.6/doc/sxhkd.1.txt     2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/doc/sxhkd.1.txt     1970-01-01 01:00:00.000000000 +0100
@@ -1,187 +0,0 @@
-:man source:   Sxhkd
-:man version:  {revnumber}
-:man manual:   Sxhkd Manual
-
-sxhkd(1)
-========
-
-Name
-----
-
-sxhkd - Simple X hotkey daemon
-
-Synopsis
---------
-
-*sxhkd* [_OPTIONS_] [_EXTRA_CONFIG_ …]
-
-Description
------------
-
-sxhkd is a simple X hotkey daemon with a powerful and compact configuration 
syntax.
-
-Options
--------
-
-
-*-h*::
-    Print the synopsis to standard output and exit.
-
-*-v*::
-    Print the version information to standard output and exit.
-
-*-m* _COUNT_::
-    Handle the first _COUNT_ mapping notify events.
-
-*-t* _TIMEOUT_::
-    Timeout in seconds for the recording of chord chains.
-
-*-c* _CONFIG_FILE_::
-    Read the main configuration from the given file.
-
-*-r* _REDIR_FILE_::
-    Redirect the commands output to the given file.
-
-*-o* _MOTION_SOCKET_::
-    Write motion messages to the given SOCKET.
-
-*-g* _MOTION_MSG_TPL_::
-    Motion messages template.
-
-*-s* _STATUS_FIFO_::
-    Output status information to the given FIFO.
-
-*-f* _FREQUENCY_::
-    Set the maximum frequency for motion events.
-
-Behavior
---------
-
-*sxhkd* is a daemon that listens to keyboard events and execute commands.
-
-It reads its configuration file from *$XDG_CONFIG_HOME/sxhkd/sxhkdrc* by 
default, or from the given file if the *-c* option is used.
-
-Additional configuration files can be passed as arguments.
-
-If *sxhkd* receives a _SIGUSR1_ (resp. _SIGUSR2_) signal, it will reload its 
configuration file (resp. toggle the grabbing state of all its bindings).
-
-The commands are executed via *SHELL* _-c_ *COMMAND* (hence you can use 
environment variables).
-
-*SHELL* will be the content of the first defined environment variable in the 
following list: *SXHKD_SHELL*, *SHELL*.
-
-If you have a non-QWERTY keyboard or a non-standard layout configuration, you 
should provide a _COUNT_ of _1_ to the *-m* option or _-1_ (interpreted as 
infinity) if you constantly switch from one layout to the other (*sxhkd* 
ignores all mapping notify events by default because the majority of those 
events are pointless).
-
-
-Configuration
--------------
-
-Each line of the configuration file is interpreted as so:
-
-* If it is empty or starts with `#`, it is ignored.
-* If it starts with a space, it is read as a command.
-* Otherwise, it is read as a hotkey.
-
-General syntax:
-
-----
-HOTKEY
-    [;]COMMAND
-
-HOTKEY      := CHORD_1 ; CHORD_2 ; … ; CHORD_n
-CHORD_i     := [MODIFIERS_i +] [~][@]KEYSYM_i
-MODIFIERS_i := MODIFIER_i1 + MODIFIER_i2 + … + MODIFIER_ik
-----
-
-The valid modifier names are: _super_, _hyper_, _meta_, _alt_, _control_, 
_ctrl_, _shift_, _mode_switch_, _lock_, _mod1_, _mod2_, _mod3_, _mod4_, _mod5_ 
and _any_.
-
-The keysym names are given by the output of *xev*.
-
-Hotkeys and commands can be spread across multiple lines by ending each 
partial line with a backslash character.
-
-When multiple chords are separated by semicolons, the hotkey is a chord chain: 
the command will only be executed after receiving each chord of the chain in 
consecutive order.
-
-The colon character can be used instead of the semicolon to indicate that the 
chord chain shall not be aborted when the chain tail is reached.
-
-If a command starts with a semicolon, it will be executed synchronously, 
otherwise asynchronously.
-
-The _Escape_ key can be used to abort a chord chain.
-
-If *@* is added at the beginning of the keysym, the command will be run on key 
release events, otherwise on key press events.
-
-If *~* is added at the beginning of the keysym, the captured event will be 
replayed for the other clients.
-
-Mouse hotkeys can be defined by using one of the following special keysym 
names: _button1_, _button2_, _button3_, …, _button24_.
-
-The hotkey and the command may contain sequences of the form 
'{STRING_1,…,STRING_N}'.
-
-In addition, the sequences can contain ranges of the form _A_-_Z_ where _A_ 
and _Z_ are alphanumeric characters.
-
-The underscore character represents an empty sequence element.
-
-
-Example Bindings
-----------------
-
-----
-XF86Audio{Prev,Next}
-    mpc -q {prev,next}
-
-@XF86LaunchA
-    scrot -s -e 'image_viewer $f'
-
-super + shift + equal
-    sxiv -rt "$HOME/image"
-
-XF86LaunchB
-    xdotool selectwindow | xsel -bi
-
-super + {h,j,k,l}
-    bspc node -f {west,south,north,east}
-
-super + alt + {0-9}
-    mpc -q seek {0-9}0%
-
-super + {alt,ctrl,alt + ctrl} + XF86Eject
-    sudo systemctl {suspend,reboot,poweroff}
-
-~button1
-    bspc pointer -g focus
-
-super + button{1-3}
-    ; bspc pointer -g {move,resize_side,resize_corner}
-
-super + @button{1-3}
-    bspc pointer -u
-
-super + {_,shift + }{h,j,k,l}
-    bspc node -{f,s} {west,south,north,east}
-
-{_,shift + ,super + }XF86MonBrightness{Down,Up}
-    bright {-1,-10,min,+1,+10,max}
-
-super + o ; {e,w,m}
-    {gvim,firefox,thunderbird}
-
-super + m : {h,j,k,l}
-    xdo move {-x -5,-y +5,-y -5,-x +5}
-
-super + alt + control + {h,j,k,l} ; {0-9}
-    bspc node @{west,south,north,east} -r 0.{0-9}
-
-super + alt + p
-    bspc config focus_follows_pointer {true,false}
-----
-
-Author
-------
-
-Bastien Dejean <nihilhill at gmail.com>
-
-Mailing List
-------------
-
-sxhkd at librelist.com
-
-////
-vim: set ft=asciidoc:
-////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/grab.c new/sxhkd-0.5.7/grab.c
--- old/sxhkd-0.5.6/grab.c      2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/grab.c      2016-10-30 13:28:09.000000000 +0100
@@ -79,7 +79,7 @@
        if (button == XCB_NONE)
                err = xcb_request_check(dpy, xcb_grab_key_checked(dpy, true, 
root, modfield, keycode, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_SYNC));
        else
-               err = xcb_request_check(dpy, xcb_grab_button_checked(dpy, true, 
root, XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | 
XCB_EVENT_MASK_BUTTON_MOTION, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, 
XCB_NONE, XCB_NONE, button, modfield));
+               err = xcb_request_check(dpy, xcb_grab_button_checked(dpy, true, 
root, XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE, 
XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, XCB_NONE, XCB_NONE, button, modfield));
        unsigned int value = (button == XCB_NONE ? keycode : button);
        char *type = (button == XCB_NONE ? "key" : "button");
        if (err != NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/sxhkd.c new/sxhkd-0.5.7/sxhkd.c
--- old/sxhkd-0.5.6/sxhkd.c     2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/sxhkd.c     2016-10-30 13:28:09.000000000 +0100
@@ -27,9 +27,9 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/stat.h>
+#include <sys/select.h>
 #include <sys/types.h>
 #include <sys/time.h>
-#include <sys/socket.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <stdbool.h>
@@ -38,30 +38,23 @@
 
 int main(int argc, char *argv[])
 {
-       char opt;
+       int opt;
        char *fifo_path = NULL;
-       char *socket_path = NULL;
        status_fifo = NULL;
        config_path = NULL;
        mapping_count = 0;
        timeout = TIMEOUT;
        grabbed = false;
-       sock_address.sun_family = AF_UNIX;
-       sock_address.sun_path[0] = 0;
-       snprintf(motion_msg_tpl, sizeof(motion_msg_tpl), "%s", MOTION_MSG_TPL);
-       unsigned int max_freq = 0;
-       motion_interval = 0;
-       last_motion_time = 0;
        redir_fd = -1;
 
-       while ((opt = getopt(argc, argv, "vhm:t:c:r:s:f:o:g:")) != (char)-1) {
+       while ((opt = getopt(argc, argv, "hvm:t:c:r:s:")) != -1) {
                switch (opt) {
                        case 'v':
                                printf("%s\n", VERSION);
                                exit(EXIT_SUCCESS);
                                break;
                        case 'h':
-                               printf("sxhkd [-h|-v|-m COUNT|-t TIMEOUT|-c 
CONFIG_FILE|-r REDIR_FILE|-s STATUS_FIFO|-o MOTION_SOCKET|-g MOTION_MSG_TPL] 
[EXTRA_CONFIG ...]\n");
+                               printf("sxhkd [-h|-v|-m COUNT|-t TIMEOUT|-c 
CONFIG_FILE|-r REDIR_FILE|-s STATUS_FIFO] [EXTRA_CONFIG ...]\n");
                                exit(EXIT_SUCCESS);
                                break;
                        case 'm':
@@ -82,16 +75,6 @@
                        case 's':
                                fifo_path = optarg;
                                break;
-                       case 'o':
-                               socket_path = optarg;
-                               break;
-                       case 'g':
-                               snprintf(motion_msg_tpl, 
sizeof(motion_msg_tpl), "%s", optarg);
-                               break;
-                       case 'f':
-                               if (sscanf(optarg, "%u", &max_freq) != 1)
-                                       warn("Can't parse maximum pointer 
frequency.\n");
-                               break;
                }
        }
 
@@ -108,23 +91,6 @@
                snprintf(config_file, sizeof(config_file), "%s", config_path);
        }
 
-       if (socket_path == NULL) {
-               socket_path = getenv(SOCKET_ENV);
-       }
-
-       if (socket_path == NULL) {
-               char *host = NULL;
-               int dn = 0, sn = 0;
-               if (xcb_parse_display(NULL, &host, &dn, &sn) != 0) {
-                       snprintf(sock_address.sun_path, 
sizeof(sock_address.sun_path), SOCKET_PATH_TPL, host, dn, sn);
-               } else {
-                       warn("Failed to set motion socket address.");
-               }
-               free(host);
-       } else {
-               snprintf(sock_address.sun_path, sizeof(sock_address.sun_path), 
"%s", socket_path);
-       }
-
        if (fifo_path != NULL) {
                int fifo_fd = open(fifo_path, O_RDWR | O_NONBLOCK);
                if (fifo_fd != -1)
@@ -133,9 +99,6 @@
                        warn("Couldn't open status fifo.\n");
        }
 
-       if (max_freq != 0)
-               motion_interval = 1000.0 / max_freq;
-
        signal(SIGINT, hold);
        signal(SIGHUP, hold);
        signal(SIGTERM, hold);
@@ -176,9 +139,6 @@
                                        case XCB_BUTTON_RELEASE:
                                                key_button_event(evt, 
event_type);
                                                break;
-                                       case XCB_MOTION_NOTIFY:
-                                               motion_notify(evt);
-                                               break;
                                        case XCB_MAPPING_NOTIFY:
                                                mapping_notify(evt);
                                                break;
@@ -264,42 +224,6 @@
        xcb_flush(dpy);
 }
 
-void motion_notify(xcb_generic_event_t *evt)
-{
-       xcb_motion_notify_event_t *e = (xcb_motion_notify_event_t *) evt;
-       PRINTF("motion notify %X %X %u %i %i\n", e->child, e->detail, e->state, 
e->root_x, e->root_y);
-       if (motion_interval > 0 && (e->time - last_motion_time) < 
motion_interval)
-               return;
-       last_motion_time = e->time;
-       char msg[MAXLEN];
-       int fd = socket(AF_UNIX, SOCK_STREAM, 0);
-       if (fd == -1) {
-               return;
-       }
-       if (connect(fd, (struct sockaddr *) &sock_address, 
sizeof(sock_address)) == -1) {
-               close(fd);
-               return;
-       }
-       int len = sizeof(msg), i = 0;
-       for (int j = 0, c = motion_msg_tpl[j]; c && i < len; j++, c = 
motion_msg_tpl[j]) {
-               if (c == ' ') {
-                       msg[i++] = 0;
-               } else if (c == 'X') {
-                       i += snprintf(msg+i, len-i, "%i", e->root_x);
-               } else if (c == 'Y') {
-                       i += snprintf(msg+i, len-i, "%i", e->root_y);
-               } else {
-                       msg[i++] = c;
-               }
-       }
-       if (i >= len) {
-               i--;
-       }
-       msg[i] = 0;
-       send(fd, msg, i+1, 0);
-       close(fd);
-}
-
 void mapping_notify(xcb_generic_event_t *evt)
 {
        if (!mapping_count)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sxhkd-0.5.6/sxhkd.h new/sxhkd-0.5.7/sxhkd.h
--- old/sxhkd-0.5.6/sxhkd.h     2016-03-15 17:20:41.000000000 +0100
+++ new/sxhkd-0.5.7/sxhkd.h     2016-10-30 13:28:09.000000000 +0100
@@ -28,7 +28,6 @@
 #include <xcb/xcb_keysyms.h>
 #include <stdio.h>
 #include <stdbool.h>
-#include <sys/un.h>
 #include "types.h"
 #include "helpers.h"
 
@@ -36,9 +35,6 @@
 #define SXHKD_SHELL_ENV  "SXHKD_SHELL"
 #define SHELL_ENV        "SHELL"
 #define CONFIG_PATH      "sxhkd/sxhkdrc"
-#define SOCKET_ENV       "BSPWM_SOCKET"
-#define SOCKET_PATH_TPL  "/tmp/bspwm%s_%i_%i-socket"
-#define MOTION_MSG_TPL   "pointer -t X Y"
 #define HOTKEY_PREFIX    'H'
 #define COMMAND_PREFIX   'C'
 #define TIMEOUT_PREFIX   'T'
@@ -55,13 +51,9 @@
 int num_extra_confs;
 int redir_fd;
 FILE *status_fifo;
-struct sockaddr_un sock_address;
-char motion_msg_tpl[MAXLEN];
 char progress[3 * MAXLEN];
 int mapping_count;
 int timeout;
-double motion_interval;
-xcb_timestamp_t last_motion_time;
 
 hotkey_t *hotkeys_head, *hotkeys_tail;
 bool running, grabbed, toggle_grab, reload, bell, chained, locked;
@@ -72,7 +64,6 @@
 uint16_t scroll_lock;
 
 void key_button_event(xcb_generic_event_t *evt, uint8_t event_type);
-void motion_notify(xcb_generic_event_t *evt);
 void mapping_notify(xcb_generic_event_t *evt);
 void setup(void);
 void cleanup(void);


Reply via email to