sites

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

commit a412d065fe2b00a72d5f89dcb954e99bf2cc0812
parent f05085777cf34b9203d45e077120aa6a731a0457
Author: Klemens Nanni <kl3@posteo.org>
Date:   Fri,  2 Sep 2016 14:00:54 +0200

[slock] Update mediakeys patch

This version applies to latest HEAD and sorts the new case at the
beginning of the structure.

Diffstat:
Mtools.suckless.org/slock/patches/mediakeys.md | 2+-
Atools.suckless.org/slock/patches/slock-mediakeys-20160209-a55594f.diff | 41+++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/slock/patches/slock-mediakeys-20163108-137f007.diff | 41-----------------------------------------
3 files changed, 42 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-20163108-137f007.diff](slock-mediakeys-20163108-137f007.diff) +* [slock-mediakeys-20160209-a55594f.diff](slock-mediakeys-20163108-a55594f.diff) Authors ------- diff --git a/tools.suckless.org/slock/patches/slock-mediakeys-20160209-a55594f.diff b/tools.suckless.org/slock/patches/slock-mediakeys-20160209-a55594f.diff @@ -0,0 +1,41 @@ +From 5501bf403490eaf4c569be0889ef53011ddc23fd 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 08ada6f..305f406 100644 +--- a/slock.c ++++ b/slock.c +@@ -17,6 +17,7 @@ + #include <X11/keysym.h> + #include <X11/Xlib.h> + #include <X11/Xutil.h> ++#include <X11/XF86keysym.h> + + #if HAVE_BSD_AUTH + #include <login_cap.h> +@@ -161,6 +162,15 @@ readpw(Display *dpy, const char *pws) + 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[0]->root, True, KeyPressMask, &ev); ++ break; + case XK_Return: + passwd[len] = 0; + #ifdef HAVE_BSD_AUTH +-- +2.8.3 + diff --git a/tools.suckless.org/slock/patches/slock-mediakeys-20163108-137f007.diff b/tools.suckless.org/slock/patches/slock-mediakeys-20163108-137f007.diff @@ -1,41 +0,0 @@ -From c03df76eb95b4e5657432211c6c4572a767db787 Mon Sep 17 00:00:00 2001 -From: Klemens Nanni <kl3@posteo.org> -Date: Tue, 30 Aug 2016 22:25:47 +0200 -Subject: [PATCH] Apply slock-mediakeys-20163008-137f007.diff - -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 9ec2f71..da3bb2a 100644 ---- a/slock.c -+++ b/slock.c -@@ -17,6 +17,7 @@ - #include <X11/keysym.h> - #include <X11/Xlib.h> - #include <X11/Xutil.h> -+#include <X11/XF86keysym.h> - - #if HAVE_BSD_AUTH - #include <login_cap.h> -@@ -188,6 +189,15 @@ readpw(Display *dpy, const char *pws) - if (len) - passwd[len--] = 0; - break; -+ case XF86XK_AudioLowerVolume: -+ case XF86XK_AudioMute: -+ case XF86XK_AudioRaiseVolume: -+ case XF86XK_AudioPlay: -+ case XF86XK_AudioStop: -+ case XF86XK_AudioPrev: -+ case XF86XK_AudioNext: -+ XSendEvent(dpy, locks[0]->root, True, KeyPressMask, &ev); -+ break; - default: - if (num && !iscntrl((int)buf[0]) && (len + num < sizeof(passwd))) { - memcpy(passwd + len, buf, num); --- -2.8.3 -