[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/flake
From: Adam Celarek <bugs_kde_org () xibo ! at>
Date: 2010-10-03 22:07:16
Message-ID: 20101003220716.97D22AC88C () svn ! kde ! org
[Download RAW message or body]
SVN commit 1182233 by adamc:
QTabletEvent has no information about which button was pressed on the
stylus. We have to reject it, so that it gets resent as a QMouseEvent
with the correct buttons.
M +14 -3 KoToolProxy.cpp
--- trunk/koffice/libs/flake/KoToolProxy.cpp #1182232:1182233
@@ -121,8 +121,22 @@
if (d->activeTool) d->activeTool->repaintDecorations();
}
+#include <KDebug>
void KoToolProxy::tabletEvent(QTabletEvent *event, const QPointF &point)
{
+ // don't process tablet events for stylus middle and right mouse button
+ // they will be re-send as mouse events with the correct button. there is no \
possibility to get the button from the QTabletEvent. + \
if(qFuzzyIsNull(event->pressure()) && d->tabletPressed==false && \
event->type()!=QEvent::TabletMove) { + kDebug()<<"don't accept tablet event: \
"<< point; + return;
+ }
+ else {
+ // Accept the tablet events as they are useless to parent widgets and they \
will + // get re-send as mouseevents if we don't accept them.
+ kDebug()<<"accept tablet event: "<< point;
+ event->accept();
+ }
+
KoInputDevice id(event->device(), event->pointerType(), event->uniqueId());
KoToolManager::instance()->priv()->switchInputDevice(id);
@@ -151,9 +165,6 @@
; // ignore the rest.
}
- // Always accept tablet events as they are useless to parent widgets and they \
will
- // get re-send as mouseevents if we don't accept them.
- event->accept();
d->mouseLeaveWorkaround = true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic