diff options
author | Ken Moore <ken@ixsystems.com> | 2020-02-04 08:11:29 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2020-02-04 08:11:29 -0500 |
commit | 44cc2fd9264060a8734f485411a4f0011996a230 (patch) | |
tree | e3a4e0bf56dfbb203138507f45fa5cc7aa117e84 /src-qt5/core/lumina-desktop/LSession.cpp | |
parent | Tag version 1.6.0 (diff) | |
download | lumina-44cc2fd9264060a8734f485411a4f0011996a230.tar.gz lumina-44cc2fd9264060a8734f485411a4f0011996a230.tar.bz2 lumina-44cc2fd9264060a8734f485411a4f0011996a230.zip |
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.
Diffstat (limited to 'src-qt5/core/lumina-desktop/LSession.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<QScreen*>::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<int> dnums; //keep track of which screens are already managed QList<QRect> geoms; for(int i=0; i<DESKTOPS.length(); i++){ - if ( DESKTOPS[i]->Screen() < 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<QScreen*> scrns = QApplication::screens(); for(int i=0; i<sC; i++){ allNames << scrns.at(i)->name(); - 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<QScreen *> screens = QGuiApplication::screens(); for(int i=0; i<DESKTOPS.length(); i++){ - if( screens.at(i)->availableGeometry().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<QScreen*> screens = QGuiApplication::screens(); QList<QScreen*>::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"; |