Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Some apps don't get focus when spawned with on-created-empty

Open diniamo opened this issue 1 year ago • 2 comments

Hyprland Version

System/Version info xwayland-rewrite branch
Hyprland, 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

  1. Have these 2 lines in your config:
workspace=special:terminal, on-created-empty:foot
bind=SUPER, d, togglespecialworkspace, terminal"
  1. Press the keybind (SUPER+d in the case of my example)
  2. 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

diniamo avatar May 25 '24 17:05 diniamo

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.

Cloudperry avatar May 25 '24 22:05 Cloudperry

https://github.com/hyprwm/Hyprland/issues/6038#issuecomment-2106261311

Agent00Ming avatar May 25 '24 22:05 Agent00Ming

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.

zjeffer avatar May 27 '24 18:05 zjeffer

#6038 (comment)

Damn, that issue shouldn't have been closed though, so I'm keeping this one open.

diniamo avatar May 27 '24 20:05 diniamo

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

MidHunterX avatar May 31 '24 11:05 MidHunterX

Can anyone check if this fixes the issue? #7657

sungyoonc avatar Sep 05 '24 07:09 sungyoonc

Can anyone check if this fixes the issue? #7657

Fixes it for me.

limbonaut avatar Sep 05 '24 12:09 limbonaut