diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-08-19 22:26:54 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-10-21 18:34:02 -0500 |
commit | 40526154b709a62f45c832c02fb5d1ef56e16754 (patch) | |
tree | d0551f5e9fb34557ac3d16b62d1c24e0568e7e07 /user/sddm/cleanup-xorg.patch | |
parent | c27ed30b35be8092053a8e7210d10b4e0a8792e8 (diff) | |
download | packages-40526154b709a62f45c832c02fb5d1ef56e16754.tar.gz packages-40526154b709a62f45c832c02fb5d1ef56e16754.tar.bz2 packages-40526154b709a62f45c832c02fb5d1ef56e16754.tar.xz packages-40526154b709a62f45c832c02fb5d1ef56e16754.zip |
user/sddm: Update to 0.19.0
Fixes: #368, #646
Diffstat (limited to 'user/sddm/cleanup-xorg.patch')
-rw-r--r-- | user/sddm/cleanup-xorg.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/user/sddm/cleanup-xorg.patch b/user/sddm/cleanup-xorg.patch new file mode 100644 index 000000000..7949b2dbf --- /dev/null +++ b/user/sddm/cleanup-xorg.patch @@ -0,0 +1,63 @@ +From 3b00cd06f82837ba85f37c9f632261e7b4c6fd35 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt <fabian@ritter-vogt.de> +Date: Wed, 9 Dec 2020 19:28:41 +0100 +Subject: [PATCH] Explicitly stop Xorg when starting fails + +When Xorg starts but there is an error, stop it explicitly instead of assuming +that X exits itself. This avoids a possibly lingering Xorg process in the +XorgDisplayServer instance. Add a check and warning message if Xorg is +restarted too early (shouldn't happen). +--- + src/daemon/XorgDisplayServer.cpp | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp +index 5f40fe8c3..3a7bee0d8 100644 +--- a/src/daemon/XorgDisplayServer.cpp ++++ b/src/daemon/XorgDisplayServer.cpp +@@ -118,6 +118,11 @@ namespace SDDM { + if (m_started) + return false; + ++ if (process) { ++ qCritical() << "Tried to start Xorg before previous instance exited"; ++ return false; ++ } ++ + // create process + process = new QProcess(this); + +@@ -195,6 +200,7 @@ namespace SDDM { + qCritical("Failed to open pipe to start X Server"); + + close(pipeFds[0]); ++ stop(); + return false; + } + QByteArray displayNumber = readPipe.readLine(); +@@ -203,6 +209,7 @@ namespace SDDM { + qCritical("Failed to read display number from pipe"); + + close(pipeFds[0]); ++ stop(); + return false; + } + displayNumber.prepend(QByteArray(":")); +@@ -219,6 +226,7 @@ namespace SDDM { + if(m_display != QStringLiteral(":0")) { + if(!addCookie(m_authPath)) { + qCritical() << "Failed to write xauth file"; ++ stop(); + return false; + } + } +@@ -232,8 +240,7 @@ namespace SDDM { + } + + void XorgDisplayServer::stop() { +- // check flag +- if (!m_started) ++ if (!process) + return; + + // log message |