[PATCH] pager: switch desktop on drag event
Daniel Laidig
d.laidig at gmx.de
Mon Jun 2 17:50:02 CEST 2008
Hi,
I also posted this patch to the review board:
http://reviewboard.vidsolbach.de/r/32/
Make the pager switch desktops if you drag something on it for some time. This
makes it possible to drag between windows on different desktops if the
taskbar just shows windows of the current desktop. Fixes bug
http://bugs.kde.org/show_bug.cgi?id=160714.
Some comments:
- I used a timer of one second, just like the pager of KDE3 did (however, the
comment in the old code state that it's two seconds). Is there a better way
that doesn't use hardcoded times?
- I expected Qt to send me hoverEvents in addition to dragEvents, however this
is not the case. This is bad for two reasons: There should be a visual
indication of the desktop you're activating and my code relies on the hover
code to determine the hovered desktop. As a hack I created fake hoverEvents,
but that involves using internal Qt API and is probably not a good idea.
(Just look for the long comments in the patch.)
It would be great to have some way to receive hover events without this hack.
Any ideas?
BTW: You could also take a look at http://reviewboard.vidsolbach.de/r/31/
(really trivial). :)
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pager-drag-switch.patch
Type: text/x-diff
Size: 5680 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080602/b5231031/attachment.bin
More information about the Panel-devel
mailing list