wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit d7c68da518298da57da6983d1755412750172dd1
parent 4923658a3fb6e4815baf187c3ec6b57c72a8ebce
Author: Kris Maglione <jg@suckless.org>
Date:   Mon, 11 Jun 2007 13:13:49 -0400

Fix flicker on press of grabbed key.

Diffstat:
cmd/wmii/client.c | 4+---
cmd/wmii/event.c | 1-
cmd/wmii/key.c | 4++--
man/wmii.1 | 11+++++------
man/wmii.tex | 6+++---
5 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c @@ -690,10 +690,8 @@ focusout_event(Window *w, XFocusChangeEvent *e) { c = w->aux; if((e->mode == NotifyWhileGrabbed) && (screen->hasgrab != &c_root)) { - if((screen->focus) && (screen->hasgrab != screen->focus)) + if(screen->focus) screen->hasgrab = screen->focus; - if(screen->hasgrab == c) - return; }else if(screen->focus == c) { print_focus(&c_magic, "<magic>"); screen->focus = &c_magic; diff --git a/cmd/wmii/event.c b/cmd/wmii/event.c @@ -165,7 +165,6 @@ focusin(XEvent *e) { if(XCheckMaskEvent(display, KeyPressMask, &me)) { /* wmii has grabbed focus */ screen->hasgrab = &c_root; - flushevents(FocusChangeMask, True); dispatch_event(&me); } /* Some unmanaged window has grabbed focus */ diff --git a/cmd/wmii/key.c b/cmd/wmii/key.c @@ -199,13 +199,13 @@ kpress(XWindow w, ulong mod, KeyCode keycode) { for(k=key; k; k=k->lnext) k->tnext=k->lnext; found = match_keys(key, mod, keycode, False); - if(!found) { + if(!found) /* grabbed but not found */ XBell(display, 0); - } /* grabbed but not found */ else if(!found->tnext && !found->next) write_event("Key %s\n", found->name); else { XGrabKeyboard(display, w, True, GrabModeAsync, GrabModeAsync, CurrentTime); + flushevents(FocusChangeMask, True); kpress_seq(w, found); XUngrabKeyboard(display, CurrentTime); XSync(display, False); diff --git a/man/wmii.1 b/man/wmii.1 @@ -1,5 +1,5 @@ '\" t -.\" Manual page created with latex2man on Mon Jun 11 12:04:08 EDT 2007 +.\" Manual page created with latex2man on Mon Jun 11 12:08:17 EDT 2007 .\" NOTE: This file is generated, DO NOT EDIT. .de Vb .ft CW @@ -398,8 +398,7 @@ Rules have the form: \fB \fP .br \fB \fP\fB \fP/\fIregex\fP/ -\-> \fIwidth\fP[\fI+width\&... -\fP] +\-> \fIwidth\fP[\fI+width...\fP] .br \fB \fP .br @@ -425,8 +424,7 @@ Rules are specified: \fB \fP .br \fB \fP\fB \fP/\fIregex\fP/ -\-> \fItag\fP[\fI+tag\&... -\fP] +\-> \fItag\fP[\fI+tag...\fP] .br \fB \fP .br @@ -484,7 +482,8 @@ has a button pressed over it. A left or right bar has been clicked or has a button pressed over it. .TP -\&...To be continued\&... +\&.\&.\&. +To be continued... .RE .RS .PP diff --git a/man/wmii.tex b/man/wmii.tex @@ -196,7 +196,7 @@ follows. rules which affect the width of newly created columns. Rules have the form: \\ \SP % Yuck! \MANbr - \SP\SP /\Arg{regex}/ -> \Arg{width}\oArg{+width\Dots} \\ \SP + \SP\SP /\Arg{regex}/ -> \Arg{width}\oArg{+width...} \\ \SP \MANbr When a new column, \Arg{n}, is created on a view whose name matches \Arg{regex}, the \Arg{n}th given @@ -208,7 +208,7 @@ follows. the tags a client is to be given when it is created. Rules are specified: \\ \SP \MANbr - \SP\SP /\Arg{regex}/ -> \Arg{tag}\oArg{+tag\Dots} \\ \SP + \SP\SP /\Arg{regex}/ -> \Arg{tag}\oArg{+tag...} \\ \SP \MANbr When a client's \Arg{name}:\Arg{class}:\Arg{title} matches \Arg{regex}, it is given the tagstring @@ -240,7 +240,7 @@ follows. \item[\emph{Left\Bar Right}Bar\emph{Click\Bar MouseDown} \Arg{button} \Arg{bar}] A left or right bar has been clicked or has a button pressed over it. - \item[\Dots] To be continued\Dots + \item[...] To be continued... \end{description} \item[ctl] The \emph{ctl} file takes a number of messages to change global settings such as color and font, which can