sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8890f554f37047410a7980eaed8f5cc7fd589261
parent ece081df04d11b6c2e3ecac844e9b457eeefbd24
Author: Klemens Nanni <kl3@posteo.org>
Date:   Wed, 11 Jan 2017 16:44:59 +0100

[slock] Use DefaultRootWindow(3) macro in mediakeys patch

Diffstat:
Mtools.suckless.org/slock/patches/mediakeys.md | 2+-
Dtools.suckless.org/slock/patches/slock-mediakeys-20170106-2d2a21a.diff | 41-----------------------------------------
Atools.suckless.org/slock/patches/slock-mediakeys-20170111-2d2a21a.diff | 25+++++++++++++++++++++++++
3 files changed, 26 insertions(+), 42 deletions(-)

diff --git a/tools.suckless.org/slock/patches/mediakeys.md b/tools.suckless.org/slock/patches/mediakeys.md @@ -19,7 +19,7 @@ or raise the volume, that's all there is to it. Download -------- -* [slock-mediakeys-20170106-2d2a21a.diff](slock-mediakeys-20170106-2d2a21a.diff) +* [slock-mediakeys-20170111-2d2a21a.diff](slock-mediakeys-20170111-2d2a21a.diff) Authors ------- diff --git a/tools.suckless.org/slock/patches/slock-mediakeys-20170106-2d2a21a.diff b/tools.suckless.org/slock/patches/slock-mediakeys-20170106-2d2a21a.diff @@ -1,41 +0,0 @@ -From b17dc228ed4da38bbd337976b611130427021a48 Mon Sep 17 00:00:00 2001 -From: Klemens Nanni <kl3@posteo.org> -Date: Fri, 2 Sep 2016 13:57:31 +0200 -Subject: [PATCH] Allow mediakeys - -This allows media hotkeys to be used while the screen is locked. ---- - slock.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/slock.c b/slock.c -index d55eb3d..39d16d2 100644 ---- a/slock.c -+++ b/slock.c -@@ -18,6 +18,7 @@ - #include <X11/keysym.h> - #include <X11/Xlib.h> - #include <X11/Xutil.h> -+#include <X11/XF86keysym.h> - - #include "arg.h" - #include "util.h" -@@ -157,6 +158,15 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, - IsPrivateKeypadKey(ksym)) - continue; - switch (ksym) { -+ case XF86XK_AudioLowerVolume: -+ case XF86XK_AudioMute: -+ case XF86XK_AudioRaiseVolume: -+ case XF86XK_AudioPlay: -+ case XF86XK_AudioStop: -+ case XF86XK_AudioPrev: -+ case XF86XK_AudioNext: -+ XSendEvent(dpy, locks[screen]->root, True, KeyPressMask, &ev); -+ break; - case XK_Return: - passwd[len] = '\0'; - errno = 0; --- -2.11.0 - diff --git a/tools.suckless.org/slock/patches/slock-mediakeys-20170111-2d2a21a.diff b/tools.suckless.org/slock/patches/slock-mediakeys-20170111-2d2a21a.diff @@ -0,0 +1,25 @@ +From ca087d5b0e8cd4ac596c161dbf569640c7754b46 Mon Sep 17 00:00:00 2001 +From: Klemens Nanni <kl3@posteo.org> +Date: Sat, 7 Jan 2017 02:18:09 +0100 +Subject: [PATCH] Update 'mediakeys' patch to 20170111 + +--- + slock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/slock.c b/slock.c +index ac26cc8..4d81ca6 100644 +--- a/slock.c ++++ b/slock.c +@@ -186,7 +186,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, + case XF86XK_AudioStop: + case XF86XK_AudioPrev: + case XF86XK_AudioNext: +- XSendEvent(dpy, locks[0]->root, True, KeyPressMask, &ev); ++ XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; + case XK_Return: + passwd[len] = '\0'; +-- +2.11.0 +