aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-09-05 09:51:07 -0400
committerKen Moore <ken@pcbsd.org>2014-09-05 09:51:07 -0400
commit27329eae9816f5ae4d4902054a136fe5c89ed155 (patch)
tree7941d001472d69e8f5ebdc535ad7210a97b9568a /lumina-desktop
parentHide any external devices that are mounted on hidden directories in the file ... (diff)
downloadlumina-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')
-rw-r--r--lumina-desktop/lumina-desktop.pro2
-rw-r--r--lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp19
2 files changed, 10 insertions, 11 deletions
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; 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());
bgstack15