diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-29 11:50:20 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-29 11:50:20 -0400 |
commit | 9134d5971398e6de38465ca47b583d32bf8aaf94 (patch) | |
tree | 6e3b5ea485bc4e2f8638355484136f792f66c841 | |
parent | Oops - fix how the new/initial frame extents get saved into the structure.. (diff) | |
download | lumina-9134d5971398e6de38465ca47b583d32bf8aaf94.tar.gz lumina-9134d5971398e6de38465ca47b583d32bf8aaf94.tar.bz2 lumina-9134d5971398e6de38465ca47b583d32bf8aaf94.zip |
Try to fix up the looping of the size/resize between X and the window
-rw-r--r-- | src-qt5/core/libLumina/RootSubWindow.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index bbbbf644..075f94c5 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -269,12 +269,12 @@ void RootSubWindow::propertiesChanged(QList<NativeWindow::Property> props, QList this->move( WIN->geometry().topLeft() ); break; case NativeWindow::Size: - qDebug() << "Got Widget Size:" << vals[i].toSize(); - //WinWidget->setSizeHint( vals[i].toSize() ); - //WinWidget->resize(vals[i].toSize() ); - WinWidget->resize(vals[i].toSize()); - this->resize( WIN->geometry().size() ); - qDebug() << " - Size after change:" << WinWidget->size() << this->size(); + if(WinWidget->size() != vals[i].toSize()){ + qDebug() << "Got Widget Size Change:" << vals[i].toSize(); + WinWidget->resize(vals[i].toSize()); + this->resize( WIN->geometry().size() ); + qDebug() << " - Size after change:" << WinWidget->size() << this->size() << WIN->geometry(); + } break; case NativeWindow::MinSize: WinWidget->setMinimumSize(vals[i].toSize()); @@ -425,7 +425,9 @@ void RootSubWindow::leaveEvent(QEvent *ev){ void RootSubWindow::resizeEvent(QResizeEvent *ev){ //qDebug() << "Got Resize Event:" << ev->size(); - WIN->requestProperty(NativeWindow::Size, WinWidget->size()); + if(WinWidget->size() != WIN->property(NativeWindow::Size).toSize()){ + WIN->requestProperty(NativeWindow::Size, WinWidget->size()); + } QFrame::resizeEvent(ev); } |