From 6e0f72ab9e0535309942711d98a611a1e1025305 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 19 Dec 2014 10:37:52 -0500 Subject: Fix up the sticky status-setting routine for the Lumina Panel. Now the WM will be aware of the new status change (send an event instead of changing the property directly). Also add a quick fix for system tray icons: if the icon size does not match the tray size, send a resize event and redraw a few moments later. --- lumina-desktop/LPanel.cpp | 5 +++-- lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lumina-desktop') diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index afef1e13..b94534b8 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -38,7 +38,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ 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::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); @@ -131,7 +131,8 @@ 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()); + //LX11::SetAsPanel(this->winId()); + //LX11::SetAsSticky(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; }"; diff --git a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp index 716a49ed..7e0a30f6 100644 --- a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp +++ b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp @@ -124,6 +124,7 @@ void TrayIcon::paintEvent(QPaintEvent *event){ //qDebug() << " - Pix size:" << pix.size().width() << pix.size().height(); //qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height(); if(!pix.isNull()){ + if(this->size() != pix.size()){ QTimer::singleShot(10, this, SLOT(updateIcon())); qDebug() << "-- Icon size mismatch"; } painter.drawPixmap(0,0,this->width(), this->height(), pix.scaled(this->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation) ); } //qDebug() << " - Done"; -- cgit