[PATCH] pass mouse wheel events to the wallpaper

Aaron J. Seigo aseigo at kde.org
Thu Sep 4 18:48:09 CEST 2008


On Thursday 04 September 2008, Benoit Jacob wrote:
> Hi,
>
> The attached patch makes Containment forward mouse wheel events first
> to the wallpaper, if the event screenPos() indicates that the mouse
> cursor was on the wallpaper. I adapted this code from what you were
> already doing with mouseMoveEvent().

cool ... two points:

you need to re-accept the the event if the wallpaper ignores it; so this:

if(event->isAccepted()) return;

should be:

    if (event->isAccepted()) {
        return;
    }

    event->accept();
}

the second point is that the whitespace usage around the if statement is 
incorrectin your patch (and fixed in the example above)

otherwise .. beauty =) please commit.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080904/20a778a6/attachment.sig 


More information about the Plasma-devel mailing list