-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
DisplayServer: Context menu wrong offset in code editor with single-window mode off #47217
Comments
Can you reproduce this after enabling single-window mode in the Editor Settings then restarting the editor? |
No, with single windows mode, the popup is at the right place. |
In not single-windowed mode, the menu pops up at the global screen coordinates without taking into account the fact that the editor window may not be at 0,0. I've got my windows tasks bar at the left of my screen, and it's why I get the bad offset in x coordinate. When the editor is not maximized, and the editor windows is moved into the screen, the bad offset clearly show that it's linked to editor window position in the screen. In that case, we need to add the editor window offset to the popup offset to correct the issue. |
|
Just a note which might be unrelated: Faced this issue on first compile on Windows 11 with latest master @c2a616f. |
Godot version:
4.0 master branch 07f076f
OS/device including version:
Windows 10
Ubuntu 20.04.2 LTS
Issue description:
In code editor, the context menu that pops on right mouse click doesn't appear at the cursor position.
It's not only an esthetic issue because the mouse is already on the first item when it pops so this item can be chosen by mistake on just releasing the right mouse button.
That doesn't occurs with context menu in scene tree or file tree.
Doesn't seem to be linked to other issues where popup are far away from normal position until window is resized.
Edit : Only occurs with Single Window mode activated.
What happens :
What is expected :
I've investigate on this issue and it seems that the mouse coordinates used for Popup creation are correct.
I've try to replace the current contextmenu with a basic popup with one item only (without icon or shortcut) and the problem is the same.
Steps to reproduce:
Right click on code editor.
Popup offset is wrong.
Minimal reproduction project:
Any project with a script in editor.
The text was updated successfully, but these errors were encountered: