Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial window size inconsistent on Sway #6463

Open
carlinigraphy opened this issue Dec 6, 2024 · 0 comments
Open

Initial window size inconsistent on Sway #6463

carlinigraphy opened this issue Dec 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@carlinigraphy
Copy link

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Sway

WezTerm version

20241205-083533-6f375e29

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Spawning a new wezterm window, and setting an initial size via sway configuration, results in flickering & inconsistent window dimensions.

1 of 3 states will occur:

  1. Window opens with 1x1 dimensions (plus padding)
  2. Window opens with expected dimensions, then immediately resizes to 1x1
  3. Window opens with expected dimensions

Screencast
https://github.com/user-attachments/assets/b62fb587-0a55-4c7d-b007-058aa95742a8

In this video, I have a key bound to...

wezterm start --class my_float fzf

...which I am repeatedly launching.

As observed, for the first 6-7s, state 1 occurs; the window is set to its minimum dimensions. Afterwards, we see an instance of the intended state 3, followed by the flickering of state 2.

I have confirmed the issue is not present with other floating windows on sway, including other terminal emulators, though I have not tested on other compositors / window managers.

To Reproduce

Run Wayland, download sway, use the default configuration, append this:

for_window [app_id="my_float"] floating enable, resize set 400 400

Note

It's not strictly necessary to set specific dimensions through sway. The behavior of "fighting" for dimensions is present nonetheless. It does make it easier to determine if sway is attempting to set window dimensions though. Hence setting to a square.

Open a new wezterm window with

wezterm start --class my_float fzf

Easier when bound to a key. Can test repeatedly and quickly. Same reason I was running fzf. Trivial to press <esc> to close and try again.

Configuration

return {}

Expected Behavior

wezterm should open as a floating window, and resize either to

  1. the dimensions set by sway (if applicable), or
  2. the dimensions specified by initial_cols / initial_rows.

Logs

No debug lines in all 3 of the cases described above.

Debug Overlay
wezterm version: 20240203-110809-5046fc22 x86_64-unknown-linux-gnu
Window Environment: Wayland
Lua Version: Lua 5.4
OpenGL: Mesa Intel(R) Graphics (MTL) 4.6 (Compatibility Profile) Mesa 24.2.7-arch1.1
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
>

Anything else?

No response

@carlinigraphy carlinigraphy added the bug Something isn't working label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant