2008-09-18 11:09:11 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2008 Intel Corp.
|
|
|
|
*
|
|
|
|
* Author: Tomas Frydrych <tf@linux.intel.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-11 20:42:06 -05:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2008-09-18 11:09:11 -04:00
|
|
|
*/
|
|
|
|
|
2008-10-28 06:45:45 -04:00
|
|
|
#include "config.h"
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "compositor/meta-plugin-manager.h"
|
|
|
|
|
2011-02-03 12:51:35 -05:00
|
|
|
#include <stdlib.h>
|
2018-07-10 04:36:24 -04:00
|
|
|
#include <string.h>
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "clutter/x11/clutter-x11.h"
|
|
|
|
#include "compositor/compositor-private.h"
|
|
|
|
#include "compositor/meta-module.h"
|
|
|
|
#include "core/meta-close-dialog-default-private.h"
|
|
|
|
#include "core/meta-inhibit-shortcuts-dialog-default-private.h"
|
|
|
|
#include "core/window-private.h"
|
|
|
|
#include "meta/meta-x11-errors.h"
|
|
|
|
#include "meta/prefs.h"
|
|
|
|
#include "meta/workspace.h"
|
2009-07-22 14:37:43 -04:00
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
static GType plugin_type = G_TYPE_NONE;
|
2010-04-12 17:42:46 -04:00
|
|
|
|
2010-10-18 13:27:14 -04:00
|
|
|
struct MetaPluginManager
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2014-03-18 17:31:22 -04:00
|
|
|
MetaCompositor *compositor;
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin;
|
2008-09-18 11:09:11 -04:00
|
|
|
};
|
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
void
|
|
|
|
meta_plugin_manager_set_plugin_type (GType gtype)
|
|
|
|
{
|
|
|
|
if (plugin_type != G_TYPE_NONE)
|
|
|
|
meta_fatal ("Mutter plugin already set: %s", g_type_name (plugin_type));
|
|
|
|
|
|
|
|
plugin_type = gtype;
|
|
|
|
}
|
|
|
|
|
2008-09-18 11:09:11 -04:00
|
|
|
/*
|
2011-03-04 15:11:38 -05:00
|
|
|
* Loads the given plugin.
|
2008-09-18 11:09:11 -04:00
|
|
|
*/
|
2011-03-04 15:11:38 -05:00
|
|
|
void
|
2012-04-05 01:29:39 -04:00
|
|
|
meta_plugin_manager_load (const gchar *plugin_name)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2008-10-29 06:28:48 -04:00
|
|
|
const gchar *dpath = MUTTER_PLUGIN_DIR "/";
|
2011-03-04 15:11:38 -05:00
|
|
|
gchar *path;
|
|
|
|
MetaModule *module;
|
2011-02-25 14:38:04 -05:00
|
|
|
|
2011-03-04 15:11:38 -05:00
|
|
|
if (g_path_is_absolute (plugin_name))
|
|
|
|
path = g_strdup (plugin_name);
|
|
|
|
else
|
|
|
|
path = g_strconcat (dpath, plugin_name, ".so", NULL);
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2011-03-04 15:11:38 -05:00
|
|
|
module = g_object_new (META_TYPE_MODULE, "path", path, NULL);
|
|
|
|
if (!module || !g_type_module_use (G_TYPE_MODULE (module)))
|
2008-10-09 10:33:06 -04:00
|
|
|
{
|
2011-03-04 15:11:38 -05:00
|
|
|
/* This is fatal under the assumption that a monitoring
|
|
|
|
* process like gnome-session will take over and handle
|
|
|
|
* our untimely exit.
|
2008-10-09 10:33:06 -04:00
|
|
|
*/
|
2011-03-04 15:11:38 -05:00
|
|
|
g_printerr ("Unable to load plugin module [%s]: %s",
|
|
|
|
path, g_module_error());
|
|
|
|
exit (1);
|
2008-10-09 10:33:06 -04:00
|
|
|
}
|
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
meta_plugin_manager_set_plugin_type (meta_module_get_plugin_type (module));
|
2011-03-05 16:16:26 -05:00
|
|
|
|
|
|
|
g_type_module_unuse (G_TYPE_MODULE (module));
|
|
|
|
g_free (path);
|
|
|
|
}
|
|
|
|
|
2013-07-29 04:12:24 -04:00
|
|
|
static void
|
|
|
|
on_confirm_display_change (MetaMonitorManager *monitors,
|
|
|
|
MetaPluginManager *plugin_mgr)
|
|
|
|
{
|
|
|
|
meta_plugin_manager_confirm_display_change (plugin_mgr);
|
|
|
|
}
|
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPluginManager *
|
2014-03-18 17:31:22 -04:00
|
|
|
meta_plugin_manager_new (MetaCompositor *compositor)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2010-10-18 13:27:14 -04:00
|
|
|
MetaPluginManager *plugin_mgr;
|
2012-06-17 00:56:48 -04:00
|
|
|
MetaPluginClass *klass;
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin;
|
2013-07-29 04:12:24 -04:00
|
|
|
MetaMonitorManager *monitors;
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2010-10-18 13:27:14 -04:00
|
|
|
plugin_mgr = g_new0 (MetaPluginManager, 1);
|
2014-03-18 17:31:22 -04:00
|
|
|
plugin_mgr->compositor = compositor;
|
2014-03-18 17:41:22 -04:00
|
|
|
plugin_mgr->plugin = plugin = g_object_new (plugin_type, NULL);
|
|
|
|
|
2014-03-18 17:31:22 -04:00
|
|
|
_meta_plugin_set_compositor (plugin, compositor);
|
2012-06-17 00:56:48 -04:00
|
|
|
|
|
|
|
klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->start)
|
|
|
|
klass->start (plugin);
|
2010-04-12 17:42:46 -04:00
|
|
|
|
2013-07-29 04:12:24 -04:00
|
|
|
monitors = meta_monitor_manager_get ();
|
|
|
|
g_signal_connect (monitors, "confirm-display-change",
|
|
|
|
G_CALLBACK (on_confirm_display_change), plugin_mgr);
|
|
|
|
|
2008-10-13 07:23:47 -04:00
|
|
|
return plugin_mgr;
|
2008-09-18 11:09:11 -04:00
|
|
|
}
|
|
|
|
|
2008-10-07 11:29:03 -04:00
|
|
|
static void
|
2010-10-18 13:27:14 -04:00
|
|
|
meta_plugin_manager_kill_window_effects (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindowActor *actor)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2010-06-16 17:15:56 -04:00
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
if (klass->kill_window_effects)
|
|
|
|
klass->kill_window_effects (plugin, actor);
|
2010-06-16 17:15:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-10-18 13:27:14 -04:00
|
|
|
meta_plugin_manager_kill_switch_workspace (MetaPluginManager *plugin_mgr)
|
2010-06-16 17:15:56 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
if (klass->kill_switch_workspace)
|
|
|
|
klass->kill_switch_workspace (plugin);
|
2008-09-18 11:09:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public method that the compositor hooks into for events that require
|
|
|
|
* no additional parameters.
|
|
|
|
*
|
2012-04-05 01:29:39 -04:00
|
|
|
* Returns TRUE if the plugin handled the event type (i.e.,
|
2008-09-18 11:09:11 -04:00
|
|
|
* 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
|
2010-10-18 13:27:14 -04:00
|
|
|
meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindowActor *actor,
|
2015-07-05 23:58:40 -04:00
|
|
|
MetaPluginEffect event)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2017-10-20 04:23:28 -04:00
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2017-10-20 04:23:28 -04:00
|
|
|
gboolean retval = FALSE;
|
2009-08-05 14:05:10 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return FALSE;
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
switch (event)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
case META_PLUGIN_MINIMIZE:
|
|
|
|
if (klass->minimize)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
retval = TRUE;
|
|
|
|
meta_plugin_manager_kill_window_effects (plugin_mgr,
|
|
|
|
actor);
|
|
|
|
klass->minimize (plugin, actor);
|
2008-09-18 11:09:11 -04:00
|
|
|
}
|
2012-04-05 01:29:39 -04:00
|
|
|
break;
|
2013-06-13 21:01:17 -04:00
|
|
|
case META_PLUGIN_UNMINIMIZE:
|
|
|
|
if (klass->unminimize)
|
|
|
|
{
|
|
|
|
retval = TRUE;
|
|
|
|
meta_plugin_manager_kill_window_effects (plugin_mgr,
|
|
|
|
actor);
|
|
|
|
klass->unminimize (plugin, actor);
|
|
|
|
}
|
|
|
|
break;
|
2012-04-05 01:29:39 -04:00
|
|
|
case META_PLUGIN_MAP:
|
|
|
|
if (klass->map)
|
|
|
|
{
|
|
|
|
retval = TRUE;
|
|
|
|
meta_plugin_manager_kill_window_effects (plugin_mgr,
|
|
|
|
actor);
|
|
|
|
klass->map (plugin, actor);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case META_PLUGIN_DESTROY:
|
|
|
|
if (klass->destroy)
|
|
|
|
{
|
|
|
|
retval = TRUE;
|
2019-11-08 12:27:28 -05:00
|
|
|
meta_plugin_manager_kill_window_effects (plugin_mgr,
|
|
|
|
actor);
|
2012-04-05 01:29:39 -04:00
|
|
|
klass->destroy (plugin, actor);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2015-07-05 23:58:40 -04:00
|
|
|
g_warning ("Incorrect handler called for event %d", event);
|
2008-09-18 11:09:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
2016-09-26 09:54:54 -04:00
|
|
|
void
|
|
|
|
meta_plugin_manager_event_size_changed (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindowActor *actor)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->size_changed)
|
|
|
|
klass->size_changed (plugin, actor);
|
|
|
|
}
|
|
|
|
|
2008-09-18 11:09:11 -04:00
|
|
|
gboolean
|
2015-07-06 00:08:08 -04:00
|
|
|
meta_plugin_manager_event_size_change (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindowActor *actor,
|
|
|
|
MetaSizeChange which_change,
|
|
|
|
MetaRectangle *old_frame_rect,
|
|
|
|
MetaRectangle *old_buffer_rect)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2009-08-05 14:05:10 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return FALSE;
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2015-07-06 00:08:08 -04:00
|
|
|
if (!klass->size_change)
|
|
|
|
return FALSE;
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2015-07-06 00:08:08 -04:00
|
|
|
meta_plugin_manager_kill_window_effects (plugin_mgr, actor);
|
|
|
|
klass->size_change (plugin, actor, which_change, old_frame_rect, old_buffer_rect);
|
|
|
|
return TRUE;
|
2008-09-18 11:09:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The public method that the compositor hooks into for desktop switching.
|
|
|
|
*
|
2012-04-05 01:29:39 -04:00
|
|
|
* Returns TRUE if the plugin handled the event type (i.e.,
|
2008-09-18 11:09:11 -04:00
|
|
|
* 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
|
2010-10-18 13:27:14 -04:00
|
|
|
meta_plugin_manager_switch_workspace (MetaPluginManager *plugin_mgr,
|
|
|
|
gint from,
|
|
|
|
gint to,
|
|
|
|
MetaMotionDirection direction)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2008-09-18 11:09:11 -04:00
|
|
|
gboolean retval = FALSE;
|
2009-08-05 14:05:10 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return FALSE;
|
2008-09-18 11:09:11 -04:00
|
|
|
|
2012-04-05 01:29:39 -04:00
|
|
|
if (klass->switch_workspace)
|
2008-09-18 11:09:11 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
retval = TRUE;
|
|
|
|
meta_plugin_manager_kill_switch_workspace (plugin_mgr);
|
|
|
|
klass->switch_workspace (plugin, from, to, direction);
|
2008-09-18 11:09:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
2008-10-02 07:16:15 -04:00
|
|
|
|
2012-08-09 20:27:18 -04:00
|
|
|
gboolean
|
|
|
|
meta_plugin_manager_filter_keybinding (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaKeyBinding *binding)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->keybinding_filter)
|
|
|
|
return klass->keybinding_filter (plugin, binding);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-10-02 07:16:15 -04:00
|
|
|
gboolean
|
2010-10-18 13:27:14 -04:00
|
|
|
meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr,
|
|
|
|
XEvent *xev)
|
2008-10-02 07:16:15 -04:00
|
|
|
{
|
2012-04-05 01:29:39 -04:00
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
2012-01-07 17:21:32 -05:00
|
|
|
|
2013-09-04 12:11:43 -04:00
|
|
|
return _meta_plugin_xevent_filter (plugin, xev);
|
2008-10-02 07:16:15 -04:00
|
|
|
}
|
2013-07-29 04:12:24 -04:00
|
|
|
|
|
|
|
void
|
|
|
|
meta_plugin_manager_confirm_display_change (MetaPluginManager *plugin_mgr)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->confirm_display_change)
|
2019-02-21 03:24:03 -05:00
|
|
|
klass->confirm_display_change (plugin);
|
2013-07-29 04:12:24 -04:00
|
|
|
else
|
2019-02-21 03:24:03 -05:00
|
|
|
meta_plugin_complete_display_change (plugin, TRUE);
|
2013-07-29 04:12:24 -04:00
|
|
|
}
|
2012-03-24 06:29:39 -04:00
|
|
|
|
|
|
|
gboolean
|
|
|
|
meta_plugin_manager_show_tile_preview (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindow *window,
|
|
|
|
MetaRectangle *tile_rect,
|
|
|
|
int tile_monitor_number)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2012-03-24 06:29:39 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (klass->show_tile_preview)
|
|
|
|
{
|
|
|
|
klass->show_tile_preview (plugin, window, tile_rect, tile_monitor_number);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
meta_plugin_manager_hide_tile_preview (MetaPluginManager *plugin_mgr)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2012-03-24 06:29:39 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (klass->hide_tile_preview)
|
|
|
|
{
|
|
|
|
klass->hide_tile_preview (plugin);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
2014-03-13 18:34:14 -04:00
|
|
|
|
|
|
|
void
|
2014-05-23 17:14:51 -04:00
|
|
|
meta_plugin_manager_show_window_menu (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindow *window,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
int x,
|
|
|
|
int y)
|
2014-03-13 18:34:14 -04:00
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2014-03-13 18:34:14 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (klass->show_window_menu)
|
2014-05-23 17:14:51 -04:00
|
|
|
klass->show_window_menu (plugin, window, menu, x, y);
|
2014-03-13 18:34:14 -04:00
|
|
|
}
|
2014-05-30 18:52:06 -04:00
|
|
|
|
|
|
|
void
|
|
|
|
meta_plugin_manager_show_window_menu_for_rect (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindow *window,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
MetaRectangle *rect)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
2019-08-14 13:04:41 -04:00
|
|
|
MetaDisplay *display = meta_compositor_get_display (plugin_mgr->compositor);
|
2014-05-30 18:52:06 -04:00
|
|
|
|
|
|
|
if (display->display_opening)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (klass->show_window_menu_for_rect)
|
|
|
|
klass->show_window_menu_for_rect (plugin, window, menu, rect);
|
|
|
|
}
|
2017-01-26 13:48:52 -05:00
|
|
|
|
|
|
|
MetaCloseDialog *
|
|
|
|
meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindow *window)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->create_close_dialog)
|
|
|
|
return klass->create_close_dialog (plugin, window);
|
|
|
|
|
|
|
|
return meta_close_dialog_default_new (window);
|
|
|
|
}
|
2017-06-14 05:20:54 -04:00
|
|
|
|
|
|
|
MetaInhibitShortcutsDialog *
|
|
|
|
meta_plugin_manager_create_inhibit_shortcuts_dialog (MetaPluginManager *plugin_mgr,
|
|
|
|
MetaWindow *window)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->create_inhibit_shortcuts_dialog)
|
|
|
|
return klass->create_inhibit_shortcuts_dialog (plugin, window);
|
|
|
|
|
|
|
|
return meta_inhibit_shortcuts_dialog_default_new (window);
|
|
|
|
}
|
2019-02-20 05:07:22 -05:00
|
|
|
|
|
|
|
void
|
|
|
|
meta_plugin_manager_locate_pointer (MetaPluginManager *plugin_mgr)
|
|
|
|
{
|
|
|
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
|
|
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
|
|
|
|
|
|
|
if (klass->locate_pointer)
|
|
|
|
klass->locate_pointer (plugin);
|
|
|
|
}
|