aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LuminaSingleApplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/libLumina/LuminaSingleApplication.cpp')
-rw-r--r--src-qt5/core/libLumina/LuminaSingleApplication.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp
index 86248666..6107aff8 100644
--- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp
+++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp
@@ -11,7 +11,7 @@
#include <QDebug>
#include <QX11Info>
-#include <unistd.h> //for getlogin()
+#include <unistd.h> //for getuid()
LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname) : QApplication(argc, argv){
//Load the proper translation systems
@@ -19,7 +19,7 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname)
if(appname!="lumina-desktop"){ cTrans = LUtils::LoadTranslation(this, appname); }//save the translator for later
//Initialize a couple convenience internal variables
cfile = QDir::tempPath()+"/.LSingleApp-%1-%2-%3";
- QString username = QString(getlogin());
+ QString username = QString::number(getuid());
//For locking the process use the official process name - not the user input (no masking)
appname = this->applicationName();
cfile = cfile.arg( username, appname, QString::number(QX11Info::appScreen()) );
@@ -107,17 +107,17 @@ void LSingleApplication::PerformLockChecks(){
QLocalSocket socket(this);
socket.connectToServer(cfile);
socket.waitForConnected();
- if(!socket.isValid() || socket.state()!=QLocalSocket::ConnectedState){
+ if(!socket.isValid() || socket.state()!=QLocalSocket::ConnectedState){
//error - could not forward info for some reason
qDebug() << " - Could not connect to locking process: exiting...";
- exit(1);
- }
-
- qDebug() << " - Forwarding inputs to locking process and closing down this instance...";
+ exit(1);
+ }
+
+ qDebug() << " - Forwarding inputs to locking process and closing down this instance...";
socket.write( inputlist.join("::::").toLocal8Bit() );
socket.waitForDisconnected(500); //max out at 1/2 second (only hits this if no inputs)
}
-
+
}
//New messages detected
bgstack15