Bug 119850

Summary: app started by kmail does not show in kicker
Product: [Unmaintained] kicker Reporter: Wolfgang Rohdewald <wolfgang>
Component: taskbarappletAssignee: Aaron J. Seigo <aseigo>
Status: RESOLVED FIXED    
Severity: normal CC: annma, johann-nikolaus
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Wolfgang Rohdewald 2006-01-10 11:47:50 UTC
Version:           1.8.3 (using KDE 3.5.0, Debian Package 4:3.5.0-3 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15

I have a mail with a .pdf attachment. When clicking on it, acroread starts. While acroread starts, an entry in kicker appears. When it runs, the entry disappears.

OTOH if I start acroread standalone, it correctly shows in kicker.

Not sure where to report this - kmail or kicker.
Comment 1 Thiago Macieira 2006-01-10 14:12:31 UTC
The taskbar entry isn't show, but it is running?

Can you try and run it from the command-line using the exact same arguments as were used to run it from kmail? Does the same thing happen?

How about running it from the Run Command (Alt+F2) window?
Comment 2 Wolfgang Rohdewald 2006-01-10 14:47:55 UTC
On Dienstag 10 Januar 2006 14:12, Thiago Macieira wrote:
> The taskbar entry isn't show, but it is running?


right
 
More experiments with ALT-F2:
starting acroread, xpdf or kate without arguments: taskbar entry appears
starting them with arguments: No taskbar entry.

in all cases, there is a sandbox taskbar entry while the program starts up.

This does not answer exactly your questions but I hope it helps.

so it does not seem to be a kmail bug anymore but I am not sure 
to which package ALT-F2 belongs.
Comment 3 Aaron J. Seigo 2006-01-10 20:12:20 UTC
if you start these apps from the kmenu, do they get taskbar entries?
from a konsole?

what are your taskbar settings?
Comment 4 Wolfgang Rohdewald 2006-01-10 23:50:33 UTC
On Dienstag 10 Januar 2006 20:12, Aaron J.Seigo wrote:
> what are your taskbar settings?


OK, I found the setting causing this:
GroupTasks=GroupAlways
The other two values (never, only when full=default) work
correctly.

> if you start these apps from the kmenu, do they get taskbar entries?


yes, they do. But since the kmenu always starts them without
arguments (which works in ALT-F2), I cannot say what would happen
in the case with an argument (which fails in ALT-F2)

> from a konsole?


yes, that works too. With or without arguments.
 

wr:~/.kde/share/config$ cat ktaskbarrc
[$Version]
update_info=kickerrc.upd:kde_3_5_taskbarEnums

[General]
GroupTasks=GroupAlways
LeftButtonAction=ShowTaskList
MiddleButtonAction=ActivateRaiseOrMinimize
RightButtonAction=ShowOperationsMenu
ShowAllWindows=true
ShowIcon=true
ShowWindowListBtn=true
SortByDesktop=true
Comment 5 Thiago Macieira 2006-01-14 15:49:15 UTC
*** Bug 120096 has been marked as a duplicate of this bug. ***
Comment 6 Anne-Marie Mahfouf 2006-01-16 22:36:52 UTC
I confirm that bug with today's KDE 3.5 branch svn code.
The "Group Similar tasks" settting set to When Taskbar Full or Always miss some KMail attachement icons in tha taskbar. They are shown if this is set to Never.
Comment 7 Aaron J. Seigo 2006-01-17 18:20:36 UTC
SVN commit 499369 by aseigo:

we may end up adding the window to the startup item before the startup
container is removed, so make sure we don't delete it in that case.
BUG:119850


 M  +8 -5      taskbar.cpp  
 M  +12 -0     taskcontainer.cpp  
 M  +1 -0      taskcontainer.h  


--- branches/KDE/3.5/kdebase/kicker/taskbar/taskbar.cpp #499368:499369
@@ -346,7 +346,7 @@
     }
 
     // try to place the container after one of the same app
-    if (TaskBarSettings::sortByApp() && !isGrouping)
+    if (TaskBarSettings::sortByApp())
     {
         TaskContainer::Iterator it = containers.begin();
         for (; it != containers.end(); ++it)
@@ -477,6 +477,12 @@
         }
     }
 
+    container->remove(startup);
+    if (!container->isEmpty())
+    {
+        return;
+    }
+
     TaskContainer::List::iterator it = containers.find(container);
     if (it != containers.end())
     {
@@ -551,10 +557,7 @@
         emit containerCountChanged();
     }
 
-    if (!blocklayout)
-    {
-        reLayoutEventually();
-    }
+    reLayoutEventually();
 }
 
 void TaskBar::windowChangedGeometry(Task::Ptr task)
--- branches/KDE/3.5/kdebase/kicker/taskbar/taskcontainer.cpp #499368:499369
@@ -344,6 +344,18 @@
     update();
 }
 
+void TaskContainer::remove(Startup::Ptr startup)
+{
+    if (!startup || startup != m_startup)
+    {
+        return;
+    }
+
+    m_startup = 0;
+    animationTimer.stop();
+    frames.clear();
+}
+
 bool TaskContainer::contains(Task::Ptr task)
 {
     if (!task)
--- branches/KDE/3.5/kdebase/kicker/taskbar/taskcontainer.h #499368:499369
@@ -55,6 +55,7 @@
 
     void add(Task::Ptr);
     void remove(Task::Ptr);
+    void remove(Startup::Ptr);
 
     bool contains(Task::Ptr);
     bool contains(Startup::Ptr);