dnkl/foot
41
2.0k
Fork
You've already forked foot
243

Unpleasant window "pop-out" when launching on Sway #1133

Closed
opened 2022年07月31日 13:22:51 +02:00 by j-piecuch · 5 comments

I'm using Arch Linux with Sway 1.7. I have a multi-monitor setup.
foot version: 1.12.1-2

When the screen I'm opening foot on has (0,0) position, foot starts up nicely without any glitches/artifacts, as can be seen in foot-good.mp4.
When I move the same screen to a different position using wdisplays, a noticeable "pop-out" effect appears, which can be seen in foot-bad.mp4. It looks like when the window is created, it has a smaller size for a very short time, and then it's resized to the proper size.

I can't reproduce this with alacritty: see alacritty.mp4.

I'm using Arch Linux with Sway 1.7. I have a multi-monitor setup.\ foot version: 1.12.1-2 When the screen I'm opening foot on has (0,0) position, foot starts up nicely without any glitches/artifacts, as can be seen in foot-good.mp4. When I move the same screen to a different position using wdisplays, a noticeable "pop-out" effect appears, which can be seen in foot-bad.mp4. It looks like when the window is created, it has a smaller size for a very short time, and then it's resized to the proper size. I can't reproduce this with alacritty: see alacritty.mp4.
Owner
Copy link

It looks like when the window is created, it has a smaller size for a very short time, and then it's resized to the proper size.

That's exactly what's happening. The issue is a Sway "bug" (or feature, if you like). Sway always tells all applications to first set their own size, and then they are assigned their tiled size. Nothing we can do about .

I can't reproduce this with alacritty: see alacritty.mp4.

May be because Alacritty is slow to launch, and never have time to render the intermediate frame where the size is "too small".

> It looks like when the window is created, it has a smaller size for a very short time, and then it's resized to the proper size. That's exactly what's happening. The issue is a Sway "bug" (or feature, if you like). Sway **always** tells all applications to first set their own size, and _then_ they are assigned their tiled size. Nothing we can do about . > I can't reproduce this with alacritty: see alacritty.mp4. May be because Alacritty is slow to launch, and never have time to render the intermediate frame where the size is "too small".
dnkl 2022年07月31日 13:27:33 +02:00
  • closed this issue
  • added the
    not-a-bug
    label

FWIW, to test your hypothesis about foot being "too fast" I tried some other Wayland terminal emulators that are fairly minimal (and hence should be fast): havoc and wayst, and I couldn't reproduce this issue with either one.

FWIW, to test your hypothesis about foot being "too fast" I tried some other Wayland terminal emulators that are fairly minimal (and hence _should_ be fast): havoc and wayst, and I couldn't reproduce this issue with either one.

Can confirm this issue. Also happens to me on whatever monitor I move to non (0,0) position. And as @j-piecuch said, I see no noticeable difference between foot and havoc launching on (0,0) monitor, but there's real difference between them on a secondary monitor. Havoc is as instant as it's on the primary, (0,0) monitor, while foot lags a bit, as can be seen in @j-piecuch's videos.

That's exactly what's happening. The issue is a Sway "bug" (or feature, if you like). Sway always tells all applications to first set their own size, and then they are assigned their tiled size. Nothing we can do about .

Why does it only happen on non (0,0) monitors, though?

Can confirm this issue. Also happens to me on whatever monitor I move to non (0,0) position. And as @j-piecuch said, I see no noticeable difference between foot and havoc launching on (0,0) monitor, but there's real difference between them on a secondary monitor. Havoc is as instant as it's on the primary, (0,0) monitor, while foot lags a bit, as can be seen in @j-piecuch's videos. > That's exactly what's happening. The issue is a Sway "bug" (or feature, if you like). Sway always tells all applications to first set their own size, and then they are assigned their tiled size. Nothing we can do about . Why does it only happen on non (0,0) monitors, though?
Owner
Copy link

Why does it only happen on non (0,0) monitors, though?

It doesn't. The 0,0 configure event happens all the time, every time. But you need to understand this is timing related. Some applications will never be affected, some will always, and others will be affected "sometimes", or even depending on which monitor they'r e on.

In this case, it might be related to foot's DPI awareness. On a multi-monitor system, foot has no way of known which monitor it will appear on, and thus has no way of knowing which DPI to use. It only knows this after it has been mapped. Foot will do its best to guess which DPI to use, but if it guesses wrong, it'll have to readjust after having been mapped (i.e. window becomes visible).

Note that the above has nothing to do with the window size. But, it could mean foot renders one "extra" frame at the "wrong" size (due to the 0,0 configure event from Sway), causing just enough delay for the effect to be visible. You could try setting dpi-aware=no in foot.ini, and see if the glitch goes away.

Fact remains though, this is a Sway issue: https://github.com/swaywm/sway/issues/2176.

If you want something done about this, head over there and help out.

> Why does it only happen on non (0,0) monitors, though? It doesn't. The 0,0 configure event happens all the time, every time. But you need to understand this is timing related. Some applications will never be affected, some will always, and others will be affected "sometimes", or even depending on which monitor they'r e on. In this case, it **_might_** be related to foot's DPI awareness. On a multi-monitor system, foot has no way of known which monitor it will appear on, and thus has no way of knowing which DPI to use. It only knows this after it has been mapped. Foot will do its best to guess which DPI to use, but if it guesses wrong, it'll have to readjust after having been mapped (i.e. window becomes visible). Note that the above has **nothing** to do with the window size. But, it could mean foot renders one "extra" frame at the "wrong" size (due to the 0,0 configure event from Sway), causing just enough delay for the effect to be visible. You could try setting `dpi-aware=no` in `foot.ini`, and see if the glitch goes away. Fact remains though, this is a Sway issue: https://github.com/swaywm/sway/issues/2176. If you want something done about this, head over there and help out.

Thanks a lot for the explanation!

I have dpi-aware=no in my config, and it happens regardless. But you gave me an idea - if I set the initial-window-size-pixels to the monitor's resolution, the effect is not visible, so I'll use that as a workaround.

That link is very useful, thanks. I won't be able to help, but being able to track the progress is nice.

Thanks a lot for the explanation! I have `dpi-aware=no` in my config, and it happens regardless. But you gave me an idea - if I set the `initial-window-size-pixels` to the monitor's resolution, the effect is not visible, so I'll use that as a workaround. That link is very useful, thanks. I won't be able to help, but being able to track the progress is nice.
Sign in to join this conversation.
No Branch/Tag specified
master
osc-5522
sixel-heap-buffer-overflow
releases/1.27
releases/1.26
releases/1.25
releases/1.24
multi-cursor
releases/1.23
pixman-16f-2
releases/1.22
releases/1.21
releases/1.20
releases/1.19
releases/1.18
releases/1.17
releases/1.16
releases/1.15
releases/1.14
releases/1.13
releases/1.12
releases/1.11
releases/1.10
releases/1.9
releases/1.8
releases/1.7
releases/1.6
releases/1.5
releases/1.4
releases/1.3
releases/1.2
releases/1.1
releases/1.0
1.27.0
1.26.1
1.26.0
1.25.0
1.24.0
1.23.1
1.23.0
1.22.3
1.22.2
1.22.1
1.22.0
1.21.0
1.20.2
1.20.1
1.20.0
1.19.0
1.18.1
1.18.0
1.17.2
1.17.1
1.17.0
1.16.2
1.16.1
1.16.0
1.15.3
1.15.2
1.15.1
1.15.0
1.14.0
1.13.1
1.13.0
1.12.1
1.12.0
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.9.2
1.9.1
1.9.0
1.8.2
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
0.9.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/foot#1133
Reference in a new issue
dnkl/foot
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?