Hyprland
Hyprland copied to clipboard
Some apps don't get focus when spawned with on-created-empty
Hyprland Version
System/Version info
xwayland-rewrite branchHyprland, built from branch at commit cb80ea4005dc23d52970b441946b3ae775c96b3d ().
Date: 2024-05-24
Tag: , commits:
flags: (if any)
Bug or Regression?
Bug
Description
Some apps don't get focus when they are spawned with the on-created-empty workspace rule. I seem to be able to consistently reproduce this with foot, while it doesn't happen with spotify (native wayland backend).
How to reproduce
- Have these 2 lines in your config:
workspace=special:terminal, on-created-empty:foot
bind=SUPER, d, togglespecialworkspace, terminal"
- Press the keybind (SUPER+d in the case of my example)
- Don't move your mouse if you have
follow_mouse=1
Crash reports, logs, images, videos
https://github.com/hyprwm/Hyprland/assets/55629891/69fdb3be-b1f8-4217-9a6b-cd1148d402c1
I have had this bug with Alacritty using the following config:
workspace = special:terminal, on-created-empty:alacritty
bind = $mainMod SHIFT, C, togglespecialworkspace, terminal
Its happening on both Hyprland 0.40.0 and a freshly built Hyprland from git commit 553232a3. I don't know if the bug exists with previous Hyprland versions, because I have been using Hyprland for about 1 week.
Edit: The workaround mentioned below works, but initial workspace tracking seems like a useful feature in some cases.
https://github.com/hyprwm/Hyprland/issues/6038#issuecomment-2106261311
Same thing happens to me with kitty, and I also notice that with initial_workspace_tracking=1, launching pavucontrol always opens on the workspace with ID=1, but only the first time: if I close and reopen it, it spawns on the focused workspace instead. I once noticed the same thing with a password popup (I think from the KDE polkit) opened by Thunar when I tried to mount a partition.
I don't know if the bug exists with previous Hyprland versions
Kitty terminal created using on-created-empty focuses correctly on version 0.39.1 but not on v0.40.0
Can anyone check if this fixes the issue? #7657
Can anyone check if this fixes the issue? #7657
Fixes it for me.