From 27f4b1dd3849bd942e71781e6cc68014b12e2447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BChlinghaus?= Date: Fri, 20 Feb 2026 18:33:01 +0100 Subject: [PATCH] Forked. Fix for menu popup bugs. --- .gitignore | 3 +++ README.md | 2 ++ event.c | 9 ++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a4390f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +xoat +xoat-debug diff --git a/README.md b/README.md index db4ef0c..4342ecc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ xoat ==== +Fork of [seanpringle](https://github.com/seanpringle)/[xoat](https://github.com/seanpringle/xoat) + *X Obstinate Asymmetric Tiler* * Designed for wide screens, including multi-head support. diff --git a/event.c b/event.c index 4608ff7..ea648f8 100644 --- a/event.c +++ b/event.c @@ -102,7 +102,8 @@ void map_notify(XEvent *e) { client_raise_family(c); client_update_border(c); - client_set_focus(c); + if (!c->menu) // Only set focus if it's not a menu/popup + client_set_focus(c); client_free(a); ewmh_client_list(); update_bars(); @@ -113,12 +114,14 @@ void map_notify(XEvent *e) void unmap_notify(XEvent *e) { - // if this window was focused, find something else - if (e->xunmap.window == current && !spot_focus_top_window(current_spot, current_mon, current)) + Client *c = window_build_client(e->xunmap.window); + // if this window was focused, and it's not a menu/popup, find something else + if (c && !c->menu && e->xunmap.window == current && !spot_focus_top_window(current_spot, current_mon, current)) { int i; for_spots(i) if (spot_focus_top_window(i, current_mon, current)) break; } + client_free(c); ewmh_client_list(); update_bars(); menu_update();