~nick-dedekind/qtubuntu/stagedFullscreen.form-factor

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/input.cpp

  • Committer: CI Train Bot
  • Author(s): Lukáš Tinkl, Gerry Boland
  • Date: 2015-11-17 14:49:26 UTC
  • mfrom: (283.1.5 fixWheel)
  • Revision ID: ci-train-bot@canonical.com-20151117144926-42ryd96glhd27rv9
Fix inconsistent mouse wheel scrolling behavior
Approved by: Daniel d'Andrada, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
467
467
 
468
468
        if (hDelta != 0 || vDelta != 0) {
469
469
            const QPoint angleDelta = QPoint(hDelta * 15, vDelta * 15);
470
 
            QWindowSystemInterface::handleWheelEvent(window, timestamp, localPoint, localPoint,
 
470
            QWindowSystemInterface::handleWheelEvent(window, timestamp, localPoint, window->position() + localPoint,
471
471
                                                     QPoint(), angleDelta, modifiers, Qt::ScrollUpdate);
472
 
        } else {
473
 
            auto buttons = extract_buttons(pev);
474
 
            if (buttons != Qt::NoButton)
475
 
                mLastFocusedWindow = platformWindow;
476
 
            QWindowSystemInterface::handleMouseEvent(window, timestamp, localPoint, localPoint /* Should we omit global point instead? */,
477
 
                                                     buttons, modifiers);
478
472
        }
 
473
        auto buttons = extract_buttons(pev);
 
474
        QWindowSystemInterface::handleMouseEvent(window, timestamp, localPoint, window->position() + localPoint /* Should we omit global point instead? */,
 
475
                                                 buttons, modifiers);
479
476
        break;
480
477
    }
481
478
    case mir_pointer_action_enter:
482
 
        QWindowSystemInterface::handleEnterEvent(window, localPoint, localPoint);
 
479
        QWindowSystemInterface::handleEnterEvent(window, localPoint, window->position() + localPoint);
483
480
        break;
484
481
    case mir_pointer_action_leave:
485
482
        QWindowSystemInterface::handleLeaveEvent(window);