[Panel-devel] [PATCH] mousewheel on taskbar

Marco Martin martkive at gmail.com
Sat Dec 8 14:22:53 CET 2007


On Friday 07 December 2007, Aaron J. Seigo wrote:
> On Friday 07 December 2007, Marco Martin wrote:
> > Hi all,
> > this is an attempt to make possible to switch windows with the mousewheel
> > on the taskbar
>
> thanks =)
>
> > it seems to work pretty weel, even if at the moment it only supports a
> > taskbar with only a root group, but it shouldn't be difficult to make it
> > support subgroups too
>
> subgroup support would be needed, yes.
i have some ideas about it, but at the moment since they still aren't 
supported,  implementing it would be a totally blind and untestable thing.
i have also some questions about it:how the groups are planned to appear? 
something like in kde3 as task entries that are popup menus?
if so, a mouse wheel event could behave in many different ways:
-it could iterate all the tasks of every subgroup one at a time, like kde3 
behaves, maybe the most "natural" one and the most tricky to implement
-it could activate all the tasks of a given group t a time, bringing all the 
group windows to front (at the moment it should behave inthis way)
-when the mouse cursor is over a group the iteration can be restricted only to 
that group or could be at the root level like in kde3 (it would be needed to 
move the wheelevent at applet level and i think is a good thing because now i 
fear that if a group is inside another both of them would want to manage the 
event)

for now i would move the wheelevent into the applet and keep the "activate 
all" behaviour, and when the groups support will be done eventually make it a 
little bit smarter
> > don't know if it has some particular problem, any comments?
>
> how well does this work with an empty taskbar, or if no windows are active?
> in particular the code in wheelEvent. seems like it will result in access
> to non-existing objects. probably needs some checks on _activeTask !+ -1
> and !_tasks.isEmpty().
uhm, well, it explodes, yeah :) now the cycle is done only if there are 2 or 
more items (i think should be dealt differently if there is only one window 
item or only one group item)
> can you also add some comments to the code in wheelEvent explaining exactly
> what it is doing there since it's obvious once you know the point and
> purpose, but .. yeah .. it's probably a bit mystical if you don't know that
> it's suppose to go the next event or to the previous one ;)
ok, added a little explanation :)

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


More information about the Panel-devel mailing list