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

Add node window shrinks down really small with non-standard scaling (120%) on KDE Wayland (DisplayServer regression) #75515

Open
Tracked by #78581
mak448a opened this issue Mar 31, 2023 · 14 comments

Comments

@mak448a
Copy link

mak448a commented Mar 31, 2023

Godot version

4.01

System information

Fedora 37, Wayland, 125% scaling on monitor

Issue description

The add node window scales down until it's super tiny.

Steps to reproduce

Set desktop scaling to 125% on KDE Plasma Wayland, and then try adding a node. This isn't reproducible when you have desktop scaling at 100%.

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Apr 1, 2023

Can you take a screenshot of the editor window at 100% scale and 125% scale respectively?

Godot features its own scaling system, so you should tell the desktop environment not to scale the window and use the Display Scale editor setting instead.

@BiosElement
Copy link

Assuming this is the same bug, It actually opens at the right size, but then the bottom window collapses upward until it reaches a minimum height. This is just like resizing a window, but without user input.

I've recorded a video of what is occurring here: https://www.youtube.com/watch?v=Ceh5FRDW_8w

@Calinou
Copy link
Member

Calinou commented Apr 1, 2023

Enabling Single Window Mode in the editor settings most likely works around the issue. Using a X11 session can probably be done to work around the issue too.

@Calinou Calinou changed the title Add node window shrinks down really small with 125% scaling on KDE Wayland Add node window shrinks down really small with 125% scaling on KDE Wayland (DisplayServer regression) Apr 1, 2023
@BiosElement
Copy link

BiosElement commented Apr 2, 2023

Enabling Single Window Mode in the editor settings most likely works around the issue. Using a X11 session can probably be done to work around the issue too.

I can confirm single window mode is a valid workaround. This bug does not appear for me when using X11 so it seems isolated to Wayland.

@nightblade9
Copy link
Contributor

nightblade9 commented May 13, 2023

Same issue here, with the same work-around (single window mode) for me. Albeit my window shrinks a lot faster than yours @BiosElement 😂

I'm on Manjaro (Arch-based) with KDE.

@Riteo
Copy link
Contributor

Riteo commented Jun 26, 2023

Yeah this is definitely related to XWayland, it has no scale awareness.

I'm adding it to #78581.

@mak448a
Copy link
Author

mak448a commented Nov 28, 2023

It's fixed!

@mak448a mak448a closed this as completed Nov 28, 2023
@akien-mga akien-mga added this to the 4.2 milestone Nov 28, 2023
@romlok
Copy link
Contributor

romlok commented Jan 15, 2024

Was this actually fixed? I've just started using Wayland and am still seeing this behaviour with v4.2.1.stable.official [b09f793] - even when first opening the project manager. 😕

2024-01-15.16-57-29.mp4

I don't see any PRs linked to this issue, so was the original reporter mistaken about it getting fixed, or has there been a regression?

@mak448a
Copy link
Author

mak448a commented Jan 16, 2024

It still works fine for me. But I'll reopen the issue for you.

@mak448a mak448a reopened this Jan 16, 2024
@akien-mga akien-mga removed this from the 4.2 milestone Jan 16, 2024
@romlok
Copy link
Contributor

romlok commented Jan 21, 2024

FWIW, it seems the trigger for this happening to the project manager was that I had changed my KDE Plasma theme to have window borders - "normal" width instead of the Breeze default of none at all. I switched the borders back to default and the project manager stays at the size it opens.

Though I do still get the incredible shrinking "Add node" dialog when not in single-window mode.

I also noticed that for me the main Godot window will slightly shrink vertically every time a scene gets saved - also when in single window mode. However, one can just resize the window back up again (it doesn't show the same buggy resizing behaviour as the add node dialog).

FTR:
v4.2.1.stable.official [b09f793]
Godot v4.2.1.stable - Debian GNU/Linux trixie/sid trixie - Wayland - Vulkan (Mobile) - dedicated AMD Radeon RX 7600 (RADV GFX1102) () - AMD Ryzen 5 7600 6-Core Processor (12 Threads)

@mak448a
Copy link
Author

mak448a commented Feb 15, 2024

@romlok What's your scaling set to?

@akien-mga
Copy link
Member

akien-mga commented Feb 15, 2024

I ran into this issue too when setting up a new laptop with KDE Wayland on Fedora 39.

The problem came from using a non-standard scaling factor of 140% in Plasma, with a 2K 16" screen. When I changed it back to 150%, it solved the issue.

@hpvb suggested this was likely an accumulation of division errors or rounding.

We are probably recalculating the the render and display sizes every frame
We probably need to just cache the results of the current settings, and only actually change anything if anything has changed
Simple struct with the window size, render size, and scale per window
And only recalculating and doing anything when the inputs change
Probably would help with other platforms too

@romlok
Copy link
Contributor

romlok commented Feb 15, 2024

@romlok What's your scaling set to?

Huh. I thought it was at 125%, but I just checked and it was set at 120%.
So it indeed seems related to a "non-standard" value, since the add node dialog behaves itself at 125% for me!

@mak448a
Copy link
Author

mak448a commented Feb 15, 2024

Huh. I can't reproduce the add node dialog bug even at 120%.

@mak448a mak448a changed the title Add node window shrinks down really small with 125% scaling on KDE Wayland (DisplayServer regression) Add node window shrinks down really small with non-standard scaling (120%) on KDE Wayland (DisplayServer regression) Jul 10, 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

7 participants