Add deactivate-unfocused-windows debug flag (#1706)

* force xdg deactivation on invisable workspaces

This debug option provides a workaround for many Chromium-based chat
applications that fail to show notifications when they're active in
a workspace that's not currently visible and don't have keyboard focus

Signed-off-by: Alex Yosifov <sashomasho@gmail.com>

* fixes

---------

Signed-off-by: Alex Yosifov <sashomasho@gmail.com>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
This commit is contained in:
sashomasho
2025-06-11 09:05:14 +03:00
committed by GitHub
parent 0407ac5e4c
commit 8d7b22d1a8
6 changed files with 42 additions and 12 deletions
+18 -1
View File
@@ -28,8 +28,9 @@ debug {
keep-laptop-panel-on-when-lid-is-closed
disable-monitor-names
strict-new-window-focus-policy
honor-xdg-activation-with-invalid-serial
honor-xdg-activation-with-invalid-serial
skip-cursor-only-updates-during-vrr
deactivate-unfocused-windows
}
binds {
@@ -292,6 +293,22 @@ debug {
}
```
### `deactivate-unfocused-windows`
<sup>Since: next release</sup>
Some clients (notably, Chromium- and Electron-based, like Teams or Slack) erroneously use the Activated xdg window state instead of keyboard focus for things like deciding whether to send notifications for new messages, or for picking where to show an IME popup.
Niri keeps the Activated state on unfocused workspaces and invisible tabbed windows (to reduce unwanted animations), surfacing bugs in these applications.
Set this debug flag to work around these problems.
It will cause niri to drop the Activated state for all unfocused windows.
```kdl
debug {
deactivate-unfocused-windows
}
```
### Key Bindings
These are not debug options, but rather key bindings.