summaryrefslogblamecommitdiff
path: root/user/sddm/revert-fedora.patch
blob: 63bb58395f1644c983e6e60e5d75e3b13c1c41b5 (plain) (tree)









































































                                                                                                             
From 994fa67b01ccfac1aaac08572302bbbea7842dc3 Mon Sep 17 00:00:00 2001
Subject: Revert: Prefer Wayland sessions over X11 ones

Reference: https://fedoraproject.org/wiki/Changes/WaylandByDefaultForPlasma
---
 src/common/Session.cpp       | 8 ++++----
 src/daemon/Display.cpp       | 6 +++---
 src/greeter/SessionModel.cpp | 6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

--- b/src/common/Session.cpp
+++ a/src/common/Session.cpp
@@ -131,14 +131,14 @@
         m_desktopNames.clear();
 
         switch (type) {
+        case X11Session:
+            m_dir = QDir(mainConfig.X11.SessionDir.get());
+            m_xdgSessionType = QStringLiteral("x11");
+            break;
         case WaylandSession:
             m_dir = QDir(mainConfig.Wayland.SessionDir.get());
             m_xdgSessionType = QStringLiteral("wayland");
             break;
-        case X11Session:
-            m_dir = QDir(mainConfig.X11.SessionDir.get());
-            m_xdgSessionType = QStringLiteral("x11");
-            break;
         default:
             m_xdgSessionType.clear();
             break;
--- b/src/daemon/Display.cpp
+++ a/src/daemon/Display.cpp
@@ -115,10 +115,10 @@
         if (autologinSession.isEmpty()) {
             autologinSession = stateConfig.Last.Session.get();
         }
+        if (findSessionEntry(mainConfig.X11.SessionDir.get(), autologinSession)) {
+            sessionType = Session::X11Session;
+        } else if (findSessionEntry(mainConfig.Wayland.SessionDir.get(), autologinSession)) {
-        if (findSessionEntry(mainConfig.Wayland.SessionDir.get(), autologinSession)) {
             sessionType = Session::WaylandSession;
-        } else if (findSessionEntry(mainConfig.X11.SessionDir.get(), autologinSession)) {
-            sessionType = Session::X11Session;
         } else {
             qCritical() << "Unable to find autologin session entry" << autologinSession;
             return false;
--- b/src/greeter/SessionModel.cpp
+++ a/src/greeter/SessionModel.cpp
@@ -41,8 +41,8 @@
     SessionModel::SessionModel(QObject *parent) : QAbstractListModel(parent), d(new SessionModelPrivate()) {
         // initial population
         beginResetModel();
+        populate(Session::X11Session, mainConfig.X11.SessionDir.get());
         populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
-        populate(Session::X11Session, mainConfig.X11.SessionDir.get());
         endResetModel();
 
         // refresh everytime a file is changed, added or removed
@@ -50,12 +50,12 @@
         connect(watcher, &QFileSystemWatcher::directoryChanged, [this](const QString &path) {
             beginResetModel();
             d->sessions.clear();
+            populate(Session::X11Session, mainConfig.X11.SessionDir.get());
             populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
-            populate(Session::X11Session, mainConfig.X11.SessionDir.get());
             endResetModel();
         });
+        watcher->addPath(mainConfig.X11.SessionDir.get());
         watcher->addPath(mainConfig.Wayland.SessionDir.get());
-        watcher->addPath(mainConfig.X11.SessionDir.get());
     }
 
     SessionModel::~SessionModel() {