From 44cc2fd9264060a8734f485411a4f0011996a230 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 4 Feb 2020 08:11:29 -0500 Subject: Some consistency issues with screen sizes. Need to use full screen geometry, not availableGeometry. Available geometry is full geom with reserved space around the edges removed. --- src-qt5/core/lumina-desktop/LSession.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src-qt5/core/lumina-desktop/LSession.cpp') diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 2841d94c..a49bbc96 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -495,8 +495,8 @@ void LSession::updateDesktops(){ QList::const_iterator it; int i = 0; for(it = screens.constBegin(); it != screens.constEnd(); ++it, ++i) { - screenRect = screenRect.united((*it)->availableGeometry()); - qDebug() << " -- Screen["+QString::number(i)+"]:" << (*it)->availableGeometry(); + screenRect = screenRect.united((*it)->geometry()); + qDebug() << " -- Screen["+QString::number(i)+"]:" << (*it)->geometry(); } bool firstrun = (DESKTOPS.length()==0); @@ -529,7 +529,7 @@ void LSession::updateDesktops(){ QList dnums; //keep track of which screens are already managed QList geoms; for(int i=0; iScreen() < 0 || DESKTOPS[i]->Screen() >= sC || geoms.contains(screens.at(i)->availableGeometry())) { + if ( DESKTOPS[i]->Screen() < 0 || DESKTOPS[i]->Screen() >= sC || geoms.contains(screens.at(i)->geometry())) { //qDebug() << " - Close desktop:" << i; qDebug() << " - Close desktop on screen:" << DESKTOPS[i]->Screen(); DESKTOPS[i]->prepareToClose(); @@ -541,7 +541,7 @@ void LSession::updateDesktops(){ DESKTOPS[i]->UpdateGeometry(); DESKTOPS[i]->show(); dnums << DESKTOPS[i]->Screen(); - geoms << screens.at(i)->availableGeometry(); + geoms << screens.at(i)->geometry(); } } @@ -550,11 +550,11 @@ void LSession::updateDesktops(){ QList scrns = QApplication::screens(); for(int i=0; iname(); - if(!dnums.contains(i) && !geoms.contains(screens.at(i)->availableGeometry()) ){ + if(!dnums.contains(i) && !geoms.contains(screens.at(i)->geometry()) ){ //Start the desktop on this screen qDebug() << " - Start desktop on screen:" << i; DESKTOPS << new LDesktop(i); - geoms << screens.at(i)->availableGeometry(); + geoms << screens.at(i)->geometry(); } } dset.setValue("last_used_screens", allNames); @@ -608,7 +608,7 @@ void LSession::adjustWindowGeom(WId win, bool maximize){ QRect desk; QList screens = QGuiApplication::screens(); for(int i=0; iavailableGeometry().contains(geom.center()) ){ + if( screens.at(i)->geometry().contains(geom.center()) ){ //Window is on this screen if(DEBUG){ qDebug() << " - On Screen:" << DESKTOPS[i]->Screen(); } desk = DESKTOPS[i]->availableScreenGeom(); @@ -784,7 +784,7 @@ void LSession::RootSizeChange(){ QList screens = QGuiApplication::screens(); QList::const_iterator it; for(it = screens.constBegin(); it != screens.constEnd(); ++it) { - tmp = tmp.united( (*it)->availableGeometry() ); + tmp = tmp.united( (*it)->geometry() ); } if(tmp == screenRect){ return; } //false event - session size did not change qDebug() << "Got Root Size Change"; -- cgit