diff options
author | Ken Moore <moorekou@gmail.com> | 2016-05-06 08:05:21 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-05-06 08:05:21 -0400 |
commit | 558038cb3e954f175a8a6599b8490bd05542a016 (patch) | |
tree | 33fae0649134433e4623967369d682f9e1df54ad /src-qt5 | |
parent | Add a check for the existence of the log dir before starting the processes. (diff) | |
parent | Have lumina-screenshot use the current window stacking order for determining ... (diff) | |
download | lumina-558038cb3e954f175a8a6599b8490bd05542a016.tar.gz lumina-558038cb3e954f175a8a6599b8490bd05542a016.tar.bz2 lumina-558038cb3e954f175a8a6599b8490bd05542a016.zip |
Merge branch 'master' of github.com:pcbsd/lumina
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/LuminaUtils.cpp | 2 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index f429cb31..12dcf0be 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -49,7 +49,7 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ // LUtils Functions //============= QString LUtils::LuminaDesktopVersion(){ - QString ver = "0.9.0-devel"; + QString ver = "0.9.1-devel"; #ifdef GIT_VERSION ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) ); #endif diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index 47828cdd..446e9bf7 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -158,10 +158,16 @@ void MainUI::mouseReleaseEvent(QMouseEvent *ev){ //In the middle of selecting a window to take a screenshot // Get the window underneath the mouse click and take the screenshot QList<WId> wins = XCB->WindowList(); + QList<WId> stack = XCB->WM_Get_Client_List(true); cwin = 0; //qDebug() << "Try to select window:" << ev->globalPos(); - for(int i=0; i<wins.length() && cwin==0; i++){ - if( XCB->WindowGeometry(wins[i], true).contains(ev->globalPos()) ){ cwin = wins[i]; } + //for(int i=0; i<stack.length(); i++){ + for(int i=stack.length()-1; i>=0 && cwin==0; i--){ //work top->bottom in the stacking order + if(!wins.contains(stack[i])){ continue; } + if( XCB->WindowGeometry(stack[i], true).contains(ev->globalPos()) && XCB->WindowState(stack[i])!=LXCB::INVISIBLE ){ + qDebug() << "Found Window:" << i << XCB->WindowClass(stack[i]); + cwin = stack[i]; + } } qDebug() << " - Got window:" << cwin; if(cwin==this->winId()){ return; } //cancelled |