Skip to content

New windows in inactive workspaces stealing focus #565

Description

@rrredface

To reproduce:
One way is to first make sure you have a window rule assigning whatever browser you use to a specific workspace. I have these rules:

windowrule = workspace 1 silent,^(librewolf)$
windowrule = workspace 1 silent,^(firefox)$

Then you can go to this page, give it permission to display notifications, then click show in 5s. Switch to a fullscreen window in a different workspace, wait the 5 seconds for the notification window to open, and the active window will then be un-fullscreened.

Another way is by opening a terminal window and running something like this:

sleep 5; pavucontrol

And then again, switch to a fullscreen window in any workspace other than the one to which pavucontrol (or whatever program you choose to run) is assigned.
I have this window rule:

windowrule = workspace 4 silent,^(pavucontrol)$

Expected behavior:
If a workspace windowrule contains silent then matching windows should not get focus, unless that window's workspace is already the active one.

Actual behavior:
If the new window is in the same workspace as the focused one, that new window gets focus and the previous one does not get it back. I would say that's pretty normal behavior. When the new window opens in a different workspace, it seems to steal it momentarily and then give it right back to the previously focused window. The previously focused window regains focus whether follow_mouse is enabled or disabled.

I'm running both Hyprland and wlroots built from source, cloned less than an hour before posting this issue so I'm up to date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions