aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/BootSplash.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/LDesktop.cpp15
-rw-r--r--src-qt5/core/lumina-desktop/SystemWindow.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp4
5 files changed, 13 insertions, 12 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
index 7dc9f8f8..639e3f47 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
@@ -73,7 +73,7 @@ void page_wallpaper::LoadSettings(int screennum){
else{ ui->radio_desk_single->setChecked(true); }
ui->spin_desk_min->setValue( settings.value(DPrefix+"background/minutesToChange", 5).toInt() );
desktimechanged(); //ensure the display gets updated (in case the radio selection did not change);
- QRect geom = QApplication::desktop()->screenGeometry(cScreen);
+ QRect geom = QGuiApplication::screens().at(cScreen)->availableGeometry();
ui->label_desk_res->setText( tr("Screen Resolution:")+"\n"+QString::number(geom.width())+"x"+QString::number(geom.height()) );
int tmp = ui->combo_desk_layout->findData(settings.value(DPrefix+"background/format","stretch"));
if(tmp>=0){ ui->combo_desk_layout->setCurrentIndex(tmp); }
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);
}
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 88192943..09e05892 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -241,7 +241,7 @@ void MainUI::getPixmap(){
//Grab the whole screen
cpic = scrn->grabWindow(QApplication::desktop()->winId());
}else if(cwin==0 && ui->radio_monitor->isChecked()){
- QRect geom = QApplication::desktop()->screenGeometry(ui->spin_monitor->value()-1);
+ QRect geom = QGuiApplication::screens().at(ui->spin_monitor->value()-1)->availableGeometry();
cpic = scrn->grabWindow(QApplication::desktop()->winId(), geom.x(), geom.y(), geom.width(), geom.height() );
}else if(cwin==0 && ui->radio_area->isChecked()){
//Grab the section of the screen which was selected
@@ -329,7 +329,7 @@ void MainUI::closeEvent(QCloseEvent *ev){
//qDebug() << "Close Event:" << ui->check_show_popups->isChecked() << picSaved;
if(ui->check_show_popups->isChecked() && !picSaved){
//Ask what to do about the unsaved changed
- QMessageBox dialog( QMessageBox::Warning, tr("Unsaved Screenshot"),
+ QMessageBox dialog( QMessageBox::Warning, tr("Unsaved Screenshot"),
tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"),
QMessageBox::Discard | QMessageBox::Save | QMessageBox::Cancel, this);
dialog.setDefaultButton(QMessageBox::Cancel);
bgstack15