diff options
author | Ken Moore <moorekou@gmail.com> | 2015-09-16 11:09:26 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-09-16 11:09:26 -0400 |
commit | 470d9b82a7269cfec9e6b9d79074deff7bb62dc9 (patch) | |
tree | 643dbc7c6f17e8168cbc271af43afd605f3a3434 /lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | |
parent | Ensure that the screen brightness slider in the system dashboard only goes do... (diff) | |
download | lumina-470d9b82a7269cfec9e6b9d79074deff7bb62dc9.tar.gz lumina-470d9b82a7269cfec9e6b9d79074deff7bb62dc9.tar.bz2 lumina-470d9b82a7269cfec9e6b9d79074deff7bb62dc9.zip |
Fix up all the window activation detection/management within the lumina session. Now when a submenu on the panel is closed somehow or a window was modified with the task manager, it will properly find/activate the right window again.
Diffstat (limited to 'lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index eda1f2cd..01105c97 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -25,6 +25,8 @@ LTaskButton::LTaskButton(QWidget *parent, bool smallDisplay) : LTBWidget(parent) connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked()) ); connect(winMenu, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(openActionMenu()) ); connect(winMenu, SIGNAL(triggered(QAction*)), this, SLOT(winClicked(QAction*)) ); + connect(winMenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); + connect(actMenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); } LTaskButton::~LTaskButton(){ @@ -107,10 +109,13 @@ void LTaskButton::UpdateButton(){ QAction *tmp = winMenu->addAction( WINLIST[i].icon(junk), WINLIST[i].text() ); tmp->setData(i); //save which number in the WINLIST this entry is for LXCB::WINDOWSTATE stat = WINLIST[i].status(true); //update the saved state for the window - if(stat==LXCB::ATTENTION){ showstate = stat; } //highest priority + if(stat<LXCB::ACTIVE && WINLIST[i].windowID() == LSession::handle()->activeWindow()){ stat = LXCB::ACTIVE; } + if(stat > showstate){ showstate = stat; } //higher priority + + /*if(stat==LXCB::ATTENTION){ showstate = stat; } //highest priority else if( stat==LXCB::ACTIVE && showstate != LXCB::ATTENTION){ showstate = stat; } //next priority else if( stat==LXCB::VISIBLE && showstate != LXCB::ATTENTION && showstate != LXCB::ACTIVE){ showstate = stat; } - else if(showstate == LXCB::INVISIBLE || showstate == LXCB::IGNORE){ showstate = stat; } //anything is the same/better + else if(showstate == LXCB::INVISIBLE || showstate == LXCB::IGNORE){ showstate = stat; } //anything is the same/better*/ } //Now setup the button appropriately // - visibility |