From 3004b0d22caf1985d5e9b60c7647293f10f5690a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 5 Jan 2015 07:54:31 -0500 Subject: Quick checkpoint of additional XCB improvements/fixes. Still having an issue with fluxbox maximizing windows underneath panels at the moment. --- .../taskmanager/LTaskManagerPlugin.cpp | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp') diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp index ccad7531..67378c68 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp @@ -14,7 +14,8 @@ LTaskManagerPlugin::LTaskManagerPlugin(QWidget *parent, QString id, bool horizon connect(timer, SIGNAL(timeout()), this, SLOT(UpdateButtons()) ); usegroups = true; //backwards-compatible default value if(id.contains("-nogroups")){ usegroups = false; } - connect(LSession::instance(), SIGNAL(WindowListEvent()), this, SLOT(checkWindows()) ); + connect(LSession::handle(), SIGNAL(WindowListEvent()), this, SLOT(checkWindows()) ); + connect(LSession::handle(), SIGNAL(WindowListEvent(WId)), this, SLOT(UpdateButton(WId)) ); this->layout()->setContentsMargins(0,0,0,0); QTimer::singleShot(0,this, SLOT(UpdateButtons()) ); //perform an initial sync //QTimer::singleShot(100,this, SLOT(OrientationChange()) ); //perform an initial sync @@ -38,15 +39,15 @@ void LTaskManagerPlugin::UpdateButtons(){ //Now go through all the current buttons first for(int i=0; i WI = BUTTONS[i]->windows(); + QList WI = BUTTONS[i]->windows(); bool updated=false; if(updating > ctime){ return; } //another thread kicked off already - stop this one //Loop over all the windows for this button for(int w=0; w ctime){ return; } //another thread kicked off already - stop this one - if( winlist.contains( WI[w].windowID() ) ){ + if( winlist.contains( WI[w] ) ){ //Still current window - update it later - winlist.removeAll(WI[w].windowID()); //remove this window from the list since it is done + winlist.removeAll(WI[w] ); //remove this window from the list since it is done }else{ //Window was closed - remove it if(WI.length()==1){ @@ -95,7 +96,7 @@ void LTaskManagerPlugin::UpdateButtons(){ //No group, create a new button //qDebug() << "New Button"; LTaskButton *but = new LTaskButton(this, usegroups); - but->addWindow( LWinInfo(winlist[i]) ); + but->addWindow( winlist[i] ); if(this->layout()->direction()==QBoxLayout::LeftToRight){ but->setIconSize(QSize(this->height(), this->height())); }else{ @@ -107,6 +108,16 @@ void LTaskManagerPlugin::UpdateButtons(){ } } +void LTaskManagerPlugin::UpdateButton(WId win){ + for(int i=0; iwindows().contains(win)){ + qDebug() << "Update Task Manager Button (single window ping)"; + QTimer::singleShot(0,BUTTONS[i], SLOT(UpdateButton()) ); + break; + } + } +} + void LTaskManagerPlugin::checkWindows(){ timer->start(); -} \ No newline at end of file +} -- cgit