mirror of
https://github.com/86Box/86Box.git
synced 2025-01-23 17:52:01 -05:00
qt: Disable processing of alt-f4 in windows.
Prevents the alt-f4 from quiting 86Box.
This commit is contained in:
parent
fd53393686
commit
989926cb7f
2 changed files with 14 additions and 3 deletions
|
@ -437,6 +437,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event) {
|
||||
if (mouse_capture) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
if (confirm_exit && confirm_exit_cmdl && cpu_thread_run)
|
||||
{
|
||||
QMessageBox questionbox(QMessageBox::Icon::Question, "86Box", tr("Are you sure you want to exit 86Box?"), QMessageBox::Yes | QMessageBox::No, this);
|
||||
|
|
|
@ -116,13 +116,19 @@ bool WindowsRawInputFilter::nativeEventFilter(const QByteArray &eventType, void
|
|||
{
|
||||
MSG *msg = static_cast<MSG *>(message);
|
||||
|
||||
if (msg->message == WM_INPUT)
|
||||
{
|
||||
if (msg->message == WM_INPUT) {
|
||||
if (window->isActiveWindow() && menus_open == 0)
|
||||
handle_input((HRAWINPUT)msg->lParam);
|
||||
handle_input((HRAWINPUT) msg->lParam);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Stop processing of Alt-F4 */
|
||||
if (msg->message == WM_SYSKEYDOWN) {
|
||||
if (msg->wParam == 0x73) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue