mirror of
https://github.com/0intro/wmii
synced 2024-11-29 17:13:11 +03:00
Fix flicker on press of grabbed key.
This commit is contained in:
parent
4923658a3f
commit
d7c68da518
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
11
man/wmii.1
11
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user