UI: Disable hotkeys when a user is expected to type text
Disable hotkeys when a user starts an interaction with the UI where they are expected to type text and re-enable hotkeys when the interaction is completed.
This commit is contained in:
parent
ee30a83a6f
commit
f832d14220
7 changed files with 24 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ OBSBasicInteraction::OBSBasicInteraction(QWidget *parent, OBSSource source_)
|
|||
};
|
||||
|
||||
connect(ui->preview, &OBSQTDisplay::DisplayCreated, addDrawCallback);
|
||||
App()->DisableHotkeys();
|
||||
}
|
||||
|
||||
OBSBasicInteraction::~OBSBasicInteraction()
|
||||
|
|
@ -74,6 +75,7 @@ OBSBasicInteraction::~OBSBasicInteraction()
|
|||
// since QT fakes a mouse movement while destructing a widget
|
||||
// remove our event filter
|
||||
ui->preview->removeEventFilter(eventFilter.get());
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
}
|
||||
|
||||
OBSEventFilter *OBSBasicInteraction::BuildEventFilter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue