aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-29 12:01:06 -0400
committerKen Moore <moorekou@gmail.com>2015-10-29 12:01:06 -0400
commit7356111b0982ae18bbedd8fae7473c2b14b4a1e4 (patch)
treeb7daab7b6a325c6e22d6a62ea7f412594bd7b64d
parentAdd some more ICCCM functions to LuminaX11. (diff)
downloadlumina-7356111b0982ae18bbedd8fae7473c2b14b4a1e4.tar.gz
lumina-7356111b0982ae18bbedd8fae7473c2b14b4a1e4.tar.bz2
lumina-7356111b0982ae18bbedd8fae7473c2b14b4a1e4.zip
Adjust the screen resize/modification detection a tiny bit so that all changes bump a 0.2 second timer, after which it re-runs the desktop window geometry update routines.
-rw-r--r--lumina-desktop/LSession.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index 2190d445..61c01175 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -45,7 +45,7 @@ LSession::LSession(int &argc, char ** argv) : QApplication(argc, argv){
TrayStopping = false;
screenTimer = new QTimer(this);
screenTimer->setSingleShot(true);
- screenTimer->setInterval(2000); //0.2 seconds
+ screenTimer->setInterval(200); //0.2 seconds
connect(screenTimer, SIGNAL(timeout()), this, SLOT(updateDesktops()) );
for(int i=1; i<argc; i++){
if( QString::fromLocal8Bit(argv[i]) == "--noclean" ){ cleansession = false; break; }
@@ -346,16 +346,19 @@ void LSession::watcherChange(QString changed){
void LSession::screensChanged(){
qDebug() << "Screen Number Changed";
- //if(screenTimer->isActive()){ screenTimer->stop(); }
- //screenTimer->start();
- updateDesktops();
+ if(screenTimer->isActive()){ screenTimer->stop(); }
+ screenTimer->start();
+ //updateDesktops();
}
void LSession::screenResized(int scrn){
qDebug() << "Screen Resized:" << scrn << this->desktop()->screenGeometry(scrn);
- for(int i=0; i<DESKTOPS.length(); i++){
+ /*for(int i=0; i<DESKTOPS.length(); i++){
if(DESKTOPS[i]->Screen() == scrn){ DESKTOPS[i]->UpdateGeometry(); return; }
- }
+ }*/
+ if(screenTimer->isActive()){ screenTimer->stop(); }
+ screenTimer->start();
+ //updateDesktops();
}
void LSession::checkWindowGeoms(){
bgstack15