mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
compositor: Add "locate_pointer" vmethod
This method is invoked to locate the pointer on screen. https://gitlab.gnome.org/GNOME/mutter/merge_requests/453 https://gitlab.gnome.org/GNOME/gnome-shell/issues/981 https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/merge_requests/19 https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/86
This commit is contained in:
parent
c9cc07fd3a
commit
b4c78726cf
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user