shell-wm: Add a size-changed signal to handle the new plugin vfunc
https://bugzilla.gnome.org/show_bug.cgi?id=770345
This commit is contained in:
parent
1de1fd44c5
commit
68b671a4f4
@ -42,6 +42,8 @@ static void gnome_shell_plugin_minimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_unminimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_size_changed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_size_change (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
@ -127,6 +129,7 @@ gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
|
||||
plugin_class->map = gnome_shell_plugin_map;
|
||||
plugin_class->minimize = gnome_shell_plugin_minimize;
|
||||
plugin_class->unminimize = gnome_shell_plugin_unminimize;
|
||||
plugin_class->size_changed = gnome_shell_plugin_size_changed;
|
||||
plugin_class->size_change = gnome_shell_plugin_size_change;
|
||||
plugin_class->destroy = gnome_shell_plugin_destroy;
|
||||
|
||||
@ -272,6 +275,13 @@ gnome_shell_plugin_unminimize (MetaPlugin *plugin,
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_size_changed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
_shell_wm_size_changed (get_shell_wm (), actor);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_size_change (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
|
@ -12,6 +12,8 @@ void _shell_wm_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_unminimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_size_changed(ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_size_change(ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
|
@ -21,6 +21,7 @@ enum
|
||||
{
|
||||
MINIMIZE,
|
||||
UNMINIMIZE,
|
||||
SIZE_CHANGED,
|
||||
SIZE_CHANGE,
|
||||
MAP,
|
||||
DESTROY,
|
||||
@ -74,6 +75,14 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[SIZE_CHANGED] =
|
||||
g_signal_new ("size-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[SIZE_CHANGE] =
|
||||
g_signal_new ("size-change",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -329,6 +338,13 @@ _shell_wm_unminimize (ShellWM *wm,
|
||||
g_signal_emit (wm, shell_wm_signals[UNMINIMIZE], 0, actor);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_size_changed (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[SIZE_CHANGED], 0, actor);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_size_change (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
|
Loading…
Reference in New Issue
Block a user