1
0
Fork 0
mutter-performance-source/src/core
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
..
bell.c mutter: Remove stray spaces 2023-05-24 14:16:41 +02:00
bell.h frame: Remove flashing support 2019-03-12 00:27:07 +00:00
boxes-private.h boxes: Move Rectangle.is_adjacent_to to Mtk 2024-01-09 18:47:34 +00:00
boxes.c boxes: Move Rectangle.is_adjacent_to to Mtk 2024-01-09 18:47:34 +00:00
constraints.c cleanup: Remove unneeded ifdef 2023-11-03 11:36:07 +00:00
constraints.h mutter: Completely replace MetaRectangle with MtkRectangle 2023-08-30 16:46:14 +02:00
delete.c x11: Drop error trap helpers 2024-01-10 13:58:18 +00:00
display-private.h wayland: Hook focus synchronization to MetaDisplay signals 2024-01-12 14:39:17 +00:00
display.c display: Force window user time update to happen 2024-03-02 23:19:22 +00:00
events.c window: Stop event propagation for drag and window-menu triggering events 2024-03-04 09:59:59 +00:00
events.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
frame.c window: Move set_frame_xwindow to WindowX11 2024-02-21 16:01:00 +01:00
frame.h frame: Inline get_mask where it is used 2024-02-14 11:20:30 +00:00
keybindings-private.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
keybindings.c core: Pass position hint to meta_window_begin_grab_op() 2024-02-27 00:19:22 +01:00
meta-accel-parse.c Update license access method 2023-08-30 08:48:23 +02:00
meta-accel-parse.h Update license access method 2023-08-30 08:48:23 +02:00
meta-anonymous-file.c Update license access method 2023-08-30 08:48:23 +02:00
meta-anonymous-file.h Update license access method 2023-08-30 08:48:23 +02:00
meta-border.c Update license access method 2023-08-30 08:48:23 +02:00
meta-border.h Update license access method 2023-08-30 08:48:23 +02:00
meta-clipboard-manager.c Update license access method 2023-08-30 08:48:23 +02:00
meta-clipboard-manager.h Update license access method 2023-08-30 08:48:23 +02:00
meta-close-dialog.c cleanup: Stop translating nick/blurb for pspecs 2023-07-19 11:33:59 +00:00
meta-context-main.c cleanup: Guard x11 headers includes 2024-02-21 16:01:00 +01:00
meta-context-main.h Update license access method 2023-08-30 08:48:23 +02:00
meta-context-private.h core: Drop unused private functions 2024-01-09 13:14:35 +00:00
meta-context.c core/context: Make notify_ready vfunc optional 2024-01-31 12:25:39 +00:00
meta-debug-control.c Add debug controller 2023-12-01 14:25:08 +00:00
meta-debug-control.h Add debug controller 2023-12-01 14:25:08 +00:00
meta-fraction.c Update license access method 2023-08-30 08:48:23 +02:00
meta-fraction.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
meta-gesture-tracker-private.h core: Use subclassing macros for GestureTracker 2024-01-13 17:22:26 +00:00
meta-gesture-tracker.c core: Drop unused private functions 2024-01-09 13:14:35 +00:00
meta-inhibit-shortcuts-dialog-default-private.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
meta-inhibit-shortcuts-dialog-default.c Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-inhibit-shortcuts-dialog.c cleanup: Stop translating nick/blurb for pspecs 2023-07-19 11:33:59 +00:00
meta-launch-context.c core/launch-context: Guard X11 calls 2024-01-31 12:25:39 +00:00
meta-pad-action-mapper.c core: Handle Alt in the MetaPadActionMapper 2024-02-01 10:22:22 +00:00
meta-pad-action-mapper.h Update license access method 2023-08-30 08:48:23 +02:00
meta-private-enums.h Update license access method 2023-08-30 08:48:23 +02:00
meta-profiler.c Update license access method 2023-08-30 08:48:23 +02:00
meta-profiler.h Update license access method 2023-08-30 08:48:23 +02:00
meta-selection-private.h Update license access method 2023-08-30 08:48:23 +02:00
meta-selection-source-memory.c Update license access method 2023-08-30 08:48:23 +02:00
meta-selection-source-remote.c Update license access method 2023-08-30 08:48:23 +02:00
meta-selection-source-remote.h Update license access method 2023-08-30 08:48:23 +02:00
meta-selection-source.c Update license access method 2023-08-30 08:48:23 +02:00
meta-selection.c Update license access method 2023-08-30 08:48:23 +02:00
meta-service-channel.c Update license access method 2023-08-30 08:48:23 +02:00
meta-service-channel.h Update license access method 2023-08-30 08:48:23 +02:00
meta-sound-player.c Update license access method 2023-08-30 08:48:23 +02:00
meta-workspace-manager-private.h core: Drop unused private functions 2024-01-09 13:14:35 +00:00
meta-workspace-manager.c workspace-manager: Accessors for layout-{columns,rows} 2024-01-09 16:38:25 +00:00
mutter.c mutter: Raise the NOFILE limit if a Wayland compositor 2022-02-07 16:11:47 +01:00
place.c window: Add a copy of XSizeHints 2024-02-19 20:19:41 +01:00
place.h cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
prefs-private.h Update license access method 2023-08-30 08:48:23 +02:00
prefs.c cleanup: Guard x11 headers includes 2024-02-21 16:01:00 +01:00
restart-helper.c mutter: Remove stray spaces 2023-05-24 14:16:41 +02:00
restart.c cleanup: Guard x11 headers includes 2024-02-21 16:01:00 +01:00
stack-tracker.c cleanup: Avoid using None on non-x11 only code paths 2024-02-21 18:29:03 +01:00
stack-tracker.h core/stack-tracker: Guard X11 usages 2024-02-08 16:55:06 +01:00
stack.c core/stack: Check client type before getting group 2024-02-08 22:05:39 +01:00
stack.h Remove unused meta_stack_get_bottom 2023-08-12 19:53:46 +00:00
startup-notification-private.h core: Drop unused private functions 2024-01-09 13:14:35 +00:00
startup-notification.c cleanup: Guard x11 headers includes 2024-02-21 16:01:00 +01:00
util-private.h core: Drop unused private functions 2024-01-09 13:14:35 +00:00
util.c backends/eis: Hook eis into the debug system 2023-07-14 22:23:45 +00:00
window-private.h window: Stop event propagation for drag and window-menu triggering events 2024-03-04 09:59:59 +00:00
window.c window: Stop event propagation for drag and window-menu triggering events 2024-03-04 09:59:59 +00:00
workspace-private.h core: Drop unused private functions 2024-01-09 13:14:35 +00:00
workspace.c cleanup: Guard x11 headers includes 2024-02-21 16:01:00 +01:00