aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LPanel.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-12-18 07:47:48 -0500
committerKen Moore <ken@pcbsd.org>2014-12-18 07:47:48 -0500
commit71c2fda95224f0a04316c5f1059628d33564ca43 (patch)
treeca74dbe49dd2f555e73893e7f5f06154d6dab763 /lumina-desktop/LPanel.cpp
parentOops, forgot to add knowledge of the new "Wine" app category to the userbutton. (diff)
downloadlumina-71c2fda95224f0a04316c5f1059628d33564ca43.tar.gz
lumina-71c2fda95224f0a04316c5f1059628d33564ca43.tar.bz2
lumina-71c2fda95224f0a04316c5f1059628d33564ca43.zip
Commit a checkpoint on the conversion of Lumina to Qt5.
It is functional at the moment, but still has a few rough edges with regards to the X11 background interface (due to the move from XLib to XCB in Qt5). This reulst in some of the window manager interactions not behaving properly (such as sticky status on panels).
Diffstat (limited to 'lumina-desktop/LPanel.cpp')
-rw-r--r--lumina-desktop/LPanel.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 138a8d77..afef1e13 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -34,12 +34,13 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
this->setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint );
this->setFocusPolicy(Qt::NoFocus);
this->setWindowTitle("");
- this->setAttribute(Qt::WA_X11NetWmWindowTypeDock); //Reserve as panel/dock
+ //this->setAttribute(Qt::WA_X11NetWmWindowTypeDock); //Reserve as panel/dock
this->setAttribute(Qt::WA_AlwaysShowToolTips);
this->setObjectName("LuminaPanelWidget");
panelArea->setObjectName("LuminaPanelPluginWidget");
- //LX11::SetAsPanel(this->winId()); //set proper type of window for a panel since Qt can't do it
- LX11::SetAsSticky(this->winId());
+ LX11::SetAsPanel(this->winId()); //set proper type of window for a panel since Qt can't do it
+ LSession::handle()->XCB->SetAsSticky(this->winId());
+ //LX11::SetAsSticky(this->winId());
layout = new QBoxLayout(QBoxLayout::LeftToRight);
layout->setContentsMargins(0,0,0,0);
layout->setSpacing(1);
@@ -86,7 +87,7 @@ void LPanel::UpdatePanel(){
this->setGeometry(xloc,0,xwid, ht );
if(!hidden){ LX11::ReservePanelLocation(this->winId(), xloc, 0, this->width(), ht, "top"); }
else{
- LX11::ReservePanelLocation(this->winId(), xloc, 0, this->width(), 2, "top");
+ LX11::ReservePanelLocation(this->winId(), xloc, 0, this->width(), 2, "top");
hidepoint = QPoint(xloc, 2-ht);
showpoint = QPoint(xloc, 0);
this->move(hidepoint); //Could bleed over onto the screen above
@@ -128,6 +129,9 @@ void LPanel::UpdatePanel(){
this->move(hidepoint); //Could bleed over onto the screen right
}
}
+ //With QT5, we need to make sure to reset window properties on occasion
+ LSession::handle()->XCB->SetAsSticky(this->winId());
+ LX11::SetAsPanel(this->winId());
//Now update the appearance of the toolbar
QString color = settings->value(PPREFIX+"color", "rgba(255,255,255,160)").toString();
QString style = "QWidget#LuminaPanelPluginWidget{ background: %1; border-radius: 3px; border: 1px solid %1; }";
@@ -233,7 +237,7 @@ void LPanel::paintEvent(QPaintEvent *event){
//qDebug() << "Global Rec:" << rec.x() << rec.y() << screennum;
rec.moveTo( rec.x()-screen->screenGeometry(screennum).x(), rec.y() );
//qDebug() << "Adjusted Global Rec:" << rec.x() << rec.y();
- painter->drawPixmap(event->rect(), QPixmap::grabWidget(bgWindow, rec) );
+ painter->drawPixmap(event->rect(), bgWindow->grab(rec) );
QWidget::paintEvent(event); //now pass the event along to the normal painting event
}
bgstack15