From 1a23f565ece617ec41e27dc3345062252399331d Mon Sep 17 00:00:00 2001 From: Zhang Dingyuan Date: Fri, 26 Jul 2024 14:30:37 +0800 Subject: [PATCH] fix: ctrl c will crash as title Log: --- src/daemon/Display.cpp | 11 ----------- src/daemon/Display.h | 1 - src/daemon/SingleWaylandDisplayServer.cpp | 1 - 3 files changed, 13 deletions(-) diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index 00faefb..a422c3d 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -210,17 +210,6 @@ namespace DDM { server->activateUser(user); } - void Display::activateUser(const QString &user) { - for (auto auth : m_auths) { - if (auth->user() == user) { - QString ttyString = VirtualTerminal::path(auth->tty()); - int vtFd = open(qPrintable(ttyString), O_RDWR | O_NOCTTY); - qDebug() << user << " ioctl " << ioctl(vtFd, VT_ACTIVATE, auth->tty()); - break; - } - } - } - bool Display::start() { return m_started || m_displayServer->start(); } diff --git a/src/daemon/Display.h b/src/daemon/Display.h index 827e643..4ec2849 100644 --- a/src/daemon/Display.h +++ b/src/daemon/Display.h @@ -66,7 +66,6 @@ namespace DDM { Seat *seat() const; void switchToUser(const QString &user); - void activateUser(const QString &user); QVector loginedSession() const { return m_auths; diff --git a/src/daemon/SingleWaylandDisplayServer.cpp b/src/daemon/SingleWaylandDisplayServer.cpp index 6aee8d4..a673c72 100644 --- a/src/daemon/SingleWaylandDisplayServer.cpp +++ b/src/daemon/SingleWaylandDisplayServer.cpp @@ -76,7 +76,6 @@ void SingleWaylandDisplayServer::activateUser(const QString &user) { } SocketWriter(greeter) << quint32(DaemonMessages::UserActivateMessage) << user; - displayPtr()->activateUser(user); // IOCTL activate } }