aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/libLumina/LDesktopUtils.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp
index eccba090..e47234d9 100644
--- a/src-qt5/core/libLumina/LDesktopUtils.cpp
+++ b/src-qt5/core/libLumina/LDesktopUtils.cpp
@@ -164,12 +164,14 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){
//Find the number of the left-most desktop screen
QString screen = "0";
QRect screenGeom;
- QDesktopWidget *desk =QApplication::desktop();
- for(int i=0; i<desk->screenCount(); i++){
- if(desk->screenGeometry(i).x()==0){
- screen = QString::number(i);
- screenGeom = desk->screenGeometry(i);
- break;
+ QList<QScreen*> screens = QGuiApplication::screens();
+ QList<QScreen*>::const_iterator it;
+ int i = 0;
+ for(it = screens.constBegin(); it != screens.constEnd(); ++it, ++i) {
+ if((*it)->availableGeometry().x()==0) {
+ screen = i;
+ screenGeom = (*it)->availableGeometry();
+ break;
}
}
//Now setup the default "desktopsettings.conf" and "sessionsettings.conf" files
bgstack15