aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r--src-qt5/core/libLumina/NativeWindowSystem.cpp12
-rw-r--r--src-qt5/core/libLumina/RootSubWindow.cpp9
-rw-r--r--src-qt5/core/libLumina/RootSubWindow.h2
3 files changed, 18 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp
index d540d86e..791271cc 100644
--- a/src-qt5/core/libLumina/NativeWindowSystem.cpp
+++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp
@@ -476,15 +476,21 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native
if(props.contains(NativeWindow::Icon)){
}
- if(props.contains(NativeWindow::Size) ){
+ if(props.contains(NativeWindow::Size) || props.contains(NativeWindow::GlobalPos) ){
xcb_configure_window_value_list_t valList;
uint16_t mask = 0;
- //if(props.contains(NativeWindow::Size)){
+ if(props.contains(NativeWindow::Size)){
QSize sz = vals[ props.indexOf(NativeWindow::Size) ] .toSize();
valList.width = sz.width();
valList.height = sz.height();
mask = mask & XCB_CONFIG_WINDOW_WIDTH & XCB_CONFIG_WINDOW_HEIGHT;
- //}
+ }
+ if(props.contains(NativeWindow::GlobalPos)){
+ QPoint pt = vals[ props.indexOf(NativeWindow::GlobalPos) ] .toPoint();
+ valList.x = pt.x();
+ valList.y = pt.y();
+ mask = mask & XCB_CONFIG_WINDOW_X & XCB_CONFIG_WINDOW_Y;
+ }
xcb_configure_window_aux(QX11Info::connection(), win->id(), mask, &valList);
}
if(props.contains(NativeWindow::Name)){
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp
index 66cfbc6a..59cfc662 100644
--- a/src-qt5/core/libLumina/RootSubWindow.cpp
+++ b/src-qt5/core/libLumina/RootSubWindow.cpp
@@ -412,11 +412,18 @@ void RootSubWindow::leaveEvent(QEvent *ev){
}*/
void RootSubWindow::resizeEvent(QResizeEvent *ev){
- qDebug() << "Got Resize Event:" << ev->size();
+ //qDebug() << "Got Resize Event:" << ev->size();
WIN->requestProperty(NativeWindow::Size, WinWidget->size());
QFrame::resizeEvent(ev);
}
+
/*void RootSubWindow::showEvent(QShowEvent *ev){
WIN->requestProperty(NativeWindow::Visible, true);
QFrame::showEvent(ev);
}*/
+
+void RootSubWindow::moveEvent(QMoveEvent *ev){
+ //qDebug() << "Got Move Event:" << ev->pos();
+ WIN->setProperty(NativeWindow::GlobalPos, WinWidget->mapToGlobal(QPoint(0,0)) );
+ QFrame::moveEvent(ev);
+}
diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h
index e1b992c9..cb502107 100644
--- a/src-qt5/core/libLumina/RootSubWindow.h
+++ b/src-qt5/core/libLumina/RootSubWindow.h
@@ -78,7 +78,7 @@ protected:
//void hideEvent(QHideEvent *ev);
void resizeEvent(QResizeEvent *ev);
//void showEvent(QShowEvent *ev);
- //void moveEvent(QMoveEvent *ev);
+ void moveEvent(QMoveEvent *ev);
};
bgstack15