Add tip text to the StreamSegue telling users about the quit shortcut. Fixes #77

This commit is contained in:
Cameron Gutman 2018-09-14 19:11:06 -07:00
parent eed9fca10c
commit 72afa55897
2 changed files with 20 additions and 2 deletions

View file

@ -104,6 +104,18 @@ Item {
}
}
Label {
text: "Tip: Press Ctrl+Alt+Shift+Q to disconnect your session"
anchors.bottom: parent.bottom
anchors.bottomMargin: 50
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: 18
verticalAlignment: Text.AlignVCenter
wrapMode: Text.Wrap
color: "white"
}
MessageDialog {
id: errorDialog
modality:Qt.WindowModal

View file

@ -721,8 +721,14 @@ void Session::exec(int displayOriginX, int displayOriginY)
return;
}
// Manually pump the UI thread for the view
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
// Wait 1.5 seconds before connecting to let the user
// have time to read any messages present on the segue
uint32_t start = SDL_GetTicks();
while (!SDL_TICKS_PASSED(SDL_GetTicks(), start + 1500)) {
// Pump the UI loop while we wait
SDL_Delay(5);
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
// Wait for any old session to finish cleanup
s_ActiveSessionSemaphore.acquire();