From f46205417fcba0331e399a05d74e978570b4d8fb Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 22 Nov 2023 02:06:39 +0100 Subject: [PATCH] compositor: Drop grab_begin/end vfuncs These do no longer anything on any implementation, and may be removed. Part-of: --- src/compositor/compositor-private.h | 2 -- src/compositor/compositor.c | 30 ------------------------- src/compositor/meta-compositor-server.c | 12 ---------- src/compositor/meta-compositor-x11.c | 12 ---------- 4 files changed, 56 deletions(-) diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h index e8ff62430..a77af6d3c 100644 --- a/src/compositor/compositor-private.h +++ b/src/compositor/compositor-private.h @@ -33,8 +33,6 @@ struct _MetaCompositorClass MetaWindow *window); int64_t (* monotonic_to_high_res_xserver_time) (MetaCompositor *compositor, int64_t time_us); - void (* grab_begin) (MetaCompositor *compositor); - void (* grab_end) (MetaCompositor *compositor); MetaCompositorView * (* create_view) (MetaCompositor *compositor, ClutterStageView *stage_view); diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index 349f12e34..4c89cd696 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -114,7 +114,6 @@ typedef struct _MetaCompositorPrivate gulong after_paint_handler_id; gulong window_visibility_updated_id; gulong monitors_changed_internal_id; - gulong grabbed_notify_handler_id; int64_t server_time_query_time; int64_t server_time_offset; @@ -312,18 +311,6 @@ meta_get_window_actors (MetaDisplay *display) return priv->windows; } -void -meta_compositor_grab_begin (MetaCompositor *compositor) -{ - META_COMPOSITOR_GET_CLASS (compositor)->grab_begin (compositor); -} - -void -meta_compositor_grab_end (MetaCompositor *compositor) -{ - META_COMPOSITOR_GET_CLASS (compositor)->grab_end (compositor); -} - static MetaCompositorView * meta_compositor_create_view (MetaCompositor *compositor, ClutterStageView *stage_view) @@ -1115,17 +1102,6 @@ on_monitors_changed_internal (MetaMonitorManager *monitor_manager, meta_compositor_ensure_compositor_views (compositor); } -static void -on_is_grabbed_changed_cb (ClutterStage *stage, - GParamSpec *pspec, - MetaCompositor *compositor) -{ - if (clutter_stage_get_grab_actor (stage) != NULL) - meta_compositor_grab_begin (compositor); - else - meta_compositor_grab_end (compositor); -} - static void meta_compositor_set_property (GObject *object, guint prop_id, @@ -1202,11 +1178,6 @@ meta_compositor_constructed (GObject *object) "after-paint", G_CALLBACK (on_after_paint), compositor); - priv->grabbed_notify_handler_id = - g_signal_connect (stage, - "notify::is-grabbed", - G_CALLBACK (on_is_grabbed_changed_cb), - compositor); priv->window_visibility_updated_id = g_signal_connect (priv->display, @@ -1240,7 +1211,6 @@ meta_compositor_dispose (GObject *object) g_clear_signal_handler (&priv->stage_presented_id, stage); g_clear_signal_handler (&priv->before_paint_handler_id, stage); g_clear_signal_handler (&priv->after_paint_handler_id, stage); - g_clear_signal_handler (&priv->grabbed_notify_handler_id, stage); g_clear_signal_handler (&priv->window_visibility_updated_id, priv->display); g_clear_pointer (&priv->windows, g_list_free); diff --git a/src/compositor/meta-compositor-server.c b/src/compositor/meta-compositor-server.c index 2cf4ce575..e3c4a1ccc 100644 --- a/src/compositor/meta-compositor-server.c +++ b/src/compositor/meta-compositor-server.c @@ -41,16 +41,6 @@ meta_compositor_server_monotonic_to_high_res_xserver_time (MetaCompositor *compo return meta_translate_to_high_res_xserver_time (monotonic_time_us); } -static void -meta_compositor_server_grab_begin (MetaCompositor *compositor) -{ -} - -static void -meta_compositor_server_grab_end (MetaCompositor *compositor) -{ -} - static MetaCompositorView * meta_compositor_server_create_view (MetaCompositor *compositor, ClutterStageView *stage_view) @@ -81,7 +71,5 @@ meta_compositor_server_class_init (MetaCompositorServerClass *klass) compositor_class->manage = meta_compositor_server_manage; compositor_class->monotonic_to_high_res_xserver_time = meta_compositor_server_monotonic_to_high_res_xserver_time; - compositor_class->grab_begin = meta_compositor_server_grab_begin; - compositor_class->grab_end = meta_compositor_server_grab_end; compositor_class->create_view = meta_compositor_server_create_view; } diff --git a/src/compositor/meta-compositor-x11.c b/src/compositor/meta-compositor-x11.c index 218239e93..7694abc19 100644 --- a/src/compositor/meta-compositor-x11.c +++ b/src/compositor/meta-compositor-x11.c @@ -438,16 +438,6 @@ meta_compositor_x11_monotonic_to_high_res_xserver_time (MetaCompositor *composit return monotonic_time_us + compositor_x11->xserver_time_offset_us; } -static void -meta_compositor_x11_grab_begin (MetaCompositor *compositor) -{ -} - -static void -meta_compositor_x11_grab_end (MetaCompositor *compositor) -{ -} - static MetaCompositorView * meta_compositor_x11_create_view (MetaCompositor *compositor, ClutterStageView *stage_view) @@ -527,7 +517,5 @@ meta_compositor_x11_class_init (MetaCompositorX11Class *klass) compositor_class->remove_window = meta_compositor_x11_remove_window; compositor_class->monotonic_to_high_res_xserver_time = meta_compositor_x11_monotonic_to_high_res_xserver_time; - compositor_class->grab_begin = meta_compositor_x11_grab_begin; - compositor_class->grab_end = meta_compositor_x11_grab_end; compositor_class->create_view = meta_compositor_x11_create_view; }