mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
First attempt of Ctrl+Tab/Ctrl+Shift+Tab UI.
This commit is contained in:
@@ -656,8 +656,20 @@ bool Application::eventFilter(QObject *object, QEvent *e) {
|
||||
updateNonIdle();
|
||||
} break;
|
||||
|
||||
case QEvent::KeyRelease: {
|
||||
const auto event = static_cast<QKeyEvent*>(e);
|
||||
if (Shortcuts::HandlePossibleChatSwitch(event)) {
|
||||
return true;
|
||||
}
|
||||
} break;
|
||||
|
||||
case QEvent::ShortcutOverride: {
|
||||
// handle shortcuts ourselves
|
||||
// Ctrl+Tab/Ctrl+Shift+Tab chat switch is a special shortcut case,
|
||||
// because it not only does an action on the shortcut activation,
|
||||
// but also keeps the UI visible until you release the Ctrl key.
|
||||
Shortcuts::HandlePossibleChatSwitch(static_cast<QKeyEvent*>(e));
|
||||
|
||||
// Handle all the shortcut management manually.
|
||||
return true;
|
||||
} break;
|
||||
|
||||
|
Reference in New Issue
Block a user