|
|
|
|
@ -327,13 +327,11 @@ bool DisplayWidget::event(QEvent* event)
|
|
|
|
|
|
|
|
|
|
case QEvent::MouseButtonDblClick:
|
|
|
|
|
{
|
|
|
|
|
// since we don't get press and release events for double-click, we need to send both the down and up
|
|
|
|
|
// otherwise the second click in a double click won't be registered by the input system
|
|
|
|
|
// we don't get press events for double-click, the dblclick event is substituted instead
|
|
|
|
|
if (!m_relative_mouse_enabled || !InputManager::IsUsingRawInput())
|
|
|
|
|
{
|
|
|
|
|
const u32 button_index = CountTrailingZeros(static_cast<u32>(static_cast<const QMouseEvent*>(event)->button()));
|
|
|
|
|
emit windowMouseButtonEvent(static_cast<int>(button_index), true);
|
|
|
|
|
emit windowMouseButtonEvent(static_cast<int>(button_index), false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// don't toggle fullscreen when we're bound.. that wouldn't end well.
|
|
|
|
|
@ -344,6 +342,12 @@ bool DisplayWidget::event(QEvent* event)
|
|
|
|
|
Core::GetBoolSettingValue("Main", "DoubleClickTogglesFullscreen", true))
|
|
|
|
|
{
|
|
|
|
|
g_core_thread->toggleFullscreen();
|
|
|
|
|
|
|
|
|
|
// when swapping fullscreen, the window is going to get recreated, and we won't get the release event.
|
|
|
|
|
// therefore we need to trigger it here instead, otherwise it gets lost and imgui is confused.
|
|
|
|
|
// skip this if we're not running on wankland or using render-to-main, since the window is preserved.
|
|
|
|
|
if (QtHost::IsDisplayWidgetContainerNeeded() || g_main_window->canRenderToMainWindow())
|
|
|
|
|
Host::RunOnCoreThread(&ImGuiManager::ClearMouseButtonState);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|