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

Wrong popups/tooltips offset in the editor (DisplayServer regression) #45740

Closed
nonunknown opened this issue Feb 5, 2021 · 7 comments · Fixed by #54645
Closed

Wrong popups/tooltips offset in the editor (DisplayServer regression) #45740

nonunknown opened this issue Feb 5, 2021 · 7 comments · Fixed by #54645

Comments

@nonunknown
Copy link
Contributor

nonunknown commented Feb 5, 2021


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version:
image

OS/device including version:
Windows 10 x64
Using Vulkan Device #0: AMD - AMD Radeon R7 200 Series

Issue description:
When you click any tab (Project,Scene,Debug) or even right click to add node the popup appears far away form mouse:
image

Steps to reproduce:
Just interact with engine itself

Workaround
minimize window and maximize again!

@awalone995
Copy link

happens only with custom zoom ftw

@KoBeWi
Copy link
Member

KoBeWi commented Feb 6, 2021

Related to #45200
This issue goes away when you resize the window.

@sunkper
Copy link

sunkper commented May 10, 2021

I experienced this issue with the default setting. (Windows 10, RX 570). Also can confirm that it goes away when I resize the window.

I found that this only happens when the editor loses focus while it is opening a project (i.e. I alt+tab to other windows while waiting). If the Godot is still focused while loading a project this does not happen.

@Calinou Calinou changed the title [Godot 4] Wrong Popups offset Wrong Popups offset in the editor (DisplayServer regression) May 26, 2021
@mhilbrunner
Copy link
Member

I also experience this with default settings on Windows 10 with current master (b1eee24).

I can reproduce this every time like in previous comments: open Godot, while a project loads switch focus to another window, wait, voilá, offsets are all weird. :)

@foxydevloper
Copy link
Contributor

foxydevloper commented Jul 27, 2021

I noticed that it's offset by the same offset that the project manager opens up offset by. Dragging the project manager around before opening a project doesn't affect this offset though.

1440p monitor

Popup Offset Project Manager Offset
image image

1080p monitor

Popup Offset Project Manager Offset
image image

The 20 px difference might be due to the height of Godot's window title bar
image

@MatteoPiovanelli-Laser
Copy link

Windows 10. d6f972f
I'm trying to figure this out.
After a few steps I got to (and similar lines if I'm trying to click on the FileSystem dock):

tree_popup->set_position(tree->get_screen_position() + p_pos);

The call to tree->get_screen_position() there is returning the odd values.
Following deeper
global_pos += w->get_position();

w->get_position() seems to be the call that leads to the bad offset values.

When the editor window is resized, everything starts going to the right positions. My guess would be that

void Window::_rect_changed_callback(const Rect2i &p_callback) {
gets called and finally sets the right position for the window.

Could it be that a call to that is being "skipped" with the repro steps described in the comments above?

@nathanfranke
Copy link
Contributor

Still reproducible somewhat on v4.0.alpha.custom_build [afdae67], only in single window mode

On my left monitor (1080p):

image
image

On my middle monitor (1440p):

image
image

Menus are always displayed correctly for me though:
image


Project manager is also offset, but not by the same offset as any of the tooltips

image

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

Successfully merging a pull request may close this issue.

9 participants