diff options
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.cpp | 2 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktop.cpp | 15 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/SystemWindow.cpp | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/src-qt5/core/lumina-desktop/BootSplash.cpp b/src-qt5/core/lumina-desktop/BootSplash.cpp index cdf1a3c2..f3befeaf 100644 --- a/src-qt5/core/lumina-desktop/BootSplash.cpp +++ b/src-qt5/core/lumina-desktop/BootSplash.cpp @@ -11,7 +11,7 @@ BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowMana this->setMinimumWidth( this->minimumHeight() * 1.5); this->setObjectName("LuminaBootSplash"); //for theme styling //Center the window on the primary screen - QPoint ctr = QApplication::desktop()->screenGeometry().center(); + QPoint ctr = QGuiApplication::primaryScreen()->geometry().center(); this->move( ctr.x()-(this->width()/2), ctr.y()-(this->height()/2) ); generateTipOfTheDay(); ui->label_version->setText( QString(tr("Version %1")).arg(LDesktopUtils::LuminaDesktopVersion()) ); diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index e4706498..d4650433 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -208,7 +208,7 @@ void LDesktop::InitDesktop(){ checkResolution(); //Adjust the desktop config file first (if necessary) if(DEBUG){ qDebug() << "Init Desktop:" << Screen(); } //connect(desktop, SIGNAL(resized(int)), this, SLOT(UpdateGeometry(int))); - if(DEBUG){ qDebug() << "Desktop #"<<Screen()<<" -> "<< LSession::desktop()->screenGeometry(Screen()) << LSession::handle()->screenGeom(Screen()); } + if(DEBUG){ qDebug() << "Desktop #"<<Screen()<<" -> "<< QGuiApplication::screens().at(Screen())->availableGeometry() << LSession::handle()->screenGeom(Screen()); } deskMenu = new QMenu(0); connect(deskMenu, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); winMenu = new QMenu(0); @@ -241,7 +241,7 @@ void LDesktop::InitDesktop(){ if(DEBUG){ qDebug() << "Create bgDesktop"; } bgDesktop = new LDesktopPluginSpace(); int grid = settings->value(DPREFIX+"GridSize",-1).toInt(); - if(grid<0 && LSession::desktop()->screenGeometry(Screen()).height() > 2000){ grid = 200; } + if(grid<0 && QGuiApplication::screens().at(Screen())->availableGeometry().height() > 2000){ grid = 200; } else if(grid<0){ grid = 100; } bgDesktop->SetIconSize( grid ); bgDesktop->setContextMenuPolicy(Qt::CustomContextMenu); @@ -423,7 +423,7 @@ void LDesktop::RemoveDeskPlugin(QString ID){ void LDesktop::IncreaseDesktopPluginIcons(){ int cur = settings->value(DPREFIX+"GridSize",-1).toInt(); - if(cur<0 &&LSession::desktop()->screenGeometry(Screen()).height() > 2000){ cur = 200; } + if(cur<0 && QGuiApplication::screens().at(Screen())->availableGeometry().height() > 2000){ cur = 200; } else if(cur<0){ cur = 100; } cur+=16; issyncing=true; //don't let the change cause a refresh @@ -435,7 +435,7 @@ void LDesktop::IncreaseDesktopPluginIcons(){ void LDesktop::DecreaseDesktopPluginIcons(){ int cur = settings->value(DPREFIX+"GridSize",-1).toInt(); - if(cur<0 &&LSession::desktop()->screenGeometry(Screen()).height() > 2000){ cur = 200; } + if(cur<0 && QGuiApplication::screens().at(Screen())->availableGeometry().height() > 2000){ cur = 200; } else if(cur<0){ cur = 100; } if(cur<32){ return; } //cannot get smaller than 16x16 cur-=16; @@ -483,7 +483,7 @@ void LDesktop::UpdatePanels(){ } void LDesktop::UpdateDesktopPluginArea(){ - QRegion visReg(LSession::desktop()->screenGeometry(Screen()) ); //visible region (not hidden behind a panel) + QRegion visReg(QGuiApplication::screens().at(Screen())->availableGeometry() ); //visible region (not hidden behind a panel) QRect rawRect = visReg.boundingRect(); //initial value (screen size) //qDebug() << "Update Desktop Plugin Area:" << bgWindow->geometry(); for(int i=0; i<PANELS.length(); i++){ @@ -514,11 +514,12 @@ void LDesktop::UpdateDesktopPluginArea(){ //LSession::handle()->XCB->SetScreenWorkArea((unsigned int) Screen(), rec); //Now remove the X offset to place it on the current screen (needs widget-coords, not global) globalWorkRect = rec; //save this for later - rec.moveTopLeft( QPoint( rec.x()-LSession::desktop()->screenGeometry(Screen()).x() , rec.y()-LSession::desktop()->screenGeometry(Screen()).y() ) ); + rec.moveTopLeft( QPoint( rec.x()-QGuiApplication::screens().at(Screen())->availableGeometry().x() , rec.y()-QGuiApplication::screens().at(Screen())->availableGeometry().y() ) ); //qDebug() << "DPlug Area:" << rec << bgDesktop->geometry() << LSession::handle()->desktop()->availableGeometry(bgDesktop); if(rec.size().isNull() ){ return; } //|| rec == bgDesktop->geometry()){return; } //nothing changed //bgDesktop->show(); //make sure Fluxbox is aware of it *before* we start moving it - bgDesktop->setGeometry( LSession::desktop()->screenGeometry(Screen())); + + bgDesktop->setGeometry( QGuiApplication::screens().at(Screen())->availableGeometry()); //bgDesktop->resize(LSession::desktop()->screenGeometry(Screen()).size()); //bgDesktop->move(LSession::desktop()->screenGeometry(Screen()).topLeft()); bgDesktop->setDesktopArea( rec ); diff --git a/src-qt5/core/lumina-desktop/SystemWindow.cpp b/src-qt5/core/lumina-desktop/SystemWindow.cpp index af9188bc..bfad961d 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.cpp +++ b/src-qt5/core/lumina-desktop/SystemWindow.cpp @@ -49,7 +49,7 @@ void SystemWindow::updateWindow(){ ui->tool_shutdown->setEnabled(ok); ui->frame_update->setVisible( !LOS::systemPendingUpdates().isEmpty() ); //Center this window on the current screen - QPoint center = QApplication::desktop()->screenGeometry(QCursor::pos()).center(); //get the center of the current screen + QPoint center = QGuiApplication::screenAt(QCursor::pos())->availableGeometry().center(); //get the center of the current screen this->move(center.x() - this->width()/2, center.y() - this->height()/2); } |