clear _NET_ACTIVE_WINDOW when focusing empty monitor
- SHA
7c141d58a637559b3938b93deacfb685b0526b82- Parents
-
44630cf - Tree
39ea813
7c141d5
7c141d58a637559b3938b93deacfb685b0526b8244630cf
39ea813| Status | File | + | - |
|---|---|---|---|
| M |
gar/src/x11/events.rs
|
3 | 1 |
gar/src/x11/events.rsmodified@@ -2206,6 +2206,7 @@ impl WindowManager { | ||
| 2206 | 2206 | } else { |
| 2207 | 2207 | // No windows on target monitor - clear focus and warp to monitor center |
| 2208 | 2208 | self.focused_window = None; |
| 2209 | + self.conn.set_active_window(None)?; | |
| 2209 | 2210 | self.warp_to_monitor(target_idx)?; |
| 2210 | 2211 | tracing::debug!("No windows on monitor {}, warped to center", target_idx); |
| 2211 | 2212 | } |
@@ -3103,8 +3104,9 @@ impl WindowManager { | ||
| 3103 | 3104 | // set_focus handles grab/ungrab for old and new windows |
| 3104 | 3105 | self.set_focus(window, true)?; |
| 3105 | 3106 | } else { |
| 3106 | - // No windows - warp to monitor center | |
| 3107 | + // No windows - clear EWMH active window and warp to monitor center | |
| 3107 | 3108 | self.focused_window = None; |
| 3109 | + self.conn.set_active_window(None)?; | |
| 3108 | 3110 | self.warp_to_monitor(target_idx)?; |
| 3109 | 3111 | } |
| 3110 | 3112 | |