aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2022-03-06 14:55:33 -0700
committerDerek Stevens <nilix@nilfm.cc>2022-03-06 14:55:33 -0700
commit53bd15ab89df57a8461ab42cff0a010c320810ec (patch)
treeaecf63a42344dd05c5a2ca7502dddb53bb2e50ef
parente94234055d87734dd84a85d068ea7afdda53e273 (diff)
kinda fix edge case unmapping/destroying window immediately after switching from empty desktop
-rw-r--r--client.c8
-rw-r--r--event.c3
-rw-r--r--menu.c6
-rw-r--r--ryudo.log122
4 files changed, 132 insertions, 7 deletions
diff --git a/client.c b/client.c
index 5874886..c917cbc 100644
--- a/client.c
+++ b/client.c
@@ -429,10 +429,14 @@ Window getrevert(Client* c) {
} else {
m = getmonitorbyclient(c);
for (cc = c->revert; cc && cc->revert; cc = cc->revert) {
- if (getmonitorbyclient(cc) == m) {
+#ifdef AUTOSTICK
+ if (getmonitorbyclient(cc) == m && normal(cc) && !isautostick(cc)) {
+#else
+ if (getmonitorbyclient(cc) == m && normal(cc)) {
+#endif
return cc->window;
}
}
}
return 0;
-} \ No newline at end of file
+}
diff --git a/event.c b/event.c
index 5849c7a..1195085 100644
--- a/event.c
+++ b/event.c
@@ -256,7 +256,6 @@ void mapreq(XMapRequestEvent* e) {
void unmap(XUnmapEvent* e) {
Client *c, *revertc;
- Window revert;
int m;
curtime = CurrentTime;
@@ -354,7 +353,6 @@ void destroy(Window w) {
int i;
Client *c, *revertc;
Window revert;
- int monitor;
curtime = CurrentTime;
c = getclient(w, 0);
@@ -362,7 +360,6 @@ void destroy(Window w) {
return;
revert = getrevert(c);
- monitor = getmonitorbyclient(c);
if (numvirtuals > 1)
for (i = 0; i < numvirtuals; i++)
diff --git a/menu.c b/menu.c
index 0dc210f..665eb2e 100644
--- a/menu.c
+++ b/menu.c
@@ -311,16 +311,18 @@ void move(Client* c, int but) {
void delete (Client* c, int shift) {
Client* revertc;
+ int m;
if (c == 0)
return;
if (c == current) {
+ m = getmonitorbyclient(c);
if (revertc = getclient(getrevert(c), 0)) {
top(revertc);
active(revertc);
} else {
- nofocus();
+ shuffleonmonitor(m);
}
}
@@ -349,7 +351,7 @@ void hide(Client* c) {
top(revertc);
active(revertc);
} else {
- nofocus();
+ shuffleonmonitor(monitor);
}
}
if (reversehide) {
diff --git a/ryudo.log b/ryudo.log
new file mode 100644
index 0000000..0ede64a
--- /dev/null
+++ b/ryudo.log
@@ -0,0 +1,122 @@
+modprobe cpufreq_stats failedLoaded 0 prior measurements
+RAPL device for cpu 0
+RAPL Using PowerCap Sysfs : Domain Mask d
+RAPL device for cpu 0
+RAPL Using PowerCap Sysfs : Domain Mask d
+Devfreq not enabled
+glob returned GLOB_ABORTED
+darkhttpd: bind(port 9001): Address already in use
+9pserve: announce unix!/tmp/ns.nilix.:0/plumb: Address already in use
+plumber: post9pservice plumb: 9pserve failed
+Gtk-Message: 22:07:46.335: Failed to load module "colorreload-gtk-module"
+Gtk-Message: 22:07:46.335: Failed to load module "window-decorations-gtk-module"
+Warning: Missing charsets in String to FontSet conversion
+draw_border 0x55f1803bf7a0 pixel 0 active 0 hold 0
+draw_border 0x55f1803c0970 pixel 0 active 0 hold 0
+Gtk-Message: 22:07:46.445: Failed to load module "colorreload-gtk-module"
+Gtk-Message: 22:07:46.445: Failed to load module "window-decorations-gtk-module"
+Could not find Xinerama screen number 1
+Leaving PowerTOP
+draw_border 0x55f1803c0c50 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803c0c50 pixel 0 active 0 hold 0
+ryudo: active(c==0)
+ryudo: (nil) not on client list in top()
+ryudo: active(c==0)
+ryudo: (nil) not on client list in top()
+ryudo: active(c==0)
+ryudo: (nil) not on client list in top()
+ryudo: WM_STATE: format 32 data 0 431 w 0x180002f
+ryudo: WM_STATE: format 32 data 0 432 w 0x180002f
+draw_border 0x55f1803e3000 pixel 1536876 active 1 hold 0
+ryudo: WM_STATE: format 32 data 0 431 w 0x18000aa
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000aa
+ryudo: WM_STATE: format 32 data 0 431 w 0x18000af
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000af
+ryudo: WM_STATE: format 32 data 1 431 w 0x18000b4
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000b4
+ryudo: WM_STATE: format 32 data 0 431 w 0x18000bd
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000bd
+ryudo: WM_STATE: format 32 data 0 431 w 0x18000c2
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000c2
+ryudo: WM_STATE: format 32 data 0 431 w 0x18000e3
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000e3
+ryudo: WM_STATE: format 32 data 1 431 w 0x18000f4
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000f4
+ryudo: WM_STATE: format 32 data 0 431 w 0x18000fd
+ryudo: WM_STATE: format 32 data 0 432 w 0x18000fd
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800102
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800102
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800107
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800107
+ryudo: WM_STATE: format 32 data 1 431 w 0x180010c
+ryudo: WM_STATE: format 32 data 0 432 w 0x180010c
+ryudo: WM_STATE: format 32 data 0 431 w 0x180011d
+ryudo: WM_STATE: format 32 data 0 432 w 0x180011d
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800122
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800122
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800127
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800127
+ryudo: WM_STATE: format 32 data 0 431 w 0x180012c
+ryudo: WM_STATE: format 32 data 0 432 w 0x180012c
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800131
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800131
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800136
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800136
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800153
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800153
+draw_border 0x55f1803e3000 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3680 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3680 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3000 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3000 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3680 pixel 1536876 active 1 hold 0
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+right
+but: e x=62 y=340 c x=0 y=0 dx=1600 dy=900 BORDR 4
+draw_border 0x55f1803e3680 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3000 pixel 1536876 active 1 hold 0
+ryudo: WM_STATE: format 32 data 1 431 w 0x180018c
+ryudo: WM_STATE: format 32 data 0 432 w 0x180018c
+ryudo: WM_STATE: format 32 data 1 431 w 0x18001bd
+ryudo: WM_STATE: format 32 data 0 432 w 0x18001bd
+ryudo: WM_STATE: format 32 data 1 431 w 0x18001d6
+ryudo: WM_STATE: format 32 data 0 432 w 0x18001d6
+ryudo: WM_STATE: format 32 data 1 431 w 0x18001db
+ryudo: WM_STATE: format 32 data 0 432 w 0x18001db
+ryudo: WM_STATE: format 32 data 1 431 w 0x18001e0
+ryudo: WM_STATE: format 32 data 0 432 w 0x18001e0
+ryudo: WM_STATE: format 32 data 1 431 w 0x18001e5
+ryudo: WM_STATE: format 32 data 0 432 w 0x18001e5
+draw_border 0x55f1803e3000 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3680 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3680 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3000 pixel 1536876 active 1 hold 0
+ryudo: WM_STATE: format 32 data 0 431 w 0x1800202
+ryudo: WM_STATE: format 32 data 0 432 w 0x1800202
+draw_border 0x55f1803e3000 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3680 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3680 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3000 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3000 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3680 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3680 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3000 pixel 1536876 active 1 hold 0
+draw_border 0x55f1803e3000 pixel 0 active 0 hold 0
+draw_border 0x55f1803e3680 pixel 1536876 active 1 hold 0
+X connection to :0 broken (explicit kill or server shutdown).