Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ctrl c will crash #17

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading