[Differential] [Changed Subscribers] D2953: [tabbox] Intercept QWheelEvents on QQuickWindow for scrolling
    luebking (Thomas Lübking) 
    noreply at phabricator.kde.org
       
    Thu Oct  6 07:18:47 UTC 2016
    
    
  
luebking added inline comments.
INLINE COMMENTS
> tabboxhandler.cpp:618
> +    if (watched == d->window()) {
> +        if (e->type() == QEvent::Wheel) {
> +            QWheelEvent *event = static_cast<QWheelEvent*>(e);
test type first - you'll get many paint events etc. but the filter is installed to only one object, ie. first check will currently always hit and second very few times only
> tabboxhandler.cpp:621
> +            // On x11 the delta for vertical scrolling might also be on X for whatever reason
> +            const int delta = event->angleDelta().y() != 0 ? event->angleDelta().y() : event->angleDelta().x();
> +            d->wheelAngleDelta += delta;
x + y?
> tabboxhandler.cpp:626
> +                const QModelIndex index = nextPrev(true);
> +                if (index.isValid()) {
> +                    setCurrentIndex(index);
draw the indev var out, find the last one and if it's in the end valid, set it only once?
REPOSITORY
  rKWIN KWin
BRANCH
  tabbox-wheelevent-5.8
REVISION DETAIL
  https://phabricator.kde.org/D2953
EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/
To: graesslin, #kwin, #plasma, broulik, lukedashjr
Cc: luebking, lukedashjr, plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161006/2155bfcc/attachment-0001.html>
    
    
More information about the Plasma-devel
mailing list