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

Weird editor window behavior in Gnome Wayland with "prefer wayland" and editor scale different than 100% #93788

Closed
Tracked by #88346
eobet opened this issue Jun 30, 2024 · 8 comments

Comments

@eobet
Copy link
Contributor

eobet commented Jun 30, 2024

Tested versions

4.3 beta 2

System information

Godot v4.3.beta2 - Nobara Linux 40 (GNOME Edition) - Wayland - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3050 Ti Laptop GPU - 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 Threads)

Some more system details:

Host: Surface Laptop Studio (124I:000)
Kernel: Linux 6.8.12-200.fsync.fc40.x4
Display (LQ144P1JX01): 2400x1600 @ 12]
DE: GNOME 46.2
WM: Mutter (Wayland)

Issue description

With "prefer wayland" the editor window:

  1. becomes too large for the screen (title off-center and close buttons off-screen)
  2. can only be resized up in either direction, can't be resized down from its initial large size
  3. doesn't maximize when dragged to the top of the screen
  4. maximize button only changes window title bar look in place, doesn't actually maximize anything

Maybe @Riteo knows what's going on?

image

image

Steps to reproduce

Just learned about the "prefer wayland" setting and tried it...

I do have 175% display scaling, and the Godot project launcher sees this.

Minimal reproduction project (MRP)

No need, just create an empty project, enable the setting (even if it already appears enabled) and restart the editor.

@eobet
Copy link
Contributor Author

eobet commented Jun 30, 2024

Also, I just noticed that I'm using a 3rd party add-on which adds a new tab/workspace next to the 2D/3D/Script/Assetlib button row and it doesn't display correctly as well... (I'm checking with that add-on developer too, though).

EDIT: Like with the other issues, forcing the editor's display scale to 100% fixes the add-on icon too!

@eobet
Copy link
Contributor Author

eobet commented Jun 30, 2024

Testing a little bit more... changing the "custom display scale" editor interface setting does literally nothing, but changing the "display scale" editor interface setting to 100% (instead of "auto") restores correct window behavior.

Unfortunately, text is now too small for me to be able to read. 😅

@Riteo
Copy link
Contributor

Riteo commented Jun 30, 2024

Thank you for testing!

but changing the "display scale" editor interface setting to 100% (instead of "auto") restores correct window behavior.

Umh, interesting, thank you for the details! I'll update the issue title to clarify this if you don't mind and add this to the Wayland tracker. I'll take a look soon!

@Riteo Riteo changed the title Weird editor window behavior in Gnome Wayland with "prefer wayland". Weird editor window behavior in Gnome Wayland with "prefer wayland" and editor scale different than 100% Jun 30, 2024
@Riteo Riteo added this to the 4.3 milestone Jun 30, 2024
@Riteo
Copy link
Contributor

Riteo commented Jun 30, 2024

I think I have an idea for the size thing. Could you please attach (as a file, thing's big) a verbose log with WAYLAND_DEBUG=1?

here's a sample command:

WAYLAND_DEBUG=1 godot --verbose path/to/project-file.project > debug.log 2>&1

@eobet
Copy link
Contributor Author

eobet commented Jun 30, 2024

I must admit I'm a bit unfamiliar with Linux and all my paths have spaces in them, but I think I managed finally. Please let me know if this worked.
wayland-debug.log

@eobet
Copy link
Contributor Author

eobet commented Jun 30, 2024

Hmm... I'm switching back and forth to test things, and managed to get a very similar behavior now with the setting disabled... also, Godot now thinks that Auto is 100% even though it should be 175%...

image
image

Was it me who set the editor to 175% at one point and forgot about it and the auto setting isn't, in fact, hooked up to the Linux setting as I thought?

@Riteo
Copy link
Contributor

Riteo commented Jul 2, 2024

I looked at the debug log and I couldn't notice anything off.

The only thing that looks ever-so-slightly-off is that the client-side decorations, handled by libdecor, use regular integer scaling which, paired with fractional scaling, might confuse the compositor.

hooked up to the Linux setting as I thought?

It is, with some buts.

Due to an engine limitation, auto scale is picked only at startup. Also, fractional scales are only selected if you have a single screen, otherwise it picks up its integer counterpart, rounded up (eg. 125% becomes 200%).

Again, this is mostly due to limitations here and here which will eventually be fixed, either due to the engine or the API that the backend must expose.

Edit: shoot I pressed enter too early. This will do for now, I'll update you if I find more :)

@eobet
Copy link
Contributor Author

eobet commented Aug 3, 2024

Not sure if my latest system update or rc3 fixed this, but it appears fixed? 🥳

Godot v4.3.rc2 - Nobara Linux 40 (GNOME Edition) - Wayland - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3050 Ti Laptop GPU - 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 Threads)

@eobet eobet closed this as completed Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants