diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c index 5240e1711..45d88b862 100644 --- a/src/compositor/plugins/default.c +++ b/src/compositor/plugins/default.c @@ -470,12 +470,20 @@ init_keymap (MetaDefaultPlugin *self) x11_layout, x11_variant, x11_options); } +static void +prepare_shutdown (MetaBackend *backend, + MetaDefaultPlugin *plugin) +{ + kill_switch_workspace (META_PLUGIN (plugin)); +} + static void start (MetaPlugin *plugin) { MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin); MetaDisplay *display = meta_plugin_get_display (plugin); MetaMonitorManager *monitor_manager = meta_monitor_manager_get (); + MetaBackend *backend = meta_get_backend (); self->priv->background_group = meta_background_group_new (); clutter_actor_insert_child_below (meta_get_window_group_for_display (display), @@ -486,6 +494,10 @@ start (MetaPlugin *plugin) on_monitors_changed (monitor_manager, plugin); + g_signal_connect (backend, "prepare-shutdown", + G_CALLBACK (prepare_shutdown), + self); + if (meta_is_wayland_compositor ()) init_keymap (self);