hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.93k stars 849 forks source link

Floating window refocuses randomly #3443

Open esatgundogdu opened 1 year ago

esatgundogdu commented 1 year ago

Hyprland Version

Hyprland, built from branch at commit 96d555e8e794627bfc561e294e148ab8a9961fcc dirty (). Tag: v0.29.1 flags: (if any)

Bug or Regression?

Bug

Description

I use Firefox's "Picture-in-Picture" mode to watch videos on YouTube etc. I use it as pinned floating window when I am coding on Android Studio. When I'm typing keys, suddenly picture-in-picture window gets focused randomly. This is not happening all the time I type a key but after like 15-20 secs typing it happens. I don't know how to debug this and understand what is the problem so I would be happy if you advice some debugging methods.

Here below are my picture-in-picture window configs:

windowrulev2 = float, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = pin, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = nofullscreenrequest, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = nomaximizerequest, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = size 470 265, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = move 1420 785, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = noanim, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = keepaspectratio, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = bordersize 1, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = noshadow, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = nodim, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = noinitialfocus, class:(firefox), title:^(Firefox|Picture-in-Picture)$
windowrulev2 = bordercolor rgb(ffccaa), class:(firefox), title:^(Firefox|Picture-in-Picture)$

I set the title as "^(Firefox|Picture-in-Picture)$" because pic-in-pic window appears with "Firefox" initial title sometimes.

How to reproduce

I don't think that this happens with every window. For example, when I'm reporting this issue, the same picture-in-picture window is active and I have no problems with it. But when I switch to Android Studio and try to code, it focuses picture-in-picture window randomly. This problem may be something specific with Firefox Picture-in-Picture or maybe with XWayland windows. So trying Firefox picture-in-picture window with my config on top of some XWayland application may work.

Crash reports, logs, images, videos

No response

vaxerski commented 1 year ago

do you have misc:focus_on_activate enabled? if so, what if you disable it?

esatgundogdu commented 1 year ago

No, it was set as default. Now I tried both setting it enabled and disabled but nothing changed.

ashdevelops commented 6 months ago

Still an issue

izmyname commented 2 weeks ago

As a workaround - windowrulev2=dimaround, floating:1 forces the focus on the last opened floating window and prevents refocusing.