From ebd5faf993fd3ea8f6e929df6f3288cfa1d4b752 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 5 Jan 2015 14:31:43 -0500 Subject: Clean up the Panel/Taskmanager XCB usage quite a bit. Now the panel is "seen" by fluxbox when a window is maximized, and the task manager works with the highly asynchronous XCB events. --- lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp') diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp index 67378c68..1785c681 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp @@ -34,6 +34,8 @@ void LTaskManagerPlugin::UpdateButtons(){ //Get the current window list QList winlist = LSession::handle()->XCB->WindowList(); + //Do not change the status of the previously active window if it just changed to a non-visible window + bool skipActive = !winlist.contains( LSession::handle()->XCB->ActiveWindow() ); //qDebug() << "Update Buttons:" << winlist; if(updating > ctime){ return; } //another thread kicked off already - stop this one //Now go through all the current buttons first @@ -71,7 +73,9 @@ void LTaskManagerPlugin::UpdateButtons(){ if(!updated){ //qDebug() << "Update Button:" << i; if(updating > ctime){ return; } //another thread kicked off already - stop this one - QTimer::singleShot(1,BUTTONS[i], SLOT(UpdateButton()) ); //keep moving on + if(!skipActive || !BUTTONS[i]->isActive()){ + QTimer::singleShot(1,BUTTONS[i], SLOT(UpdateButton()) ); //keep moving on + } } } //Now go through the remaining windows -- cgit