aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LDesktop.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-07-30 18:18:11 -0400
committerKen Moore <moorekou@gmail.com>2015-07-30 18:18:11 -0400
commitd97499cae8e344af6118f38ffa1c4b183a4d30cc (patch)
tree50641f8327b8b3a2473ad357845a765db6f45aed /lumina-desktop/LDesktop.cpp
parentFinal fix for the line find/replace functionality in luminaDesktop.conf parsi... (diff)
downloadlumina-d97499cae8e344af6118f38ffa1c4b183a4d30cc.tar.gz
lumina-d97499cae8e344af6118f38ffa1c4b183a4d30cc.tar.bz2
lumina-d97499cae8e344af6118f38ffa1c4b183a4d30cc.zip
Fix up the issues with some apps which re-configure the Xsession/screens to match their own internal specifications. On single-screen setups it works fine now, but on multi-screen setups the app does not seem to return the xsettings back to their original specs properly (Tested with OpenArena and MegaMario). This may result in the screen being "flipped" or placed on different monitors after closing the app.
Diffstat (limited to 'lumina-desktop/LDesktop.cpp')
-rw-r--r--lumina-desktop/LDesktop.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp
index 31ac47c3..6546cec4 100644
--- a/lumina-desktop/LDesktop.cpp
+++ b/lumina-desktop/LDesktop.cpp
@@ -52,11 +52,11 @@ void LDesktop::show(){
for(int i=0; i<PANELS.length(); i++){ PANELS[i]->show(); }
}
-/*void LDesktop::hide(){
+void LDesktop::hide(){
if(bgWindow!=0){ bgWindow->hide(); }
if(bgDesktop!=0){ bgDesktop->hide(); }
for(int i=0; i<PANELS.length(); i++){ PANELS[i]->hide(); }
-}*/
+}
void LDesktop::prepareToClose(){
//Get any panels ready to close
@@ -89,6 +89,23 @@ QRect LDesktop::availableScreenGeom(){
}
}
+void LDesktop::UpdateGeometry(){
+ //First make sure there is something different about the geometry
+ if(desktop->screenGeometry()==bgWindow->geometry()){ return; }
+ //Now update the screen
+ // NOTE: This functionality is highly event-driven based on X changes - so we need to keep things in order (no signals/slots)
+ qDebug() << "Changing Desktop Geom:" << desktopnumber;
+ bgWindow->setGeometry(desktop->screenGeometry(desktopnumber));
+ qDebug() << " - Update Desktop Plugin Area";
+ UpdateDesktopPluginArea();
+ /*qDebug() << " - Update Panel Geometry";
+ for(int i=0; PANELS.length(); i++){
+ PANELS[i]->UpdatePanel(true); //only update geometry
+ }*/
+ qDebug() << " - Done With Desktop Geom Updates";
+ //QTimer::singleShot(0, this, SLOT(UpdatePanels()));
+}
+
void LDesktop::SystemLogout(){
LSession::handle()->systemWindow();
}
@@ -268,7 +285,7 @@ void LDesktop::InitDesktop(){
//This is called *once* during the main initialization routines
checkResolution(); //Adjust the desktop config file first (if necessary)
if(DEBUG){ qDebug() << "Init Desktop:" << desktopnumber; }
- connect(desktop, SIGNAL(resized(int)), this, SLOT(UpdateGeometry(int)));
+ //connect(desktop, SIGNAL(resized(int)), this, SLOT(UpdateGeometry(int)));
if(DEBUG){ qDebug() << "Desktop #"<<desktopnumber<<" -> "<< desktop->screenGeometry(desktopnumber) << LSession::handle()->screenGeom(desktopnumber); }
deskMenu = new QMenu(0);
connect(deskMenu, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) );
bgstack15