diff options
author | Ken Moore <ken@ixsystems.com> | 2017-08-27 11:29:43 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-08-27 11:29:43 -0400 |
commit | 39c9a096ef2bee1e224561ed5daa6a63a9018b36 (patch) | |
tree | 320766d6583e8fcb9682412d79246182a19c38c2 /src-qt5/core/libLumina/RootSubWindow.cpp | |
parent | Add 3 simple window arrangements to Lumina 2. (diff) | |
download | lumina-39c9a096ef2bee1e224561ed5daa6a63a9018b36.tar.gz lumina-39c9a096ef2bee1e224561ed5daa6a63a9018b36.tar.bz2 lumina-39c9a096ef2bee1e224561ed5daa6a63a9018b36.zip |
A bunch more work on Lumina 2 mouse focus settings and such.
Diffstat (limited to 'src-qt5/core/libLumina/RootSubWindow.cpp')
-rw-r--r-- | src-qt5/core/libLumina/RootSubWindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index a42f866a..fba02e96 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -192,6 +192,7 @@ void RootSubWindow::initWindowFrame(){ maxB->setCursor(Qt::ArrowCursor); otherM->setCursor(Qt::ArrowCursor); titleLabel->setCursor(Qt::ArrowCursor); + WinWidget->setCursor(Qt::ArrowCursor); //Now all the stylesheet options this->setObjectName("WindowFrame"); closeB->setObjectName("Button_Close"); @@ -294,6 +295,7 @@ void RootSubWindow::toggleSticky(){ } void RootSubWindow::activate(){ + WinWidget->raiseWindow(); WIN->requestProperty(NativeWindow::Active, true, true); } @@ -501,8 +503,8 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ //Check for a right-click event //qDebug() << "Frame Mouse Release Event"; QFrame::mouseReleaseEvent(ev); - WinWidget->raiseWindow(); //need to ensure the native window is always on top of this frame if( (activeState==Normal) && (titleBar->geometry().contains(ev->pos())) && (ev->button()==Qt::RightButton) ){ + WinWidget->raiseWindow();//need to ensure the native window is always on top of this frame but under the menu otherM->popup(ev->globalPos()); return; } @@ -511,7 +513,9 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ activeState = Normal; QApplication::restoreOverrideCursor(); setMouseCursor( getStateAtPoint(ev->pos()) ); - if(QFrame::mouseGrabber() == this){ this->releaseMouse(); activate(); } + if(QFrame::mouseGrabber() == this){ this->releaseMouse(); } + activate(); + QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); } void RootSubWindow::leaveEvent(QEvent *ev){ |