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

Focus problems with popup menus #37531

Closed
Tracked by #37734
KoBeWi opened this issue Apr 2, 2020 · 5 comments
Closed
Tracked by #37734

Focus problems with popup menus #37531

KoBeWi opened this issue Apr 2, 2020 · 5 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Apr 2, 2020

Godot version:
b50387c

OS/device including version:
Windows 10

Issue description:
The new popup menus will unfocus the editor, which leads to problems like this
image
These buttons no longer get hover event (you can see that different button is hovered from clicked). Also you always need to click them to open the menu.

It seems weird to me that the popup menus are basically sub-windows. I mean, uncofusing editor on menu open... I don't know any other application that does that.

@dalexeev
Copy link
Member

See also discussion in #37709.

@giarve
Copy link
Contributor

giarve commented Apr 30, 2020

Turns out in X11 the problem is #37709 but not this one #37531.

What I mean is, popup when in front of the editor propagates the hover to editor menus correctly and allows to move through the popup hovering too, which I suppose is the correct behavior (if I understood correctly).

image

image

This image was taken using Spectacle with the Capture Mode "Window Under the Cursor" without "Capture the current pop-up only" disabled. If I enable the capture pop-up setting it would only take a screenshot of the dropdown. It seems it is working correctly in linux.

However, the title bar is not in focus, which is what #37709 describes.

Another thing I noticed is that these menus that open on the right of the dropdown when hovering an item with an arrow are not automatically closed when something else is hovered (unlike in dropdown menus in Konsole, which close when the focus is out of the submenu) but this may be another issue and I don't know if it worked like that in Godot 3.2 or not.

@HaSa1002
Copy link
Contributor

In 3.2 Popups close only if you click outside the popup. The Submenus close on hover change

@HaSa1002
Copy link
Contributor

Regarding the blinking issue (and or the focus bug) how are popups handled in X11? On Windows every (native) control is it's own subwindow (as far as I understand)

HaSa1002 added a commit to HaSa1002/godot that referenced this issue May 29, 2020
Fixes that the Popups no longer steal focus, when they are popuped.

Since the previous window no longer loses focus the popup has to emulate
it. Therefor the behaviour in the PopupMenu was moved into the Popup
itself.

This commit provides the general structure for the implementation, but only
the the Windows Display Server is implemented.

Partial fix of godotengine#37531 along with godotengine#37771
HaSa1002 added a commit to HaSa1002/godot that referenced this issue Mar 7, 2021
HaSa1002 added a commit to HaSa1002/godot that referenced this issue Apr 10, 2021
HaSa1002 added a commit to HaSa1002/godot that referenced this issue Jul 31, 2021
@akien-mga
Copy link
Member

Fixed by #58490.

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