[PATCH] mousewheel on taskbar resumed

Marco Martin notmart at gmail.com
Sat May 17 13:10:25 CEST 2008


On Saturday 17 May 2008, Aaron J. Seigo wrote:
> On Friday 16 May 2008, Marco Martin wrote:
> > hmm, comments?
>
> +    //if active initialize m_activeTask at the last item inserted
> +    if (task->isActive()) {
> +        m_activeTask = m_windowTaskItems.end() - 1;
> +    }
>
> assumes it gets inserted at the end. why not:
>
> m_activeTask = m_windowTaskItems.find(task);?
ok
> Tasks::wheelEvent looks a little dangerous; what happens when a task is
> removed but no other window becomes active? (e.g. multiple desktops, only
> one window on current desktop, window is closed). the iterator will now be
> invalid, correct?
now when a task it's removed the iterator is put at the end and when the 
taskbar is empty the first item is inserted is selected, so the iterator 
should never became invalid.

Cheers,
Marco Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: taskwheelporting2.diff
Type: text/x-diff
Size: 3070 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080517/79929421/attachment.bin 


More information about the Panel-devel mailing list