diff options
author | Ken Moore <ken@pcbsd.org> | 2015-01-05 07:54:31 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-01-05 07:54:31 -0500 |
commit | 3004b0d22caf1985d5e9b60c7647293f10f5690a (patch) | |
tree | 9546d3788cd894cc40ced6575ab07d549a5750ff /lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp | |
parent | Add support for the LIBPREFIX qmake variable for all the project files. This ... (diff) | |
download | lumina-3004b0d22caf1985d5e9b60c7647293f10f5690a.tar.gz lumina-3004b0d22caf1985d5e9b60c7647293f10f5690a.tar.bz2 lumina-3004b0d22caf1985d5e9b60c7647293f10f5690a.zip |
Quick checkpoint of additional XCB improvements/fixes. Still having an issue with fluxbox maximizing windows underneath panels at the moment.
Diffstat (limited to 'lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
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<BUTTONS.length(); i++){ //Get the windows managed in this button - QList<LWinInfo> WI = BUTTONS[i]->windows(); + QList<WId> 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<WI.length(); w++){ if(updating > 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; i<BUTTONS.length(); i++){ + if(BUTTONS[i]->windows().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 +} |