fix keyboard lockup on client initiated unmap event, tweak desktop switching and monitor refresh
This commit is contained in:
parent
4eea9b7aab
commit
16ed0f7f24
3 changed files with 10 additions and 7 deletions
6
client.c
6
client.c
|
@ -109,8 +109,7 @@ void nofocus(void) {
|
||||||
static Window w = 0;
|
static Window w = 0;
|
||||||
int mask;
|
int mask;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
Client* c;
|
/*Client* c;
|
||||||
|
|
||||||
if (current) {
|
if (current) {
|
||||||
setactive(current, 0);
|
setactive(current, 0);
|
||||||
for (c = current->revert; c; c = c->revert)
|
for (c = current->revert; c; c = c->revert)
|
||||||
|
@ -119,9 +118,8 @@ void nofocus(void) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmapnofocus(current->screen);
|
cmapnofocus(current->screen);
|
||||||
/* if no candidates to revert to, fall through */
|
|
||||||
}
|
}
|
||||||
current = 0;
|
current = 0;*/
|
||||||
if (w == 0) {
|
if (w == 0) {
|
||||||
mask = CWOverrideRedirect /*|CWColormap*/;
|
mask = CWOverrideRedirect /*|CWColormap*/;
|
||||||
attr.override_redirect = 1;
|
attr.override_redirect = 1;
|
||||||
|
|
2
event.c
2
event.c
|
@ -49,6 +49,7 @@ void mainloop(int shape_event) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (c = clients; c; c = c->next) {
|
for (c = clients; c; c = c->next) {
|
||||||
|
monitor = getmonitorbyclient(c);
|
||||||
wrangle(c, monitorinfo[monitor]);
|
wrangle(c, monitorinfo[monitor]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -272,6 +273,7 @@ void unmap(XUnmapEvent* e) {
|
||||||
break;
|
break;
|
||||||
case NormalState:
|
case NormalState:
|
||||||
if (c == current) {
|
if (c == current) {
|
||||||
|
nofocus();
|
||||||
if (revertc = getclient(getrevert(c), 0)) {
|
if (revertc = getclient(getrevert(c), 0)) {
|
||||||
top(revertc);
|
top(revertc);
|
||||||
active(revertc);
|
active(revertc);
|
||||||
|
|
5
menu.c
5
menu.c
|
@ -513,9 +513,12 @@ void switch_to(int n) {
|
||||||
switch_to_c(n, clients);
|
switch_to_c(n, clients);
|
||||||
|
|
||||||
current = currents[virt];
|
current = currents[virt];
|
||||||
ensureactive();
|
if (current) {
|
||||||
active(current);
|
active(current);
|
||||||
top(current);
|
top(current);
|
||||||
|
} else {
|
||||||
|
nofocus();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef VIRTNOTIFY
|
#ifdef VIRTNOTIFY
|
||||||
sprintf(virtmsg, VIRTMSG, b2items[virt]);
|
sprintf(virtmsg, VIRTMSG, b2items[virt]);
|
||||||
|
|
Loading…
Reference in a new issue