MetaPlugin: add a size_changed vfunc

This will be used to let plugins know when a previous size change
actually becomes effective. This is needed to handle wayland client
resizing properly since, unlike X, it's async.

https://bugzilla.gnome.org/show_bug.cgi?id=770345
This commit is contained in:
Rui Matos 2016-09-26 15:54:54 +02:00
parent 4af62438f2
commit 9c03e78505
3 changed files with 17 additions and 0 deletions

View File

@ -202,6 +202,17 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
return retval;
}
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);
}
gboolean
meta_plugin_manager_event_size_change (MetaPluginManager *plugin_mgr,
MetaWindowActor *actor,

View File

@ -50,6 +50,9 @@ gboolean meta_plugin_manager_event_simple (MetaPluginManager *mgr,
MetaWindowActor *actor,
MetaPluginEffect event);
void meta_plugin_manager_event_size_changed (MetaPluginManager *mgr,
MetaWindowActor *actor);
gboolean meta_plugin_manager_event_size_change (MetaPluginManager *mgr,
MetaWindowActor *actor,
MetaSizeChange which_change,

View File

@ -102,6 +102,9 @@ struct _MetaPluginClass
void (*unminimize) (MetaPlugin *plugin,
MetaWindowActor *actor);
void (*size_changed) (MetaPlugin *plugin,
MetaWindowActor *actor);
void (*size_change) (MetaPlugin *plugin,
MetaWindowActor *actor,
MetaSizeChange which_change,