From 917526ee9da8a1bdadda56ddfbc5050a34f45c4e Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 20 Feb 2024 12:25:28 +0100 Subject: [PATCH] plugin-manager: Drop MetaPluginClass.xevent_filter This was added for registering profiling hooks for glx.swapComplete on x11 code paths. Nowadays we have sysprof Part-of: --- src/backends/x11/meta-backend-x11.c | 16 +--------------- src/compositor/meta-plugin-manager.c | 10 ---------- src/compositor/meta-plugin-manager.h | 5 ----- src/compositor/meta-plugin.c | 16 ---------------- src/meta/meta-plugin.h | 16 ---------------- 5 files changed, 1 insertion(+), 62 deletions(-) diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index 3b44920f6..c5d2c4ec6 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -348,9 +348,7 @@ handle_host_xevent (MetaBackend *backend, MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11); ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend); ClutterSeat *seat = clutter_backend_get_default_seat (clutter_backend); - MetaContext *context = meta_backend_get_context (backend); gboolean bypass_clutter = FALSE; - MetaDisplay *display; switch (event->type) { @@ -365,19 +363,7 @@ handle_host_xevent (MetaBackend *backend, XGetEventData (priv->xdisplay, &event->xcookie); - display = meta_context_get_display (context); - if (display) - { - MetaCompositor *compositor = display->compositor; - MetaPluginManager *plugin_mgr = - meta_compositor_get_plugin_manager (compositor); - - if (meta_plugin_manager_xevent_filter (plugin_mgr, event)) - bypass_clutter = TRUE; - } - - bypass_clutter = (meta_backend_x11_handle_host_xevent (x11, event) || - bypass_clutter); + bypass_clutter = meta_backend_x11_handle_host_xevent (x11, event); if (event->type == (priv->xsync_event_base + XSyncAlarmNotify)) handle_alarm_notify (backend, (XSyncAlarmNotifyEvent *) event); diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c index 404ea5e5b..de415ce71 100644 --- a/src/compositor/meta-plugin-manager.c +++ b/src/compositor/meta-plugin-manager.c @@ -26,7 +26,6 @@ #include #include -#include "backends/x11/meta-clutter-backend-x11.h" #include "compositor/compositor-private.h" #include "compositor/meta-module.h" #include "core/meta-inhibit-shortcuts-dialog-default-private.h" @@ -332,15 +331,6 @@ meta_plugin_manager_filter_keybinding (MetaPluginManager *plugin_mgr, return FALSE; } -gboolean -meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr, - XEvent *xev) -{ - MetaPlugin *plugin = plugin_mgr->plugin; - - return _meta_plugin_xevent_filter (plugin, xev); -} - void meta_plugin_manager_confirm_display_change (MetaPluginManager *plugin_mgr) { diff --git a/src/compositor/meta-plugin-manager.h b/src/compositor/meta-plugin-manager.h index 3e6ed75dd..04f3cc68a 100644 --- a/src/compositor/meta-plugin-manager.h +++ b/src/compositor/meta-plugin-manager.h @@ -70,11 +70,6 @@ gboolean meta_plugin_manager_switch_workspace (MetaPluginManager *mgr, gboolean meta_plugin_manager_filter_keybinding (MetaPluginManager *mgr, MetaKeyBinding *binding); -gboolean meta_plugin_manager_xevent_filter (MetaPluginManager *mgr, - XEvent *xev); -gboolean _meta_plugin_xevent_filter (MetaPlugin *plugin, - XEvent *xev); - void meta_plugin_manager_confirm_display_change (MetaPluginManager *mgr); gboolean meta_plugin_manager_show_tile_preview (MetaPluginManager *mgr, diff --git a/src/compositor/meta-plugin.c b/src/compositor/meta-plugin.c index 8c25563a5..c96302436 100644 --- a/src/compositor/meta-plugin.c +++ b/src/compositor/meta-plugin.c @@ -30,12 +30,8 @@ #include "meta/meta-plugin.h" #include -#include -#include -#include #include "backends/meta-monitor-manager-private.h" -#include "backends/x11/meta-clutter-backend-x11.h" #include "compositor/compositor-private.h" #include "compositor/meta-window-actor-private.h" #include "compositor/meta-plugin-manager.h" @@ -71,18 +67,6 @@ meta_plugin_get_info (MetaPlugin *plugin) return NULL; } -gboolean -_meta_plugin_xevent_filter (MetaPlugin *plugin, - XEvent *xev) -{ - MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin); - - if (klass->xevent_filter) - return klass->xevent_filter (plugin, xev); - else - return FALSE; -} - void meta_plugin_switch_workspace_completed (MetaPlugin *plugin) { diff --git a/src/meta/meta-plugin.h b/src/meta/meta-plugin.h index f522673b9..f63bc40c9 100644 --- a/src/meta/meta-plugin.h +++ b/src/meta/meta-plugin.h @@ -21,7 +21,6 @@ #pragma once -#include #include #include "clutter/clutter.h" @@ -52,7 +51,6 @@ typedef struct _MetaPluginInfo MetaPluginInfo; * as if the effect terminated naturally * @kill_switch_workspace: virtual function called when the workspace-switching * effect needs to be killed prematurely - * @xevent_filter: virtual function called when handling each event * @keybinding_filter: virtual function called when handling each keybinding * @plugin_info: virtual function that returns information about the * #MetaPlugin @@ -165,20 +163,6 @@ struct _MetaPluginClass */ void (*kill_switch_workspace) (MetaPlugin *plugin); - /** - * MetaPluginClass::xevent_filter: - * @event: (type xlib.XEvent): - * - * Virtual function called when handling each event. - * - * Returns: %TRUE if the plugin handled the event type (i.e., if the return - * value is %FALSE, there will be no subsequent call to the manager - * completed() callback, and the compositor must ensure that any appropriate - * post-effect cleanup is carried out. - */ - gboolean (*xevent_filter) (MetaPlugin *plugin, - XEvent *event); - /** * MetaPluginClass::keybinding_filter: * @binding: a #MetaKeyBinding