diff options
author | Ken Moore <ken@ixsystems.com> | 2018-01-30 05:49:30 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-01-30 05:49:30 -0500 |
commit | fc138f1492c0275215327cfe698587916107b69f (patch) | |
tree | f1db15573ee9e8ecf7618214cf28f381ba6c0632 /src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-fc138f1492c0275215327cfe698587916107b69f.tar.gz lumina-fc138f1492c0275215327cfe698587916107b69f.tar.bz2 lumina-fc138f1492c0275215327cfe698587916107b69f.zip |
A few couple other attempts at the layering issue.
Tie-in the new OSInterface class to the QML data store (RootObject).
This will allow the new system status functions to be accessible to the QML interface.
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp index 2ceff4a0..83c15601 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp @@ -9,8 +9,8 @@ #include <QQmlImageProviderBase> RootWindow::RootWindow() : QObject(){ - root_win = QWindow::fromWinId( QX11Info::appRootWindow() ); // - root_view = new QQuickView(root_win); //make it a child of the root window + root_win = QWindow::fromWinId( QX11Info::appRootWindow() ); + root_view = new QQuickView(new QWindow()); //make it a child of the root window root_obj = RootDesktopObject::instance(); syncRootSize(); connect(root_win, SIGNAL(widthChanged(int)), this, SLOT(syncRootSize()) ); @@ -31,6 +31,7 @@ RootWindow::~RootWindow(){ void RootWindow::start(){ root_view->setSource(QUrl("qrc:///qml/RootDesktop.qml")); root_win->show(); + root_view->parent()->show(); root_view->show(); } @@ -40,6 +41,7 @@ void RootWindow::syncRootSize(){ QRect unif; for(int i=0; i<screens.length(); i++){ unif = unif.united(screens[i]->geometry()); } if(unif.width() != root_view->width() || unif.height() != root_view->height()){ + root_view->parent()->setGeometry(0,0,unif.width(), unif.height()); root_view->setGeometry(0, 0, unif.width(), unif.height() ); emit RootResized(root_view->geometry()); } |