From 91134ecb1e450464acf6e9b99b17fdec26452d76 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 31 Oct 2017 09:55:21 -0400 Subject: Ensure the mouse cursor "busy" icon is used for 3 seconds when launching an external process. --- src-qt5/core/libLumina/ExternalProcess.h | 7 ++++++- src-qt5/core/lumina-desktop/LSession.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/ExternalProcess.h b/src-qt5/core/libLumina/ExternalProcess.h index ce8ff6f5..2a6f4949 100644 --- a/src-qt5/core/libLumina/ExternalProcess.h +++ b/src-qt5/core/libLumina/ExternalProcess.h @@ -15,6 +15,7 @@ #include #include #include +#include class ExternalProcess : public QProcess{ Q_OBJECT @@ -23,18 +24,21 @@ private: private slots: void resetCursor(){ + //qDebug() << "External Process: Reset Mouse Cursor =" << !cursorRestored; if(!cursorRestored){ QApplication::restoreOverrideCursor(); cursorRestored = true; } } void processStarting(){ + //qDebug() << "Starting External Process: Mouse Notification =" << !cursorRestored; if(!cursorRestored){ - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor( QCursor(Qt::BusyCursor) ); QTimer::singleShot(3000, this, SLOT(resetCursor()) ); } } void processFinished(){ + //qDebug() << "External Process Finished: Reset Mouse Cursor =" << !cursorRestored; if(!cursorRestored){ QApplication::restoreOverrideCursor(); cursorRestored = true; @@ -53,6 +57,7 @@ public: this->setStandardOutputFile(logfile); } //Setup the connection for automatic cleanup + connect(this, SIGNAL(started()), this, SLOT(processStarting()) ); connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processFinished()) ); } diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 6fceff1b..dab30f01 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -294,7 +294,7 @@ void LSession::launchStartupApps(){ qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; } //QProcess::startDetached("nice lumina-open -autostart-apps"); - ExternalProcess::launch("nice lumina-open -autostart-apps"); + ExternalProcess::launch("lumina-open", QStringList() << "-autostart-apps", false); //Re-load the screen brightness and volume settings from the previous session // Wait until after the XDG-autostart functions, since the audio system might be started that way @@ -589,7 +589,7 @@ void LSession::SessionEnding(){ //=============== void LSession::LaunchApplication(QString cmd){ //LSession::setOverrideCursor(QCursor(Qt::BusyCursor)); - ExternalProcess::launch(cmd); + ExternalProcess::launch(cmd, QStringList(), true); //QProcess::startDetached(cmd); } @@ -690,7 +690,7 @@ void LSession::WindowPropertyEvent(){ if(RunningApps.length() < newapps.length()){ //New Window found //qDebug() << "New window found"; - LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?) + //LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?) //Perform sanity checks on any new window geometries for(int i=0; i Date: Tue, 31 Oct 2017 10:31:56 -0400 Subject: Add a quick verify/modify of the directory used for the Lumina wallpapers. Try to adjust the old path to the new one automatically. --- src-qt5/core/lumina-desktop/LDesktop.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 1fc6b11b..71b10bd5 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -539,7 +539,16 @@ void LDesktop::UpdateBackground(){ //qDebug() << " - List:" << bgL << CBG; //Remove any invalid files for(int i=0; i