diff options
Diffstat (limited to 'src/windowmanager.cpp')
-rw-r--r-- | src/windowmanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/windowmanager.cpp b/src/windowmanager.cpp index 077801e..2505c89 100644 --- a/src/windowmanager.cpp +++ b/src/windowmanager.cpp @@ -23,10 +23,12 @@ void ensureRunning() wm.closeReadChannel(QProcess::StandardOutput); wm.closeWriteChannel(); wm.waitForStarted(500); - QTimer::singleShot(100, []() { + QTimer::singleShot(500, []() { if (wm.state() == QProcess::Running) { qDebug() << "- Spawned openbox"; QObject::connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, killInstance); + // Try to make vmchooser the foreground window again, since starting the WM after + // vmchooser makes it lose focus QProcess::startDetached("wmctrl", QStringList() << "-a" << "vmchooser" << "-F"); } else if (wm.exitCode() == 0) { qDebug() << "- A WM is already running"; |