From 9df52164fe5cb7d00eca77685e90bcb2dcdee721 Mon Sep 17 00:00:00 2001 From: WorldFS Date: Tue, 15 Aug 2023 10:27:02 +0800 Subject: [PATCH] UI: Only allow click to drag projector when in frameless mode --- UI/window-projector.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/UI/window-projector.cpp b/UI/window-projector.cpp index f531ef204d4baa..d4020a1bb311c8 100644 --- a/UI/window-projector.cpp +++ b/UI/window-projector.cpp @@ -354,7 +354,8 @@ void OBSProjector::mousePressEvent(QMouseEvent *event) void OBSProjector::mouseMoveEvent(QMouseEvent *event) { - if (!isFullScreen() && (event->buttons() & Qt::LeftButton)) { + if (!isFullScreen() && hideFrame && + (event->buttons() & Qt::LeftButton)) { QPoint diff = event->pos() - onMousePressMouseOffset; this->window()->move(this->window()->pos() + diff); } @@ -362,7 +363,7 @@ void OBSProjector::mouseMoveEvent(QMouseEvent *event) void OBSProjector::enterEvent(QEnterEvent *) { - if (!isFullScreen()) { + if (!isFullScreen() && hideFrame) { setCursor(Qt::SizeAllCursor); } } @@ -577,10 +578,8 @@ QRect OBSProjector::GetScreenSize() std::vector> OBSProjector::GetResizeResolutionPresets() { - int resolutionPresets[][2] = {{1280, 720}, - {1920, 1080}, - {2560, 1440}, - {3840, 2160}}; + int resolutionPresets[][2] = { + {1280, 720}, {1920, 1080}, {2560, 1440}, {3840, 2160}}; std::vector> availablePresets; QRect screenSize = GetScreenSize();