aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-01-30 15:16:17 -0500
committerKen Moore <moorekou@gmail.com>2015-01-30 15:16:17 -0500
commit065153c3f0473411f9637cd5763dae3748e413a7 (patch)
tree7c10ed3aafb6d42b2396d4a968e0a35b6938ad4a
parentOops, make sure that if brightness controls are not available, that the syste... (diff)
parentproper initialization of lumina-panel (diff)
downloadlumina-065153c3f0473411f9637cd5763dae3748e413a7.tar.gz
lumina-065153c3f0473411f9637cd5763dae3748e413a7.tar.bz2
lumina-065153c3f0473411f9637cd5763dae3748e413a7.zip
Merge pull request #45 from Nanolx/lumina-x11
proper initialization of lumina-panel
-rw-r--r--lumina-desktop/LPanel.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index dc635300..e1be528d 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -31,9 +31,13 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
qDebug() << " -- Setup Panel";
this->setContentsMargins(0,0,0,0);
this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- this->setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
+ //panels cannot get keyboard focus otherwise it upsets the task manager window detection
+ this->setAttribute(Qt::WA_X11DoNotAcceptFocus);
+ this->setAttribute(Qt::WA_X11NetWmWindowTypeDock);
+ this->setAttribute(Qt::WA_AlwaysShowToolTips);
+ this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
- this->setWindowTitle("");
+ this->setWindowTitle("LuminaPanel");
this->setObjectName("LuminaPanelBackgroundWidget");
this->setStyleSheet("QToolButton::menu-indicator{ image: none; }");
panelArea->setObjectName("LuminaPanelColor");
@@ -45,13 +49,10 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
//Set special window flags on the panel for proper usage
this->show();
//this->setFocusPolicy(Qt::NoFocus);
- //panels cannot get keyboard focus otherwise it upsets the task manager window detection
- this->setAttribute(Qt::WA_X11DoNotAcceptFocus);
- this->setAttribute(Qt::WA_X11NetWmWindowTypeDock);
- this->setAttribute(Qt::WA_AlwaysShowToolTips);
- LSession::handle()->XCB->SetAsSticky(this->winId());
+ //LSession::handle()->XCB->SetAsSticky(this->winId());
//LSession::handle()->XCB->SetAsPanel(this->winId()); //make sure this happens after Qt creates the window first
-
+ 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
}
@@ -137,6 +138,7 @@ void LPanel::UpdatePanel(){
}
//With QT5, we need to make sure to reset window properties on occasion
//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); }
bgstack15