Qt: Improve handling of exclusive fullscreen loss

Exclusive fullscreen will be re-requested automatically when the window
regains focus.
This commit is contained in:
Connor McLaughlin
2021-02-25 12:51:43 +10:00
parent defea38a60
commit bfb575cf40
6 changed files with 56 additions and 9 deletions

View File

@ -202,6 +202,22 @@ bool QtDisplayWidget::event(QEvent* event)
return true;
}
case QEvent::FocusIn:
{
QWidget::event(event);
emit windowFocusEvent();
return true;
}
case QEvent::ActivationChange:
{
QWidget::event(event);
if (isActiveWindow())
emit windowFocusEvent();
return true;
}
default:
return QWidget::event(event);
}