diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-29 12:41:49 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-29 12:41:49 -0400 |
commit | 4f98326bc7c3b8f93c0f86059c813bdf866c2ddf (patch) | |
tree | dbf755549df0d8685d6870ebe80f99995bb2fc26 /src-qt5 | |
parent | Quick change to some debugging (diff) | |
download | lumina-4f98326bc7c3b8f93c0f86059c813bdf866c2ddf.tar.gz lumina-4f98326bc7c3b8f93c0f86059c813bdf866c2ddf.tar.bz2 lumina-4f98326bc7c3b8f93c0f86059c813bdf866c2ddf.zip |
Fix up the saving/using of the global position property
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/RootSubWindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 568c5dee..abaceca2 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -265,8 +265,8 @@ void RootSubWindow::propertiesChanged(QList<NativeWindow::Property> props, QList otherB->setIcon(vals[i].value<QIcon>()); break; case NativeWindow::GlobalPos: - qDebug() << "Got Global Pos:" << WIN->geometry().topLeft() << vals[i].toPoint(); - this->move( WIN->geometry().topLeft() ); + qDebug() << "Got Global Pos:" << this->pos() << WinWidget->mapToGlobal(QPoint(0,0)) << WIN->geometry().topLeft() << vals[i].toPoint(); + this->move( vals[i].toPoint() - (WinWidget->mapToGlobal(QPoint(0,0)) - this->pos()) ); //WIN->geometry().topLeft() ); break; case NativeWindow::Size: if(WinWidget->size() != vals[i].toSize()){ @@ -438,6 +438,6 @@ void RootSubWindow::resizeEvent(QResizeEvent *ev){ void RootSubWindow::moveEvent(QMoveEvent *ev){ qDebug() << "Got Move Event:" << ev->pos() << WinWidget->mapToGlobal(QPoint(0,0)); - //WIN->setProperty(NativeWindow::GlobalPos, WinWidget->mapToGlobal(QPoint(0,0)) ); + WIN->setProperty(NativeWindow::GlobalPos, WinWidget->mapToGlobal(QPoint(0,0)) ); QFrame::moveEvent(ev); } |