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

Menus fail to close if you move your mouse and click fast enough #12

Open
nyanpasu64 opened this issue Jun 23, 2021 · 0 comments
Open

Comments

@nyanpasu64
Copy link

Menu handling is rather bugged, with multiple symptoms I think share the same root cause:

Clicking a new menu item fails to close the menu:

Tested on multiple Linux DEs, both X and Wayland:

  • Open a menu.
  • Click and hold anywhere on the window (either on or off the menu) to close it. (The bug occurs regardless if you hold it for a short or long time.)
  • Shortly before or after releasing the mouse, hover a different menu item. (Optionally move your mouse off the menu bar.)

The new menu will open. This will not happen if you put more of a gap between moving the mouse and hovering a menu item.

This behavior is absent from GTK4 apps (not many have menu bars, try gtk4-widget-factory, Page 2) and Qt apps (most KDE apps have menu bars).

gtk3-widget-factory kinda has this behavior. It's even more lenient if you click on a menu item, move your mouse to a different one, and release it. But if you click off a menu item, I was unable to keep the menu open.

nativeshell.menu.reopening.60fps.mp4

Clicking the window fails to close the menu:

This is a lot trickier to reproduce than the above, but is more clearly a bug (rather than a defensible choice of behavior).

  • Click and release a menu to open it. Keep your mouse on one menu.
  • Move your mouse to another menu item, then off the menu bar, then click the mouse before the new menu appears. Release the mouse rapidly.

If you get it right, the new menu appears, and doesn't close even though you clicked the window background to close the new menu.

nativeshell.menu.not.closing.60fps.mp4

These videos were recorded at 60fps. I recommend watching them in mpv, using , and . for frame rewind and advance (or [ and ] for slow motion).

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

No branches or pull requests

1 participant