aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/libLumina/LuminaSingleApplication.cpp12
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp7
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/main.cpp1
3 files changed, 11 insertions, 9 deletions
diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp
index a97753c5..86248666 100644
--- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp
+++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp
@@ -35,12 +35,12 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname)
}else{
if(!path.startsWith("/") && !path.startsWith("-") ){ path.prepend(QDir::currentPath()+"/"); }
}
- inputlist << path;
+ inputlist << path;
}
isActive = isBypass = false;
lserver = 0;
//Now check for the manual CLI flag to bypass single-instance forwarding (if necessary)
- if(inputlist.contains("-new-instance")){
+ if(inputlist.contains("-new-instance")){
isBypass = true;
inputlist.removeAll("-new-instance");
}
@@ -48,16 +48,16 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname)
}
LSingleApplication::~LSingleApplication(){
- if(lserver != 0 && lockfile->isLocked() ){
+ if(lserver != 0 && lockfile->isLocked() ){
//currently locked instance: remove the lock now
lserver->close();
QLocalServer::removeServer(cfile);
- lockfile->unlock();
+ lockfile->unlock();
}
}
bool LSingleApplication::isPrimaryProcess(){
- return (isActive || isBypass);
+ return (isActive || isBypass);
}
void LSingleApplication::PerformLockChecks(){
@@ -99,7 +99,7 @@ void LSingleApplication::PerformLockChecks(){
lockfile->unlock();
isActive = true;
}
-
+
}else if(!isBypass){
//forward the current inputs to the locked process for processing and exit
//Check the connection to the local server first
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 2bdd69ae..1cadd4f6 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -209,14 +209,14 @@ bool MainUI::getWindow(){
this->grabMouse( QCursor(Qt::CrossCursor) );
mousegrabbed = true;
this->centralWidget()->setEnabled(false);
- //this->hide();
+ this->setWindowOpacity(0);
return false; //wait for the next click to continue
}else if(ui->radio_area->isChecked()){
settings->setValue("screenshot-target", "area");
this->grabMouse( QCursor(Qt::CrossCursor) );
mousegrabbed = true;
this->centralWidget()->setEnabled(false);
- //this->hide();
+ this->setWindowOpacity(0);
return false; //wait for the next click to continue
}else if(ui->radio_monitor->isChecked()){
//will auto-grab the proper monitor later
@@ -247,7 +247,7 @@ void MainUI::getPixmap(){
cpic = scrn->grabWindow(cwin);
}
}
- this->show();
+ this->showNormal();
this->setGeometry(lastgeom);
lastScreenShot = QDateTime::currentDateTime();
//Now display the pixmap on the label as well
@@ -283,6 +283,7 @@ void MainUI::mouseReleaseEvent(QMouseEvent *ev){
mousegrabbed = false;
this->centralWidget()->setEnabled(true);
this->releaseMouse();
+ this->setWindowOpacity(1);
if(ui->radio_area->isChecked()){
//Need to determind the rectange which covers the area selected
areaOverlay->hide();
diff --git a/src-qt5/desktop-utils/lumina-screenshot/main.cpp b/src-qt5/desktop-utils/lumina-screenshot/main.cpp
index c1d178a2..c5a9e2c5 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/main.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/main.cpp
@@ -15,6 +15,7 @@ int main(int argc, char ** argv)
unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
LTHEME::LoadCustomEnvSettings();
LSingleApplication a(argc, argv, "l-screenshot");
+ if(!a.isPrimaryProcess()){ return 0; }
//LuminaThemeEngine theme(&a);
a.setApplicationName("Take Screenshot");
bgstack15