Skip to content

Commit

Permalink
UI: Only allow click to drag projector when in frameless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fsworld009 committed Feb 12, 2024
1 parent 653426d commit 9df5216
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions UI/window-projector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,16 @@ 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);
}
}

void OBSProjector::enterEvent(QEnterEvent *)
{
if (!isFullScreen()) {
if (!isFullScreen() && hideFrame) {
setCursor(Qt::SizeAllCursor);
}
}
Expand Down Expand Up @@ -577,10 +578,8 @@ QRect OBSProjector::GetScreenSize()

std::vector<std::pair<int, int>> 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<std::pair<int, int>> availablePresets;

QRect screenSize = GetScreenSize();
Expand Down

0 comments on commit 9df5216

Please sign in to comment.