default-plugin: Kill workspace switch animation on shutdown
The workspace switch animation moves the WindowActors out of the WindowGroup so if we shut down while the animation is playing the WindowActors will have queued a destroy but will be disposed only after the compositor is destroyed, leaving the WindowActor with a dangling pointer. Fix the issue by killing the workspace switch animation on shutdown. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2489>
This commit is contained in:
parent
9117419940
commit
bc6af4f1c8
@ -470,12 +470,20 @@ init_keymap (MetaDefaultPlugin *self)
|
|||||||
x11_layout, x11_variant, x11_options);
|
x11_layout, x11_variant, x11_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
prepare_shutdown (MetaBackend *backend,
|
||||||
|
MetaDefaultPlugin *plugin)
|
||||||
|
{
|
||||||
|
kill_switch_workspace (META_PLUGIN (plugin));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
start (MetaPlugin *plugin)
|
start (MetaPlugin *plugin)
|
||||||
{
|
{
|
||||||
MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
|
MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
|
||||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||||
MetaMonitorManager *monitor_manager = meta_monitor_manager_get ();
|
MetaMonitorManager *monitor_manager = meta_monitor_manager_get ();
|
||||||
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
|
||||||
self->priv->background_group = meta_background_group_new ();
|
self->priv->background_group = meta_background_group_new ();
|
||||||
clutter_actor_insert_child_below (meta_get_window_group_for_display (display),
|
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);
|
on_monitors_changed (monitor_manager, plugin);
|
||||||
|
|
||||||
|
g_signal_connect (backend, "prepare-shutdown",
|
||||||
|
G_CALLBACK (prepare_shutdown),
|
||||||
|
self);
|
||||||
|
|
||||||
if (meta_is_wayland_compositor ())
|
if (meta_is_wayland_compositor ())
|
||||||
init_keymap (self);
|
init_keymap (self);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user