diff options
author | Ken Moore <ken@pcbsd.org> | 2014-09-05 09:51:07 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-09-05 09:51:07 -0400 |
commit | 27329eae9816f5ae4d4902054a136fe5c89ed155 (patch) | |
tree | 7941d001472d69e8f5ebdc535ad7210a97b9568a /lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | |
parent | Hide any external devices that are mounted on hidden directories in the file ... (diff) | |
download | lumina-27329eae9816f5ae4d4902054a136fe5c89ed155.tar.gz lumina-27329eae9816f5ae4d4902054a136fe5c89ed155.tar.bz2 lumina-27329eae9816f5ae4d4902054a136fe5c89ed155.zip |
Fix a bug with the taskmanager when multiple windows from the same application have the same title: make sure to properly select the window that was clicked.
While here, also apply the libLumina dependency order to give preference to the locally/recently compiles libraries during the build if possible in all the lumina tools.
Diffstat (limited to 'lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index 80600488..a605ae86 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -100,7 +100,8 @@ void LTaskButton::UpdateButton(){ noicon = false; } } - winMenu->addAction( WINLIST[i].icon(), WINLIST[i].text() ); + QAction *tmp = winMenu->addAction( WINLIST[i].icon(), WINLIST[i].text() ); + tmp->setData(i); //save which number in the WINLIST this entry is for Lumina::STATES stat = WINLIST[i].status(); if(stat==Lumina::NOTIFICATION){ showstate = stat; } //highest priority else if( stat==Lumina::ACTIVE && showstate != Lumina::NOTIFICATION){ showstate = stat; } //next priority @@ -171,10 +172,9 @@ void LTaskButton::triggerWindow(){ void LTaskButton::winClicked(QAction* act){ //Get the window from the action - QString txt = act->text(); - for(int i=0; i<WINLIST.length(); i++){ - if(WINLIST[i].text() == txt){ cWin = WINLIST[i]; } - } + if(act->data().toInt() < WINLIST.length()){ + cWin = WINLIST[act->data().toInt()]; + }else{ cWin = LWinInfo(); } //clear it //Now trigger the window triggerWindow(); } @@ -183,11 +183,10 @@ void LTaskButton::openActionMenu(){ //Get the Window the mouse is currently over QAction *act = winMenu->actionAt(QCursor::pos()); if( act != 0 && winMenu->isVisible() ){ - //get the window from the action - QString txt = act->text(); - for(int i=0; i<WINLIST.length(); i++){ - if(WINLIST[i].text() == txt){ cWin = WINLIST[i]; } - } + //Get the window from the action + if(act->data().toInt() < WINLIST.length()){ + cWin = WINLIST[act->data().toInt()]; + }else{ cWin = LWinInfo(); } //clear it } //Now show the action menu actMenu->popup(QCursor::pos()); |