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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3599>
This commit is contained in:
Bilal Elmoussaoui 2024-02-20 12:25:28 +01:00 committed by Marge Bot
parent c72e129eb2
commit 917526ee9d
5 changed files with 1 additions and 62 deletions

View File

@ -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);

View File

@ -26,7 +26,6 @@
#include <stdlib.h>
#include <string.h>
#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)
{

View File

@ -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,

View File

@ -30,12 +30,8 @@
#include "meta/meta-plugin.h"
#include <string.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/shape.h>
#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)
{

View File

@ -21,7 +21,6 @@
#pragma once
#include <X11/extensions/Xfixes.h>
#include <gmodule.h>
#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