aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/RootSubWindow.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-29 11:02:42 -0400
committerKen Moore <ken@ixsystems.com>2017-06-29 11:02:42 -0400
commitd911eba7e870937803e68562729b38173cdd5857 (patch)
tree2b01dcda8aada7a2a890678a6dacc52f9f54eb9f /src-qt5/core/libLumina/RootSubWindow.cpp
parentMake sure the global position of a window is/can be set as needed. (diff)
downloadlumina-d911eba7e870937803e68562729b38173cdd5857.tar.gz
lumina-d911eba7e870937803e68562729b38173cdd5857.tar.bz2
lumina-d911eba7e870937803e68562729b38173cdd5857.zip
Ensure that the Global Position (and Size) properties *always* reference the embedded window.
Also make a new "geometry()" function in NativeWindow to return the full window+frame geometry.
Diffstat (limited to 'src-qt5/core/libLumina/RootSubWindow.cpp')
-rw-r--r--src-qt5/core/libLumina/RootSubWindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp
index 59cfc662..f17ee9a1 100644
--- a/src-qt5/core/libLumina/RootSubWindow.cpp
+++ b/src-qt5/core/libLumina/RootSubWindow.cpp
@@ -254,17 +254,17 @@ void RootSubWindow::propertiesChanged(QList<NativeWindow::Property> props, QList
break;
case NativeWindow::Icon:
//qDebug() << "Got Icon Change:" << vals[i];
- otherB->setIcon(vals[i].value< QIcon>());
+ otherB->setIcon(vals[i].value<QIcon>());
break;
case NativeWindow::GlobalPos:
//qDebug() << "Got Global Pos:" << vals[i].toPoint();
- this->move( vals[i].toPoint() );
+ 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() );
- this->resize( vals[i].toSize()+QSize( this->width()-WinWidget->width(), this->height()-WinWidget->height() ) );
+ this->resize( WIN->geometry().size() );
qDebug() << " - Size after change:" << WinWidget->size() << this->size();
break;
case NativeWindow::MinSize:
@@ -305,7 +305,7 @@ void RootSubWindow::mousePressEvent(QMouseEvent *ev){
}
void RootSubWindow::mouseMoveEvent(QMouseEvent *ev){
- //ev->accept();
+ activate(); //make sure this window is "Active"
if(activeState == Normal){
setMouseCursor( getStateAtPoint(ev->pos()) ); //just update the mouse cursor
}else{
bgstack15