aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2022-03-08 23:18:48 -0700
committerDerek Stevens <nilix@nilfm.cc>2022-03-08 23:18:48 -0700
commit16ed0f7f244c9c3e6d671449996c89e11db296dc (patch)
tree96f93dfd74ad0a04248e9a0a37aad18bb7705350
parent4eea9b7aabaca61a61958af4f93f164a2999a80a (diff)
fix keyboard lockup on client initiated unmap event, tweak desktop switching and monitor refreshv1.3.41.3.0
-rw-r--r--client.c6
-rw-r--r--event.c2
-rw-r--r--menu.c9
3 files changed, 10 insertions, 7 deletions
diff --git a/client.c b/client.c
index c917cbc..bed7604 100644
--- a/client.c
+++ b/client.c
@@ -109,8 +109,7 @@ void nofocus(void) {
static Window w = 0;
int mask;
XSetWindowAttributes attr;
- Client* c;
-
+ /*Client* c;
if (current) {
setactive(current, 0);
for (c = current->revert; c; c = c->revert)
@@ -119,9 +118,8 @@ void nofocus(void) {
return;
}
cmapnofocus(current->screen);
- /* if no candidates to revert to, fall through */
}
- current = 0;
+ current = 0;*/
if (w == 0) {
mask = CWOverrideRedirect /*|CWColormap*/;
attr.override_redirect = 1;
diff --git a/event.c b/event.c
index 1195085..650f01e 100644
--- a/event.c
+++ b/event.c
@@ -49,6 +49,7 @@ void mainloop(int shape_event) {
break;
}
for (c = clients; c; c = c->next) {
+ monitor = getmonitorbyclient(c);
wrangle(c, monitorinfo[monitor]);
}
}
@@ -272,6 +273,7 @@ void unmap(XUnmapEvent* e) {
break;
case NormalState:
if (c == current) {
+ nofocus();
if (revertc = getclient(getrevert(c), 0)) {
top(revertc);
active(revertc);
diff --git a/menu.c b/menu.c
index 665eb2e..f1d59f7 100644
--- a/menu.c
+++ b/menu.c
@@ -513,9 +513,12 @@ void switch_to(int n) {
switch_to_c(n, clients);
current = currents[virt];
- ensureactive();
- active(current);
- top(current);
+ if (current) {
+ active(current);
+ top(current);
+ } else {
+ nofocus();
+ }
#ifdef VIRTNOTIFY
sprintf(virtmsg, VIRTMSG, b2items[virt]);