mirror of
https://github.com/brl/mutter.git
synced 2025-08-07 09:04:41 +00:00
backend: Add 'prepare-shutdown' signal
This will be used to avoid doing various work when we're shutting down, e.g. react to changes triggering monitor reconfigurations. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
@@ -94,6 +94,7 @@ enum
|
||||
LAST_DEVICE_CHANGED,
|
||||
LID_IS_CLOSED_CHANGED,
|
||||
GPU_ADDED,
|
||||
PREPARE_SHUTDOWN,
|
||||
|
||||
N_SIGNALS
|
||||
};
|
||||
@@ -869,6 +870,13 @@ meta_backend_class_init (MetaBackendClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, META_TYPE_GPU);
|
||||
signals[PREPARE_SHUTDOWN] =
|
||||
g_signal_new ("prepare-shutdown",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
mutter_stage_views = g_getenv ("MUTTER_STAGE_VIEWS");
|
||||
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
|
||||
@@ -1485,6 +1493,12 @@ meta_release_backend (void)
|
||||
g_clear_object (&_backend);
|
||||
}
|
||||
|
||||
void
|
||||
meta_backend_prepare_shutdown (MetaBackend *backend)
|
||||
{
|
||||
g_signal_emit (backend, signals[PREPARE_SHUTDOWN], 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_is_stage_views_enabled:
|
||||
*
|
||||
|
Reference in New Issue
Block a user