diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c index acd022a1c..ab5ebec6e 100644 --- a/src/gnome-shell-plugin.c +++ b/src/gnome-shell-plugin.c @@ -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, diff --git a/src/shell-wm-private.h b/src/shell-wm-private.h index 5b4089ad9..7e0399c59 100644 --- a/src/shell-wm-private.h +++ b/src/shell-wm-private.h @@ -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, diff --git a/src/shell-wm.c b/src/shell-wm.c index bc50fb61f..0b3f9258c 100644 --- a/src/shell-wm.c +++ b/src/shell-wm.c @@ -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,