core: Make MetaDisplay grab API private

Leave meta_window_begin_grab_op() as the only public API to initiate
a display grab. There's no longer grab operations that don't attain
windows, and ending these grabs usually happen through user interaction
when the right circumstances happen.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho 2022-09-29 19:00:01 +02:00 committed by Marge Bot
parent 8685a706cc
commit 57e56ee866
2 changed files with 14 additions and 16 deletions

View File

@ -424,4 +424,18 @@ void meta_display_flush_queued_window (MetaDisplay *display,
MetaWindow *window, MetaWindow *window,
MetaQueueType queue_types); MetaQueueType queue_types);
gboolean meta_display_begin_grab_op (MetaDisplay *display,
MetaWindow *window,
MetaGrabOp op,
gboolean pointer_already_grabbed,
gboolean frame_action,
int button,
gulong modmask,
uint32_t timestamp,
int root_x,
int root_y);
void meta_display_end_grab_op (MetaDisplay *display,
uint32_t timestamp);
#endif #endif

View File

@ -131,22 +131,6 @@ MetaWindow* meta_display_get_tab_current (MetaDisplay *display,
MetaTabList type, MetaTabList type,
MetaWorkspace *workspace); MetaWorkspace *workspace);
META_EXPORT
gboolean meta_display_begin_grab_op (MetaDisplay *display,
MetaWindow *window,
MetaGrabOp op,
gboolean pointer_already_grabbed,
gboolean frame_action,
int button,
gulong modmask,
guint32 timestamp,
int root_x,
int root_y);
META_EXPORT
void meta_display_end_grab_op (MetaDisplay *display,
guint32 timestamp);
META_EXPORT META_EXPORT
gboolean meta_display_is_grabbed (MetaDisplay *display); gboolean meta_display_is_grabbed (MetaDisplay *display);