diff options
author | Ken Moore <ken@ixsystems.com> | 2018-02-01 11:19:26 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-02-01 11:19:26 -0500 |
commit | 7b781f1660c7cd3182315b4731336cf80fbfe771 (patch) | |
tree | 6d6e387cbc2072db9c315e7f508ef6c4a87590d6 | |
parent | Finish getting the session settings all loaded by the Desktop Manager. (diff) | |
download | lumina-7b781f1660c7cd3182315b4731336cf80fbfe771.tar.gz lumina-7b781f1660c7cd3182315b4731336cf80fbfe771.tar.bz2 lumina-7b781f1660c7cd3182315b4731336cf80fbfe771.zip |
Fix up the single application numbering.
Ensure that the "DISPLAY" number does not get modified between environments, only use the primary number rather than the whole number (0.0 and 0.1 both use display 0).
-rw-r--r-- | src-qt5/core/libLumina/LuminaSingleApplication.cpp | 5 |
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++){ |