mirror of
https://github.com/0intro/wmii
synced 2025-02-18 07:14:53 +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;
|
c = w->aux;
|
||||||
if((e->mode == NotifyWhileGrabbed) && (screen->hasgrab != &c_root)) {
|
if((e->mode == NotifyWhileGrabbed) && (screen->hasgrab != &c_root)) {
|
||||||
if((screen->focus) && (screen->hasgrab != screen->focus))
|
if(screen->focus)
|
||||||
screen->hasgrab = screen->focus;
|
screen->hasgrab = screen->focus;
|
||||||
if(screen->hasgrab == c)
|
|
||||||
return;
|
|
||||||
}else if(screen->focus == c) {
|
}else if(screen->focus == c) {
|
||||||
print_focus(&c_magic, "<magic>");
|
print_focus(&c_magic, "<magic>");
|
||||||
screen->focus = &c_magic;
|
screen->focus = &c_magic;
|
||||||
|
@ -165,7 +165,6 @@ focusin(XEvent *e) {
|
|||||||
if(XCheckMaskEvent(display, KeyPressMask, &me)) {
|
if(XCheckMaskEvent(display, KeyPressMask, &me)) {
|
||||||
/* wmii has grabbed focus */
|
/* wmii has grabbed focus */
|
||||||
screen->hasgrab = &c_root;
|
screen->hasgrab = &c_root;
|
||||||
flushevents(FocusChangeMask, True);
|
|
||||||
dispatch_event(&me);
|
dispatch_event(&me);
|
||||||
}
|
}
|
||||||
/* Some unmanaged window has grabbed focus */
|
/* Some unmanaged window has grabbed focus */
|
||||||
|
@ -199,13 +199,13 @@ kpress(XWindow w, ulong mod, KeyCode keycode) {
|
|||||||
for(k=key; k; k=k->lnext)
|
for(k=key; k; k=k->lnext)
|
||||||
k->tnext=k->lnext;
|
k->tnext=k->lnext;
|
||||||
found = match_keys(key, mod, keycode, False);
|
found = match_keys(key, mod, keycode, False);
|
||||||
if(!found) {
|
if(!found) /* grabbed but not found */
|
||||||
XBell(display, 0);
|
XBell(display, 0);
|
||||||
} /* grabbed but not found */
|
|
||||||
else if(!found->tnext && !found->next)
|
else if(!found->tnext && !found->next)
|
||||||
write_event("Key %s\n", found->name);
|
write_event("Key %s\n", found->name);
|
||||||
else {
|
else {
|
||||||
XGrabKeyboard(display, w, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
XGrabKeyboard(display, w, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
flushevents(FocusChangeMask, True);
|
||||||
kpress_seq(w, found);
|
kpress_seq(w, found);
|
||||||
XUngrabKeyboard(display, CurrentTime);
|
XUngrabKeyboard(display, CurrentTime);
|
||||||
XSync(display, False);
|
XSync(display, False);
|
||||||
|
11
man/wmii.1
11
man/wmii.1
@ -1,5 +1,5 @@
|
|||||||
'\" t
|
'\" 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.
|
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||||
.de Vb
|
.de Vb
|
||||||
.ft CW
|
.ft CW
|
||||||
@ -398,8 +398,7 @@ Rules have the form:
|
|||||||
\fB \fP
|
\fB \fP
|
||||||
.br
|
.br
|
||||||
\fB \fP\fB \fP/\fIregex\fP/
|
\fB \fP\fB \fP/\fIregex\fP/
|
||||||
\-> \fIwidth\fP[\fI+width\&...
|
\-> \fIwidth\fP[\fI+width...\fP]
|
||||||
\fP]
|
|
||||||
.br
|
.br
|
||||||
\fB \fP
|
\fB \fP
|
||||||
.br
|
.br
|
||||||
@ -425,8 +424,7 @@ Rules are specified:
|
|||||||
\fB \fP
|
\fB \fP
|
||||||
.br
|
.br
|
||||||
\fB \fP\fB \fP/\fIregex\fP/
|
\fB \fP\fB \fP/\fIregex\fP/
|
||||||
\-> \fItag\fP[\fI+tag\&...
|
\-> \fItag\fP[\fI+tag...\fP]
|
||||||
\fP]
|
|
||||||
.br
|
.br
|
||||||
\fB \fP
|
\fB \fP
|
||||||
.br
|
.br
|
||||||
@ -484,7 +482,8 @@ has a button pressed over it.
|
|||||||
A left or right bar has been clicked or has a
|
A left or right bar has been clicked or has a
|
||||||
button pressed over it.
|
button pressed over it.
|
||||||
.TP
|
.TP
|
||||||
\&...To be continued\&...
|
\&.\&.\&.
|
||||||
|
To be continued...
|
||||||
.RE
|
.RE
|
||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
|
@ -196,7 +196,7 @@ follows.
|
|||||||
rules which affect the width of newly created columns.
|
rules which affect the width of newly created columns.
|
||||||
Rules have the form: \\ \SP % Yuck!
|
Rules have the form: \\ \SP % Yuck!
|
||||||
\MANbr
|
\MANbr
|
||||||
\SP\SP /\Arg{regex}/ -> \Arg{width}\oArg{+width\Dots} \\ \SP
|
\SP\SP /\Arg{regex}/ -> \Arg{width}\oArg{+width...} \\ \SP
|
||||||
\MANbr
|
\MANbr
|
||||||
When a new column, \Arg{n}, is created on a view whose
|
When a new column, \Arg{n}, is created on a view whose
|
||||||
name matches \Arg{regex}, the \Arg{n}th given
|
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.
|
the tags a client is to be given when it is created.
|
||||||
Rules are specified: \\ \SP
|
Rules are specified: \\ \SP
|
||||||
\MANbr
|
\MANbr
|
||||||
\SP\SP /\Arg{regex}/ -> \Arg{tag}\oArg{+tag\Dots} \\ \SP
|
\SP\SP /\Arg{regex}/ -> \Arg{tag}\oArg{+tag...} \\ \SP
|
||||||
\MANbr
|
\MANbr
|
||||||
When a client's \Arg{name}:\Arg{class}:\Arg{title}
|
When a client's \Arg{name}:\Arg{class}:\Arg{title}
|
||||||
matches \Arg{regex}, it is given the tagstring
|
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}]
|
\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
|
A left or right bar has been clicked or has a
|
||||||
button pressed over it.
|
button pressed over it.
|
||||||
\item[\Dots] To be continued\Dots
|
\item[...] To be continued...
|
||||||
\end{description}
|
\end{description}
|
||||||
\item[ctl] The \emph{ctl} file takes a number of messages to
|
\item[ctl] The \emph{ctl} file takes a number of messages to
|
||||||
change global settings such as color and font, which can
|
change global settings such as color and font, which can
|
||||||
|
Loading…
x
Reference in New Issue
Block a user