sway
sway copied to clipboard
Floating window rule affects other windows
-
Sway Version:
- 1.8-dev-2dace6b8 (upgraded to check if the bug still happens [it does])
- 1.7 (version I was actually using)
-
Debug Log:
- https://gist.github.com/arrudagates/82546a6f2d55008bd5c895acc77caeb6#file-sway-log
-
Configuration File:
- Irrelevant with default config, bug is related to specific floating window rules
- https://gist.github.com/arrudagates/82546a6f2d55008bd5c895acc77caeb6#file-sway-config
-
Stack Trace:
- Irrelevant, sway doesn't crash
-
Description:
- Have a floating rule for a Firefox popup extension like this
- With Firefox open, make the extension open, triggering the floating window
Below are images to demonstrate the issue:
Firefox before the floating window opens
Firefox affected by the floating window, which itself isn't rendering correctly either
How they should actually render (fixed by cycling float states twice on both Firefox and the extension window)
Hi ! I'm also experiencing the same issue. Not with firefox, but the rest fits perfectly.
Will add my two cents, I figured out that it happens to rules with CRITERIA using title.
Original state:
Case 1
Works correctly, as expected, uses only app_id as a CRITERIA.
The rule:
for_window [app_id="emacs"] floating enable
After I launch an app, matching the rule:
Case 2
Works incorrectly, uses title in CRITERIA.
The rule:
for_window [app_id="emacs" title="pass - Emacs Client"] floating enable
After I launch the same app, matching the rule:
After the app is killed:
This issue should get some level of priority, as it makes it impossible to have different rules for specific windows of the same app.
CC: @emersion
I'm not able to reproduce this. I use a title criteria to float a foot terminal for selecting passwords as well. It floats the terminal with the altered title and has no effect on the others.
@RPigott Can you try to reproduce it using emacs (on wayland it either requires to have xwayland or to be built with pgtk flag) or with firefox like @arrudagates mentioned?
I'll try to reproduce it on alacritty and foot.
I was able to reproduce the same issue with alacritty, but it happens rarely, in most cases floating rule just don't apply and window still tiled. Another observation if I move mouse coursor outside of newly created window float rule applies, if I move mouse inside newly created window, it doesn't. Sometimes floating get applied, but the window is not centered, but somehow shifted and have different proportions than usual.
sway 1.6.1.
1.sh:
echo -ne "\033]0;SOME TITLE HERE\007"
sh
sway/config:
for_window "[title=\"SOME TITLE HERE\"]" floating enable
for_window "[title=\".* - Emacs Client\"]" floating enable
Command I use to perform test: alacritty -e ./1.sh
Also it behaves differently if I have no other windows:
And if I have one window:
Or a few:
Reproduces on sway 1.7 and 1.8.
Hi, I have a bug probably related to this one. With rule: for_window [title="red"] floating enable, resize set 900 450, move to workspace 10
and opening specifically this website in firefox the rule apply to firefox. Also happened with certain sites in chromium.
OK, I found this where it's explained how the rule 'title=', as an regex expresion apply if it matches a part of a windows title (no wonder why this happened only in browsers). I solved it using a lot more specific title rules.
Hey all, I've been away from this issue for a bit, has anyone managed to find a workaround to solve this until it gets fixed?
Reproduces on sway 1.7 and 1.8.
Reproduces on 1.9-dev-0695f3fa
@emersion, maybe you know the possible cause of the problem?
This has been happening to me as well and for quite some time. I'm currently using sway 1.9-dev-2c0f68b7 with this window rule:
for_window [title="Extension: \(Pushbullet\).*"] floating enable
This applies to a firefox window.