Commit 869aaea7 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Don't eat mouse press events on Linux

Since we explicitly accept all the tablet press events, Linux
is guaranteed not to generate any synthesized mouse presses for
them. Therefore, we shouldn't eat them.

On Windows, the events are synthesized by the OS, so we need
to eat them still.

BUG:407595
parent db4ff4ad
......@@ -509,12 +509,19 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
d->blockMouseEvents();
//Reset signal compressor to prevent processing events before press late
d->resetCompressor();
d->eatOneMousePress();
#if defined Q_OS_LINUX && !defined QT_HAS_ENTER_LEAVE_PATCH
// remove this hack when this patch is integrated:
// https://codereview.qt-project.org/#/c/255384/
event->setAccepted(false);
d->eatOneMousePress();
#elif defined Q_OS_WIN32
/**
* Windows is the only platform that synthesizes mouse events for
* the tablet on OS-level, that is, even when we accept the event
*/
d->eatOneMousePress();
#endif
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment