From 27329eae9816f5ae4d4902054a136fe5c89ed155 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 5 Sep 2014 09:51:07 -0400 Subject: 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. --- lumina-desktop/lumina-desktop.pro | 2 +- .../panel-plugins/taskmanager/LTaskButton.cpp | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'lumina-desktop') diff --git a/lumina-desktop/lumina-desktop.pro b/lumina-desktop/lumina-desktop.pro index e3a2001e..885e914c 100644 --- a/lumina-desktop/lumina-desktop.pro +++ b/lumina-desktop/lumina-desktop.pro @@ -5,7 +5,7 @@ TARGET = Lumina-DE target.path = /usr/local/bin LIBS += -L../libLumina -lLuminaUtils -lXdamage -lX11 -LIBPATH = ../libLumina +QMAKE_LIBDIR = ../libLumina DEPENDPATH += ../libLumina TEMPLATE = app 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; idata().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; idata().toInt() < WINLIST.length()){ + cWin = WINLIST[act->data().toInt()]; + }else{ cWin = LWinInfo(); } //clear it } //Now show the action menu actMenu->popup(QCursor::pos()); -- cgit