<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/102779/">http://git.reviewboard.kde.org/r/102779/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Plasma and Aaron J. Seigo.</div>
<div>By Alex Fiestas.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well, as some of you may know I have been tracking down the ghost entries bug... this time I have NOT been able to fix the source of the problem but at least after some GDB at BDS I think I have a workaround.
A Ghost entry happens when a TaskItem is not either a startup or a task, in that case the code that "paints" the task doesn't know what to do but it reserve the space anyway.
Currently the code path is like this:
1-TaskGruopItem::itemAdded is called
2-It calles TaskGruopItem::createAbstractItem
3-createAbstractItem takes a GroupableItem and cast it either to a GroupItem, or LauncherItem or TaskItem depending on the ::itemTtype()
createAbstractItem is prepared to return 0 when an AbstractTaskItem can't be created, and even further WindowTaskItem::setTask is checking if the taskItem is not a startup or a task, the problem is that setTask returns void so we can't really know if the "setting" was succeed or not. In that case, an "empty" WindowTaskItem is returned, being it a ghost entry.
This workaround what does is check if the taskItem is valid, if it is not 0 is returned.
This is a workaround since, in theory a TaskItem should ALWAYS be either a startup or a task so we should find the root of the problem instead of adding yet another check. Is precisely this kind of checks that make all *tasks* stack a mess.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I have been using the patch for 3 days playing around with activities and virtual desktops, so far so good.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasma/desktop/applets/tasks/taskgroupitem.cpp <span style="color: grey">(eec27c2)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/102779/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>