summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2022-09-02 16:49:29 +0200
committerDaniel van Vugt <daniel.van.vugt@canonical.com>2023-02-07 17:11:44 +0800
commitaaa969e2436f3ad2b5bdcbd8bccbc29371a93e49 (patch)
tree2a0c7eda245b020b985fd24abfd134a9e87307f4
parent3cc9c1ac7e8ac8172f5574f9c8f4fb08a3241d48 (diff)
downloadmutter-aaa969e2436f3ad2b5bdcbd8bccbc29371a93e49.tar.gz
x11/session: Set the context as client data on connection watch
It was already assumed to be the context, but we never set it as such, so things just crashed instead. Now when we set it up correctly, hopefully that won't happen anymore. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2406 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2267 Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5078 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2609> (cherry picked from commit 60b382c4e36fbcdb4d7e98d5590650890b9243e8)
-rw-r--r--src/x11/session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/x11/session.c b/src/x11/session.c
index 5b4879bc0..29368ad70 100644
--- a/src/x11/session.c
+++ b/src/x11/session.c
@@ -175,7 +175,7 @@ ice_io_error_handler (IceConn connection)
}
static void
-ice_init (void)
+ice_init (MetaContext *context)
{
static gboolean ice_initted = FALSE;
@@ -189,7 +189,7 @@ ice_init (void)
if (ice_installed_handler == default_handler)
ice_installed_handler = NULL;
- IceAddConnectionWatch (new_ice_connection, NULL);
+ IceAddConnectionWatch (new_ice_connection, context);
ice_initted = TRUE;
}
@@ -272,7 +272,7 @@ meta_session_init (MetaContext *context,
saved_client_id = NULL;
}
- ice_init ();
+ ice_init (context);
mask = SmcSaveYourselfProcMask | SmcDieProcMask |
SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask;