diff options
author | Ken Moore <moorekou@gmail.com> | 2015-07-17 13:08:16 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-07-17 13:08:16 -0400 |
commit | 96bcdec1f14e8f880b0ef053c5436af3662b19b8 (patch) | |
tree | ef33e6d0220a92ca308f58dd2ad3e5ba48a6fc48 /lumina-desktop | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
download | lumina-96bcdec1f14e8f880b0ef053c5436af3662b19b8.tar.gz lumina-96bcdec1f14e8f880b0ef053c5436af3662b19b8.tar.bz2 lumina-96bcdec1f14e8f880b0ef053c5436af3662b19b8.zip |
Commit some quick fixes:
1) Switch some X11->XCB functions around (SetAsDesktop(), SetDisableWMActions()).
2) Fix up some QtQuick plugin detection routines (now it will properly see the user's quickplugins if any).
3) Connect the status change signal/slots for QtQuick plugins to try and detect script failures and remove the script (still not working reliably).
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 6 | ||||
-rw-r--r-- | lumina-desktop/LPanel.cpp | 15 | ||||
-rw-r--r-- | lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h | 3 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index 7f7105f3..7b21b862 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -292,8 +292,8 @@ void LDesktop::InitDesktop(){ bgWindow = new QWidget(); bgWindow->setObjectName("bgWindow"); bgWindow->setContextMenuPolicy(Qt::CustomContextMenu); - bgWindow->setWindowFlags(Qt::FramelessWindowHint); - LX11::SetAsDesktop(bgWindow->winId()); + bgWindow->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); + LSession::handle()->XCB->SetAsDesktop(bgWindow->winId()); bgWindow->setGeometry(desktop->screenGeometry(desktopnumber)); connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) ); if(DEBUG){ qDebug() << "Create bgDesktop"; } @@ -647,6 +647,8 @@ void LDesktop::UpdateDesktopPluginArea(){ for(int i=0; i<PANELS.length(); i++){ PANELS[i]->update(); } //Also need to re-arrange any desktop plugins to ensure that nothing is out of the screen area AlignDesktopPlugins(); + //Make sure to re-disable any WM control flags + LSession::handle()->XCB->SetDisableWMActions(bgWindow->winId()); } void LDesktop::UpdateBackground(){ diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index 11a5a988..94db8ce0 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -38,7 +38,8 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ this->setAttribute(Qt::WA_X11DoNotAcceptFocus); this->setAttribute(Qt::WA_X11NetWmWindowTypeDock); this->setAttribute(Qt::WA_AlwaysShowToolTips); - this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); + this->setWindowFlags(Qt::FramelessWindowHint | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint); + //this->setWindowFlags(Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint); this->setWindowTitle("LuminaPanel"); this->setObjectName("LuminaPanelBackgroundWidget"); @@ -51,11 +52,9 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ panelArea->setLayout(layout); //Set special window flags on the panel for proper usage this->show(); - //this->setFocusPolicy(Qt::NoFocus); + LSession::handle()->XCB->SetAsPanel(this->winId()); LSession::handle()->XCB->SetAsSticky(this->winId()); - //LSession::handle()->XCB->SetAsPanel(this->winId()); - LX11::SetAsPanel(this->winId()); - + QTimer::singleShot(1,this, SLOT(UpdatePanel()) ); //start this in a new thread connect(screen, SIGNAL(resized(int)), this, SLOT(UpdatePanel()) ); //in case the screen resolution changes } @@ -188,12 +187,8 @@ void LPanel::UpdatePanel(){ } } //With QT5, we need to make sure to reset window properties on occasion + //LSession::handle()->XCB->SetDisableWMActions(this->winId()); //ensure no WM actions //LSession::handle()->XCB->SetAsSticky(this->winId()); - //LX11::SetAsPanel(this->winId()); - //First test/update all the window attributes as necessary - //if(!this->testAttribute(Qt::WA_X11DoNotAcceptFocus)){ this->setAttribute(Qt::WA_X11DoNotAcceptFocus); } - //if(!this->testAttribute(Qt::WA_X11NetWmWindowTypeDock)){ this->setAttribute(Qt::WA_X11NetWmWindowTypeDock); } - //if(!this->testAttribute(Qt::WA_AlwaysShowToolTips)){ this->setAttribute(Qt::WA_AlwaysShowToolTips); } //Now update the appearance of the toolbar if(settings->value(PPREFIX+"customcolor", false).toBool()){ diff --git a/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h b/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h index 3a14b26c..0e6cda2f 100644 --- a/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h +++ b/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h @@ -23,8 +23,10 @@ public: this->layout()->setContentsMargins(0,0,0,0); container = new QQuickWidget(this); container->setResizeMode(QQuickWidget::SizeRootObjectToView); + connect(container, SIGNAL(statusChanged(QQuickWidget::Status)), this, SLOT(statusChange(QQuickWidget::Status)) ); this->layout()->addWidget(container); container->setSource(QUrl::fromLocalFile( LUtils::findQuickPluginFile(ID.section("---",0,0)) )); + QApplication::processEvents(); //to check for errors right away this->setInitialSize(container->initialSize().width(), container->initialSize().height()); } @@ -37,6 +39,7 @@ private slots: void statusChange(QQuickWidget::Status status){ if(status == QQuickWidget::Error){ qDebug() << "Quick Widget Error:" << this->ID(); + container->setSource(QUrl()); //clear out the script - experienced an error } } |