Skip to content

Commit

Permalink
chore: support launch dock and launcher
Browse files Browse the repository at this point in the history
launch dock by default

Log:
  • Loading branch information
justforlxz committed Dec 12, 2023
1 parent b388cca commit b23162c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/treeland/treeland-fake-session/fake-session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QWindow>
#include <QTimer>
#include <QtGui/qpa/qplatformnativeinterface.h>
#include <QDBusInterface>

#include <sys/types.h>
#include <pwd.h>
Expand Down Expand Up @@ -124,12 +125,8 @@ FakeSession::FakeSession(int argc, char* argv[])
auto keyEnum = static_cast<Qt::Key>(keycode);
auto modifyEnum = static_cast<Qt::KeyboardModifiers>(modify);
qDebug() << keyEnum << modifyEnum;
if (keyEnum == Qt::Key_Super_L && modifyEnum == Qt::NoModifier) {
static QProcess process;
if (process.state() == QProcess::ProcessState::Running) {
process.kill();
}
process.start("dofi", {"-S", "run"});
if ((keyEnum == Qt::Key_Super_L && modifyEnum == Qt::NoModifier) || (keyEnum == Qt::Key_Meta && modifyEnum == Qt::MetaModifier)) {
QProcess::startDetached("dde-launchpad", {"-t", "-platform", "wayland"});
return;
}
if (keyEnum == Qt::Key_T && modifyEnum.testFlags(Qt::ControlModifier | Qt::AltModifier)) {
Expand All @@ -153,6 +150,8 @@ FakeSession::FakeSession(int argc, char* argv[])
});

emit m_shortcutManager->activeChanged();

QProcess::startDetached("dde-shell", {"-p", "org.deepin.ds.dock"});
}

int main (int argc, char *argv[]) {
Expand Down

0 comments on commit b23162c

Please sign in to comment.