[wiki] [sites] Fix hidetabs and keyreleases file link || LeelaPakanati

From: <git_AT_suckless.org>
Date: Thu, 19 Dec 2019 03:43:45 +0100

commit 212103487a3d1663aade1041afcde83464bd48a3
Author: LeelaPakanati <LeelaPakanati.gmail.com>
Date: Wed Dec 18 21:43:41 2019 -0500

    Fix hidetabs and keyreleases file link

diff --git a/tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-20191216-b5f9e6.diff b/tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-20191216-b5f9ec6.diff
similarity index 100%
rename from tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-20191216-b5f9e6.diff
rename to tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-20191216-b5f9ec6.diff
diff --git a/tools.suckless.org/tabbed/patches/keyrelease/index.md b/tools.suckless.org/tabbed/patches/keyrelease/index.md
index 08bd6767..59e5cc81 100644
--- a/tools.suckless.org/tabbed/patches/keyrelease/index.md
+++ b/tools.suckless.org/tabbed/patches/keyrelease/index.md
_AT_@ -8,7 +8,7 @@ For example usage see: hidetabs
 
 Download
 --------
-* [tabbed-keypress-20191213-b5f9ec6.diff](tabbed-keypress-20191213-b5f9ec6.diff)
+* [tabbed-keyrelease-20191216-b5f9ec6.diff](tabbed-keyrelease-20191216-b5f9ec6.diff)
 
 Author
 ------
diff --git a/tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191213-b5f9ec6.diff b/tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191213-b5f9ec6.diff
deleted file mode 100644
index 1ac50011..00000000
--- a/tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191213-b5f9ec6.diff
+++ /dev/null
_AT_@ -1,96 +0,0 @@
-From 1cb625c1d9606df518d4de89d6af4bef18cdd62e Mon Sep 17 00:00:00 2001
-From: LeelaPakanati <LeelaPakanati.gmail.com>
-Date: Fri, 13 Dec 2019 16:56:42 -0500
-Subject: [PATCH] Add function handling at keyrelease
-
----
- config.def.h |  6 ++++++
- tabbed.c     | 30 +++++++++++++++++++++++++++++-
- 2 files changed, 35 insertions(+), 1 deletion(-)
-
-diff --git a/config.def.h b/config.def.h
-index defa426..7bfda30 100644
---- a/config.def.h
-+++ b/config.def.h
-_AT_@ -64,3 +64,9 @@ static Key keys[] = {
- 
- 	{ 0,                    XK_F11,    fullscreen,  { 0 } },
- };
-+
-+static Key keyreleases[] = {
-+	/* modifier             key          function     argument */
-+	{ 0,                    XK_Shift_L,  NULL,   { 0 } },
-+
-+};
-diff --git a/tabbed.c b/tabbed.c
-index ff3ada0..8d03bc6 100644
---- a/tabbed.c
-+++ b/tabbed.c
-_AT_@ -113,6 +113,7 @@ static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
- static void initfont(const char *fontstr);
- static Bool isprotodel(int c);
- static void keypress(const XEvent *e);
-+static void keyrelease(const XEvent *e);
- static void killclient(const Arg *arg);
- static void manage(Window win);
- static void maprequest(const XEvent *e);
-_AT_@ -149,6 +150,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = {
- 	[Expose] = expose,
- 	[FocusIn] = focusin,
- 	[KeyPress] = keypress,
-+	[KeyRelease] = keyrelease,
- 	[MapRequest] = maprequest,
- 	[PropertyNotify] = propertynotify,
- };
-_AT_@ -664,6 +666,22 @@ keypress(const XEvent *e)
- 	}
- }
- 
-+void
-+keyrelease(const XEvent *e)
-+{
-+	const XKeyEvent *ev = &e->xkey;
-+	unsigned int i;
-+	KeySym keysym;
-+
-+	keysym = XkbKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0, 0);
-+	for (i = 0; i < LENGTH(keys); i++) {
-+		if (keysym == keyreleases[i].keysym &&
-+		    CLEANMASK(keyreleases[i].mod) == CLEANMASK(ev->state) &&
-+		    keyreleases[i].func)
-+			keyreleases[i].func(&(keyreleases[i].arg));
-+	}
-+}
-+
- void
- killclient(const Arg *arg)
- {
-_AT_@ -714,6 +732,16 @@ manage(Window w)
- 			}
- 		}
- 
-+		for (i = 0; i < LENGTH(keyreleases); i++) {
-+			if ((code = XKeysymToKeycode(dpy, keyreleases[i].keysym))) {
-+				for (j = 0; j < LENGTH(modifiers); j++) {
-+					XGrabKey(dpy, code, keyreleases[i].mod |
-+					         modifiers[j], w, True,
-+					         GrabModeAsync, GrabModeAsync);
-+				}
-+			}
-+		}
-+
- 		c = ecalloc(1, sizeof *c);
- 		c->win = w;
- 
-_AT_@ -1036,7 +1064,7 @@ setup(void)
- 	XMapRaised(dpy, win);
- 	XSelectInput(dpy, win, SubstructureNotifyMask | FocusChangeMask |
- 	             ButtonPressMask | ExposureMask | KeyPressMask |
--	             PropertyChangeMask | StructureNotifyMask |
-+	             KeyReleaseMask | PropertyChangeMask | StructureNotifyMask |
- 	             SubstructureRedirectMask);
- 	xerrorxlib = XSetErrorHandler(xerror);
- 
--- 
-2.24.0
-
diff --git a/tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191216-b5f9e6.diff b/tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191216-b5f9ec6.diff
similarity index 100%
rename from tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191216-b5f9e6.diff
rename to tools.suckless.org/tabbed/patches/keyrelease/tabbed-keyrelease-20191216-b5f9ec6.diff
Received on Thu Dec 19 2019 - 03:43:45 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 19 2019 - 03:48:39 CET