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

Popup hit boxes in wrong location with a window stretch mode enabled #59610

Closed
voylin opened this issue Mar 28, 2022 · 6 comments
Closed

Popup hit boxes in wrong location with a window stretch mode enabled #59610

voylin opened this issue Mar 28, 2022 · 6 comments

Comments

@voylin
Copy link
Contributor

voylin commented Mar 28, 2022

Godot version

4.0.alpha5

System information

Arch (Linux-lts 5.15.30-1)

Issue description

So I load an instance of a scene with an OptionButton.
But when I want to click on options from a MenuButton or OptionMenu, it fails to register. After a lot of testing and trying I finally figured out what the problem is.

If you don't put the window in fullscreen of let the window take up all the space on the screen, than the hitboxes for the popup are in the wrong location, as can be seen in my screenshot. My mouse is off to the right where the hitboxes would be if it would be in full window.

IMG_20220328_104732635

Now, I am not certain if this is a tiled window manager issue or a general issue, but it still does not work even if I put it in floating window mode

Steps to reproduce

Edit 2022-03-28 12:34:
Create an OptionButton or MenuButton and add it as a child through scripts.

Minimal reproduction project

TestRoom.tar.gz

@Rindbee
Copy link
Contributor

Rindbee commented Mar 28, 2022

It looks like i3-wm, I use it too.

But I'm sorry, I can not reproduce this issue in i3-wm. Maybe you should provide a small project with this issue.

@voylin
Copy link
Contributor Author

voylin commented Mar 28, 2022

It looks like i3-wm, I use it too.

But I'm sorry, I can not reproduce this issue in i3-wm. Maybe you should provide a small project with this issue.

Sorry about that, it took me some time to replicate it. It appears to only happen when loading in a scene with an option button. I attached a small project that has this issue.

@Rindbee
Copy link
Contributor

Rindbee commented Mar 28, 2022

In your provided project, the problem seems to be caused by the modified display/window/stretch/mode in the ProjectSettings.

I remember that there used to be instructions for the relevant modes here, but I can't seem to find them now.

@Chaosus Chaosus added this to the 4.0 milestone Mar 28, 2022
@bruvzg
Copy link
Member

bruvzg commented Mar 28, 2022

The demo is running with embedded subwindows enabled, so it is not dependent on Window manager and platform. I can reproduce it on macOS as well, but only after the window is resized.

In your provided project, the problem seems to be caused by the modified display/window/stretch/mode in the ProjectSettings.

Seems like it is the case, probably strech mode is not taken into account by window transform for embedded windows.

@voylin voylin changed the title Popup hit boxes in wrong location when screen isn't full window/fullscreen Popup hit boxes in wrong location with a window stretch mode enabled Mar 28, 2022
@voylin
Copy link
Contributor Author

voylin commented Mar 28, 2022

Yep, that's indeed the culprit. The moment I select any of those modes the problem happens. I do this mainly for UI Scaling, so fine for now but this is really a bug which should be fixed.

I think this has to do that the popup is part of the window node?

@Sauermann
Copy link
Contributor

Looks like a duplicate of #59573.
It will get fixed by #59118 or #59310.

@Calinou Calinou modified the milestone: 4.0 Mar 28, 2022
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