From 9134d5971398e6de38465ca47b583d32bf8aaf94 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 29 Jun 2017 11:50:20 -0400 Subject: Try to fix up the looping of the size/resize between X and the window --- src-qt5/core/libLumina/RootSubWindow.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src-qt5') 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 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); } -- cgit