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_centered() not centered (usually offscreen) #67002

Closed
benbusby opened this issue Oct 6, 2022 · 4 comments
Closed

popup_centered() not centered (usually offscreen) #67002

benbusby opened this issue Oct 6, 2022 · 4 comments

Comments

@benbusby
Copy link
Contributor

benbusby commented Oct 6, 2022

Godot version

v4.0.beta2.official [f8745f2]

System information

macOS 12.6

Issue description

Using popup_centered() to open a FileDialog does not center the dialog, but instead always places it in the same place nearly offscreen. This also applies to popups within the FileDialog itself, such as the file type menu.

I also see the following error:

E 0:00:01:0620   _on_button_pressed: Window 0 spawned at invalid position: (764, 459).
  <C++ Source>   scene/main/window.cpp:1270 @ popup()
  <Stack Trace>  demo-button.gd:6 @ _on_button_pressed()

Screenshots:

Screen Shot 2022-10-06 at 3 05 39 PM
Screen Shot 2022-10-06 at 3 12 09 PM

Steps to reproduce

If using the attached reproduction project:

  1. Open the attached project and run the scene
  2. Click the button to open the file dialog
  3. Notice that it isn't centered, and dialogs within the FileDialog are also placed in random areas.

If re-creating from scratch:

  1. Create a scene with a Button and FileDialog
  2. Attach a signal to open the FileDialog using the button's pressed signal
  3. Follow the same steps for attached project

Minimal reproduction project

filebrowserbug.zip

@harrisyu
Copy link
Contributor

harrisyu commented Oct 7, 2022

I have same problem in project manager, maybe it's cause by multi-monitor setting in windows.

@slmnll
Copy link

slmnll commented Oct 7, 2022

I have same problem on my mac as well. It occurs when the game window is placed in a sub-monitor in my case.
I wonder if this matter relates with #61785 .

@Cykyrios
Copy link
Contributor

Cykyrios commented Oct 7, 2022

This should be fixed by #66712, which will be in beta3.

@benbusby
Copy link
Contributor Author

It does appear that #66712 fixed the issue -- I'm no longer seeing the bug in beta3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants