From 0394411a5c589b3c19fd3ecd2a6b4836f1a74a88 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 17 Oct 2014 08:41:49 -0400 Subject: Adjust how the backend for the system tray works: 1) Now the Lumina session registeres the system-wide tray, and just keeps track of the windows that should be visible (preventing any loss of service or apps starting up before the tray is registered). 2) The system tray plugin is now just a "visual tray" for embedding the applications in the panel. The Session only allows a single visual tray to be registered at a time, but sends out signals whenever there is an opening for a visual tray (allowing near-instant transfer of tray applications from one visual tray to another). Also fix a quick bug in lumina-config where the save button was getting activated simply by changing the appearance/plugins tab in the panel configuration (without actually changing anything). --- lumina-desktop/LPanel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lumina-desktop/LPanel.cpp') diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index 5e7ad292..4aa0acae 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -14,7 +14,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ bgWindow = parent; //save for later //Setup the widget overlay for the entire panel to provide transparency effects panelArea = new QWidget(this); - QBoxLayout *tmp = new QBoxLayout(QBoxLayout::LeftToRight,this); + QBoxLayout *tmp = new QBoxLayout(QBoxLayout::LeftToRight); tmp->setContentsMargins(0,0,0,0); this->setLayout(tmp); tmp->addWidget(panelArea); @@ -33,13 +33,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); + 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()); - layout = new QBoxLayout(QBoxLayout::LeftToRight, this); + layout = new QBoxLayout(QBoxLayout::LeftToRight); layout->setContentsMargins(0,0,0,0); layout->setSpacing(1); //layout->setSizeConstraint(QLayout::SetFixedSize); @@ -118,10 +118,10 @@ void LPanel::UpdatePanel(){ //Ensure this plugin has a unique ID (NOTE: this numbering does not persist between sessions) if(!plugins[i].contains("---")){ int num=1; - while( plugins.contains(plugins[i]+"---"+QString::number(this->number())+"."+QString::number(num)) ){ + while( plugins.contains(plugins[i]+"---"+QString::number(screennum)+"."+QString::number(this->number())+"."+QString::number(num)) ){ num++; } - plugins[i] = plugins[i]+"---"+QString::number(this->number())+"."+QString::number(num); + plugins[i] = plugins[i]+"---"+QString::number(screennum)+"."+QString::number(this->number())+"."+QString::number(num); } //See if this plugin is already there or in a different spot bool found = false; -- cgit