diff options
author | Ken Moore <ken@ixsystems.com> | 2016-10-20 08:48:42 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-10-20 08:48:42 -0400 |
commit | 9cb6e2099d9fc8781f0f7a960b67fd1eaa8a8a2d (patch) | |
tree | 9df49130060629e5adf1f6765ef5d2b120d67ab9 /src-qt5/core | |
parent | Add a new audio file for a low-battery notification. (diff) | |
download | lumina-9cb6e2099d9fc8781f0f7a960b67fd1eaa8a8a2d.tar.gz lumina-9cb6e2099d9fc8781f0f7a960b67fd1eaa8a8a2d.tar.bz2 lumina-9cb6e2099d9fc8781f0f7a960b67fd1eaa8a8a2d.zip |
Quick update to ensure that 2 monitors are not cloned - only show one of them in that case.
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 4e0a8f59..8c8562d4 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -391,8 +391,9 @@ void LSession::updateDesktops(){ //First clean up any current desktops 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() >= sC) { + if (DESKTOPS[i]->Screen() >= sC || geoms.contains(DW->screenGeometry(DESKTOPS[i]->Screen())) ) { //qDebug() << " - Close desktop:" << i; qDebug() << " - Close desktop on screen:" << DESKTOPS[i]->Screen(); DESKTOPS[i]->prepareToClose(); @@ -404,15 +405,17 @@ void LSession::updateDesktops(){ DESKTOPS[i]->UpdateGeometry(); DESKTOPS[i]->show(); dnums << DESKTOPS[i]->Screen(); + geoms << DW->screenGeometry(DESKTOPS[i]->Screen()); } } //Now add any new desktops for(int i=0; i<sC; i++){ - if(!dnums.contains(i)){ + if(!dnums.contains(i) && !geoms.contains(DW->screenGeometry(i)) ){ //Start the desktop on this screen qDebug() << " - Start desktop on screen:" << i; DESKTOPS << new LDesktop(i); + geoms << DW->screenGeometry(i); } } |