sites

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

commit 5b62b6bae2dcfebae7a551ed26ef5805c4176051
parent f3a35d30b5783954eb493e39102d3515e63850a8
Author: Evgeny Grablyk <evgeny.grablyk@gmail.com>
Date:   Wed, 13 Oct 2010 21:45:10 +0300

Added a page for pwkl patch.
Diffstat:
Adwm.suckless.org/patches/dwm-5.9-pwkl.diff | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/pwkl.md | 22++++++++++++++++++++++
2 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-5.9-pwkl.diff b/dwm.suckless.org/patches/dwm-5.9-pwkl.diff @@ -0,0 +1,61 @@ +diff -r 406003e3a01f dwm.c +--- a/dwm.c Mon Sep 27 07:53:44 2010 +0000 ++++ b/dwm.c Wed Oct 13 21:16:04 2010 +0300 +@@ -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 */ +@@ -93,6 +94,7 @@ + Client *snext; + Monitor *mon; + Window win; ++ unsigned char kbdgrp; + }; + + typedef struct { +@@ -821,6 +823,7 @@ + selmon = c->mon; + if(c->isurgent) + clearurgent(c); ++ XkbLockGroup (dpy, XkbUseCoreKbd, c->kbdgrp); + detachstack(c); + attachstack(c); + grabbuttons(c, True); +@@ -1092,6 +1095,7 @@ + Client *c, *t = NULL; + Window trans = None; + XWindowChanges wc; ++ XkbStateRec kbd_state; + + if(!(c = malloc(sizeof(Client)))) + die("fatal: could not malloc() %u bytes\n", sizeof(Client)); +@@ -1146,6 +1150,8 @@ + XMapWindow(dpy, c->win); + setclientstate(c, NormalState); + arrange(c->mon); ++ XkbGetState (dpy, XkbUseCoreKbd, &kbd_state); ++ c->kbdgrp = kbd_state.group; + } + + void +@@ -1700,12 +1706,16 @@ + + void + unfocus(Client *c, Bool setfocus) { ++ XkbStateRec kbd_state; ++ + if(!c) + return; + grabbuttons(c, False); + XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); + if(setfocus) + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); ++ XkbGetState (dpy, XkbUseCoreKbd, &kbd_state); ++ c->kbdgrp = kbd_state.group; + } + + void diff --git a/dwm.suckless.org/patches/pwkl.md b/dwm.suckless.org/patches/pwkl.md @@ -0,0 +1,22 @@ +PER-WINDOW KEYBOARD LAYOUT +=========== + +Description +----------- +Basically, this patch implements per-window keyboard layout support in dwm. +It makes dwm remember current keyboard layout when a window is unfocued, +and restore it back when that window is focused again. + +Notes +----------- +Andreas Amann pointed out that "you cannot switch between tags per mouse +if an alternate layout is activated". He kindly created a patch that fixes +this: [see ml](http://lists.suckless.org/dev/1010/6195.html). + +Download +-------- +* [dwm-5.9-pwkl.diff](dwm-5.9-pwkl.diff) (1.4K) (20101013) + +Author +------ +* Evgeny Grablyk - <evgeny.grablyk@gmail.com>