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

The focus is not released as expected #59406

Closed
Rindbee opened this issue Mar 22, 2022 · 9 comments · Fixed by #59568
Closed

The focus is not released as expected #59406

Rindbee opened this issue Mar 22, 2022 · 9 comments · Fixed by #59568

Comments

@Rindbee
Copy link
Contributor

Rindbee commented Mar 22, 2022

Godot version

v4.0.alpha4.official [f470979]

System information

Linux Mint 20.3, Vulkan (both), NVIDIA GeForce GTX 1050 Ti

Issue description

The editor cannot switch panels and tabs after a period of use. Now I feel like I have found the reason, the popup context menu.

Steps to reproduce

New/Open a project, and enter the editor.

Right-click on a dock A (for example, the file system dock) to open the context menu A-popup. Then left-click in anywhere, A-popup will be hidden.

After doing this several times, the mouse it may not interact with any other editor/dock anymore, the dock A locks the focus.

This lock will be unlocked when the entire editor loses the focus.

Minimal reproduction project

No response

@Sauermann
Copy link
Contributor

Here is a video of this bug. Linux X11 Debian Xfce:

BugFocus.mp4

@Sauermann
Copy link
Contributor

After bisecting this bug, it looks like it got introduced in #58490.

@akien-mga
Copy link
Member

CC @bruvzg

@bruvzg bruvzg self-assigned this Mar 22, 2022
@gregkrsak
Copy link

I'm using Lubuntu, and find that if I minimize the Godot app and then maximize it again, this issue clears.

@novaplusplus
Copy link
Contributor

novaplusplus commented Mar 22, 2022

I think I've been getting this too. On KDE + void linux here. I've mostly been noticing it in text editors, but that might just be by chance.

Edit: Yeah, just tried it. Happens anywhere when the context menu is opened. This kiiinddda makes the editor unusable so hopefully this gets fixed soon. (edit 2: ok, I'm learning to use it with fewer context menu uses... but still!)

@nonunknown
Copy link
Contributor

I can confirm in manjaro linux: v4.0.alpha.mono.custom_build [d7d528c]

@jcarlosrc
Copy link

It happens in Windows too.

@Sauermann
Copy link
Contributor

Sauermann commented Mar 26, 2022

I was able to pinpoint the cause of this problem.

This bug appears only with interface/editor/single_window_mode == off.

The following happens:

  1. Press the RMB down on the Tree-Item in FileSystem Dock
    1.1. The popup RMB-menu opens
  2. Release the RMB
    2.1. The input event is sent from the OS to the currently active window: the popup menu
    2.2. The input event never reaches the main viewport and so the main viewports gui.mouse_focus_mask never gets released.

Also I found the following workaround:

  • click anywhere with the RMB.

@Rindbee
Copy link
Contributor Author

Rindbee commented Mar 26, 2022

I was able to pinpoint the cause of this problem.

This bug appears only with interface/editor/single_window_mode == off.

The following happens:

  1. Press the RMB down on the Tree-Item in FileSystem Dock
    1.1. The popup RMB-menu opens
  2. Release the RMB
    2.1. The input event is sent from the OS to the currently active window: the popup menu
    2.2. The input event never reaches the main viewport and so the main viewports gui.mouse_focus_mask never gets released.

Also I found the following workaround:

  • click anywhere with the RMB.

I can confirm this. When the option interface/editor/single_window_mode is turned on, there is no problem. a second right click doesn't work, it doesn't affect the visibility of the RMB-menu. Beside this, there is no problem.

When interface/editor/single_window_mode is off (default value), I also find the second RMB-click will open a new RMB-menu, then the second menu will be quickly hidden.

1.mp4

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

Successfully merging a pull request may close this issue.

9 participants