fix: multi monitor issue

taken the changes from From 83020389c8
This commit is contained in:
YiFang Xiao 2023-05-13 20:05:47 +08:00 committed by xiaoyifang
parent 3265912b28
commit dfd8112f76
2 changed files with 10 additions and 2 deletions

View file

@ -52,7 +52,11 @@ void ScanFlag::showScanFlag()
QPoint currentPos = QCursor::pos();
QRect desktop = QGuiApplication::primaryScreen()->geometry();
auto screen = QGuiApplication::screenAt( currentPos );
if ( !screen )
return;
QRect desktop = screen->geometry();
QSize windowSize = geometry().size();

View file

@ -522,7 +522,11 @@ void ScanPopup::engagePopup( bool forcePopup, bool giveFocus )
QPoint currentPos = QCursor::pos();
QRect desktop = QGuiApplication::primaryScreen()->geometry();
auto screen = QGuiApplication::screenAt( currentPos );
if ( !screen )
return;
QRect desktop = screen->geometry();
QSize windowSize = geometry().size();