Replies: 1 comment
-
xdg-activation has two distinct purposes: giving focus to another client (think clicking a link in the terminal => the browser should get focus) and urgency. Right now only the former is implemented. You're asking for urgency, which I am planning to implement later (it's a bit more involved). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, #30 added support for xdg-activation-v1 (https://wayland.app/protocols/xdg-activation-v1), but the functionality seems to be "applications that prepare for the action while they have keyboard focus can then within 10 seconds make themselves visible", or something like that? bc3d6ca
That's pretty far from what us old school neckbeards expect. The historical behavior has been "guide user to window", with the guidance being persistent until the user reacts to it. See e.g. https://docs.rs/winit/latest/winit/window/enum.UserAttentionType.html discussion on how Windows flashes the taskbar entry for the application until the user reacts to it; similarly X11 environments generally highlighted the window in some way until it gained focus.
Could we pretty please have an activation that's a persistent guide until the user chooses to react?
I think the usual rendering is changing border color (like focus-ring inactive-color) and setting a flag on the any workspace that contains any windows with this active. I believe Sway highlights all windows -- and the workspaces that contain them -- that are requesting attention.
Here's my use case:
$ thing_that_takes_a_long_time; printf '\a'
On some days, I have dozens of those running concurrently. I don't want them to force focus on themselves; I want them to sit patiently until I have time to deal with them. Consider 10 such notifications happening while I'm on a break.
The bell will make the terminal mark itself as "worthy of attention". Back in the day that was X11 "urgent" flag, these days e.g. alacritty uses xdg-activation-v1
https://github.com/alacritty/alacritty/blob/0d4ab7bca43213d96ddfe40048fc0f922543c6f8/alacritty/src/display/window.rs#L336-L340 via https://docs.rs/winit/latest/winit/window/struct.Window.html#method.request_user_attention -- see also alacritty/alacritty#181
Beta Was this translation helpful? Give feedback.
All reactions