1
0
Fork 0
mutter-performance-source/src
Jonas Dreßler 58290cca57 window: Stop event propagation for drag and window-menu triggering events
meta_window_handle_ungrabbed_event() triggers the show of the window menu in
gnome-shell via meta_window_show_menu() on hold of Meta + right mouse button
click.

Since meta_display_handle_event() was refactored lately and now forwards a
lot more events to Clutter (including the one triggering the window menu),
gnome-shell now sees this event after the menu has opened, figures that the
source-actor is outside of the menu, and immediately closes the menu again.

This is the correct behavior from the PopupMenuManager on the gnome-shell
side, it is the responsibility of the event handler that opens the menu (aka
meta_window_handle_ungrabbed_event()) to return CLUTTER_EVENT_STOP and stop
event propagation.

So fix this issue by adding a return value to
meta_window_handle_ungrabbed_event() and stopping event propagation in case
the event opened the window menu.

While at it, also return CLUTTER_EVENT_STOP for events triggering window
drags, so we can drop the extra check for that in
meta_display_handle_event().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3623>
2024-03-04 09:59:59 +00:00
..
backends input-capture: Ignore emulated scroll events 2024-03-04 08:46:38 +00:00
common backend/native: Move DrmFormatBuf to cogl-drm-formats 2024-01-03 14:46:41 +01:00
compositor compositor/drag: Use "default" cursor for moving windows 2024-03-02 23:42:55 +00:00
core window: Stop event propagation for drag and window-menu triggering events 2024-03-04 09:59:59 +00:00
frames Revert "frames: Always initialize _MUTTER_FRAME_EXTENTS to zero" 2024-03-01 10:54:32 +01:00
meta core: Pass position hint to meta_window_begin_grab_op() 2024-02-27 00:19:22 +01:00
tests monitor-manager: Add support for refresh rate modes 2024-03-02 12:08:21 +00:00
wayland wayland/tablet-tool: Check for non-NULL surface resource 2024-03-02 19:46:15 +01:00
x11 x11: Pass NET_WM_MOVERESIZE coordinates as window drag hint 2024-02-27 00:19:22 +01:00
meson.build build/meta: Add explicit dependency on Gio-2.0 gir 2024-02-27 10:35:06 +01:00
meta-private-enum-types.c.in build: Add missing include 2022-08-10 20:28:40 +02:00
meta-private-enum-types.h.in cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00