[wiki] [sites] dwm: pwkl: adapted for 6.2 || Ivan Kovnatsky

From: <git_AT_suckless.org>
Date: Tue, 01 Dec 2020 11:28:35 +0100

commit dd47488f59b903f5b6befb73cd5d8982c1921764
Author: Ivan Kovnatsky <sevenfourk_AT_protonmail.ch>
Date: Tue Dec 1 12:27:41 2020 +0200

    dwm: pwkl: adapted for 6.2

diff --git a/dwm.suckless.org/patches/pwkl/dwm-pwkl-6.2.diff b/dwm.suckless.org/patches/pwkl/dwm-pwkl-6.2.diff
new file mode 100644
index 00000000..062c113a
--- /dev/null
+++ b/dwm.suckless.org/patches/pwkl/dwm-pwkl-6.2.diff
_AT_@ -0,0 +1,61 @@
+diff --color -up /tmp/dwm-6.2/dwm.c dwm-6.2/dwm.c
+--- /tmp/dwm-6.2/dwm.c 2019-02-02 14:55:28.000000000 +0200
++++ dwm-6.2/dwm.c 2020-12-01 12:20:55.584639058 +0200
+_AT_@ -36,6 +36,7 @@
+ #include <X11/Xlib.h>
+ #include <X11/Xproto.h>
+ #include <X11/Xutil.h>
++#include <X11/XKBlib.h>
+ #ifdef XINERAMA
+ #include <X11/extensions/Xinerama.h>
+ #endif /* XINERAMA */
+_AT_@ -97,6 +98,7 @@ struct Client {
+ Client *snext;
+ Monitor *mon;
+ Window win;
++ unsigned char kbdgrp;
+ };
+
+ typedef struct {
+_AT_@ -792,6 +794,7 @@ focus(Client *c)
+ selmon = c->mon;
+ if (c->isurgent)
+ seturgent(c, 0);
++ XkbLockGroup(dpy, XkbUseCoreKbd, c->kbdgrp);
+ detachstack(c);
+ attachstack(c);
+ grabbuttons(c, 1);
+_AT_@ -1020,6 +1023,7 @@ manage(Window w, XWindowAttributes *wa)
+ Client *c, *t = NULL;
+ Window trans = None;
+ XWindowChanges wc;
++ XkbStateRec kbd_state;
+
+ c = ecalloc(1, sizeof(Client));
+ c->win = w;
+_AT_@ -1071,6 +1075,8 @@ manage(Window w, XWindowAttributes *wa)
+ if (c->mon == selmon)
+ unfocus(selmon->sel, 0);
+ c->mon->sel = c;
++ XkbGetState(dpy, XkbUseCoreKbd, &kbd_state);
++ c->kbdgrp = kbd_state.group;
+ arrange(c->mon);
+ XMapWindow(dpy, c->win);
+ focus(NULL);
+_AT_@ -1749,6 +1755,7 @@ toggleview(const Arg *arg)
+ void
+ unfocus(Client *c, int setfocus)
+ {
++ XkbStateRec kbd_state;
+ if (!c)
+ return;
+ grabbuttons(c, 0);
+_AT_@ -1757,6 +1764,8 @@ unfocus(Client *c, int setfocus)
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+ XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
+ }
++ XkbGetState(dpy, XkbUseCoreKbd, &kbd_state);
++ c->kbdgrp = kbd_state.group;
+ }
+
+ void
diff --git a/dwm.suckless.org/patches/pwkl/index.md b/dwm.suckless.org/patches/pwkl/index.md
index 61f3e12f..7b07c232 100644
--- a/dwm.suckless.org/patches/pwkl/index.md
+++ b/dwm.suckless.org/patches/pwkl/index.md
_AT_@ -17,6 +17,7 @@ Download
 --------
 * [dwm-pwkl-5.9.diff](dwm-pwkl-5.9.diff) (1.4K) (2010-10-13)
 * [dwm-pwkl-6.1.diff](dwm-pwkl-6.1.diff) (1.5K) (2017-01-28)
+* [dwm-pwkl-6.2.diff](dwm-pwkl-6.2.diff) (1.6K) (2020-12-01)
 
 Author
 ------
Received on Tue Dec 01 2020 - 11:28:35 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 01 2020 - 11:36:46 CET