aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/libLumina/LuminaSingleApplication.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp
index 927815a2..379ac02d 100644
--- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp
+++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp
@@ -22,7 +22,10 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname)
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(getenv("DISPLAY")).replace(":","") );
+ QString display = QString(getenv("DISPLAY"));
+ if(display.startsWith(":")){ display.remove(0,1); }
+ display = display.section(".",0,0);
+ cfile = cfile.arg( username, appname, display );
lockfile = new QLockFile(cfile+"-lock");
lockfile->setStaleLockTime(0); //long-lived processes
for(int i=1; i<argc; i++){
bgstack15