Skip to content

Commit

Permalink
fix: ctrl c will crash
Browse files Browse the repository at this point in the history
as title

Log:
  • Loading branch information
justforlxz authored and Groveer committed Jul 26, 2024
1 parent b9d26b9 commit 1a23f56
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions src/daemon/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 0 additions & 1 deletion src/daemon/Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ namespace DDM {

Seat *seat() const;
void switchToUser(const QString &user);
void activateUser(const QString &user);

QVector<Auth*> loginedSession() const {
return m_auths;
Expand Down
1 change: 0 additions & 1 deletion src/daemon/SingleWaylandDisplayServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ void SingleWaylandDisplayServer::activateUser(const QString &user) {
}

SocketWriter(greeter) << quint32(DaemonMessages::UserActivateMessage) << user;
displayPtr()->activateUser(user); // IOCTL activate
}
}

Expand Down

0 comments on commit 1a23f56

Please sign in to comment.