Olivier Fourdan 2019-02-20 11:07:22 +01:00 committed by Carlos Garnacho
parent c9cc07fd3a
commit b4c78726cf
5 changed files with 30 additions and 0 deletions

View File

@ -71,4 +71,6 @@ MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *composito
MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
MetaWindow *window);
void meta_compositor_locate_pointer (MetaCompositor *compositor);
#endif /* META_COMPOSITOR_PRIVATE_H */

View File

@ -1553,3 +1553,9 @@ meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
return meta_plugin_manager_create_inhibit_shortcuts_dialog (compositor->plugin_mgr,
window);
}
void
meta_compositor_locate_pointer (MetaCompositor *compositor)
{
meta_plugin_manager_locate_pointer (compositor->plugin_mgr);
}

View File

@ -405,3 +405,13 @@ meta_plugin_manager_create_inhibit_shortcuts_dialog (MetaPluginManager *plugin_m
return meta_inhibit_shortcuts_dialog_default_new (window);
}
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);
}

View File

@ -100,4 +100,6 @@ MetaInhibitShortcutsDialog *
meta_plugin_manager_create_inhibit_shortcuts_dialog (MetaPluginManager *plugin_mgr,
MetaWindow *window);
void meta_plugin_manager_locate_pointer (MetaPluginManager *mgr);
#endif

View File

@ -239,6 +239,16 @@ struct _MetaPluginClass
*/
MetaInhibitShortcutsDialog * (* create_inhibit_shortcuts_dialog) (MetaPlugin *plugin,
MetaWindow *window);
/**
* MetaPluginClass::locate_pointer:
*
* Virtual function called when the user triggered the "locate-pointer"
* mechanism.
* The common way to implement this function is to show some animation
* on screen to draw user attention on the pointer location.
*/
void (*locate_pointer) (MetaPlugin *plugin);
};
/**