[gdm] libgdm: refactor session list handling code
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] libgdm: refactor session list handling code
- Date: Sat, 7 Nov 2015 03:21:28 +0000 (UTC)
commit 754754c9b6f8da6066a37c47141c97da71d95e39
Author: Ray Strode <rstrode redhat com>
Date: Mon Jun 15 15:03:51 2015 -0400
libgdm: refactor session list handling code
This commit splits the code for getting sessions up into two chunks:
xorg and wayland.
This is necessary because future commits will treat xorg and wayland
sessions differently.
https://bugzilla.gnome.org/show_bug.cgi?id=757715
libgdm/gdm-sessions.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
index 08220fe..db62516 100644
--- a/libgdm/gdm-sessions.c
+++ b/libgdm/gdm-sessions.c
@@ -188,25 +188,35 @@ static void
collect_sessions (void)
{
int i;
- const char *search_dirs[] = {
+ const char *xorg_search_dirs[] = {
"/etc/X11/sessions/",
DMCONFDIR "/Sessions/",
DATADIR "/gdm/BuiltInSessions/",
DATADIR "/xsessions/",
+ NULL
+ };
+
#ifdef ENABLE_WAYLAND_SUPPORT
+ const char *wayland_search_dirs[] = {
DATADIR "/wayland-sessions/",
-#endif
NULL
};
+#endif
if (gdm_available_sessions_map == NULL) {
gdm_available_sessions_map = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_free);
}
- for (i = 0; search_dirs [i] != NULL; i++) {
- collect_sessions_from_directory (search_dirs [i]);
+ for (i = 0; xorg_search_dirs [i] != NULL; i++) {
+ collect_sessions_from_directory (xorg_search_dirs [i]);
}
+
+#ifdef ENABLE_WAYLAND_SUPPORT
+ for (i = 0; wayland_search_dirs [i] != NULL; i++) {
+ collect_sessions_from_directory (wayland_search_dirs [i]);
+ }
+#endif
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]