Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions QtScrcpy/ui/videoform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ void VideoForm::switchFullScreen()
}

showNormal();
// back to normal size.
resize(m_normalSize);
// fullscreen window will move (0,0). qt bug?
move(m_fullScreenBeforePos);

Expand All @@ -487,6 +489,9 @@ void VideoForm::switchFullScreen()
ui->keepRatioWidget->setWidthHeightRatio(-1.0f);
}

// record current size before fullscreen, it will be used to rollback size after exit fullscreen.
m_normalSize = size();

m_fullScreenBeforePos = pos();
// 这种临时增加标题栏再全屏的方案会导致收不到mousemove事件,导致setmousetrack失效
// mac fullscreen must show title bar
Expand Down
1 change: 1 addition & 0 deletions QtScrcpy/ui/videoform.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class VideoForm : public QWidget, public qsc::DeviceObserver

//inside member
QSize m_frameSize;
QSize m_normalSize;
QPoint m_dragPosition;
float m_widthHeightRatio = 0.5f;
bool m_skin = true;
Expand Down