Merge lp:~chasedouglas/oif-qml/no-touchscreen-conversion into lp:oif-qml

Proposed by Chase Douglas
Status: Merged
Merged at revision: 115
Proposed branch: lp:~chasedouglas/oif-qml/no-touchscreen-conversion
Merge into: lp:oif-qml
Diff against target: 29 lines (+2/-6)
1 file modified
src/geissingleton.cpp (+2/-6)
To merge this branch: bzr merge lp:~chasedouglas/oif-qml/no-touchscreen-conversion
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Review via email: mp+103187@code.launchpad.net

Description of the change

Don't convert touchscreen coordinates anymore. The coordinates are already in window space.

To post a comment you must log in.
113. By Chase Douglas

Continue processing events until all have been consumed

This fixes the "Failed to dispatch geis events" warning from being
emitted.

Revision history for this message
Stephen M. Webb (bregma) wrote :

OK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/geissingleton.cpp'
2--- src/geissingleton.cpp 2011-10-14 17:22:30 +0000
3+++ src/geissingleton.cpp 2012-04-23 22:34:23 +0000
4@@ -273,13 +273,12 @@
5 foreach (const GestureArea* area, window_map_.values(window)) {
6 QGraphicsScene* scene = area->scene();
7 QGraphicsView* view = scene->views().first();
8- QRectF bounds(view->mapToGlobal(QPoint(0, 0)), view->size());
9
10 /* touches may be null if it consists of only one point */
11 if (touches.isValid()) {
12- if (bounds.contains(touches))
13+ if (view->sceneRect().contains(touches))
14 return scene;
15- } else if (bounds.contains(touches.topLeft())) {
16+ } else if (view->sceneRect().contains(touches.topLeft())) {
17 return scene;
18 }
19 }
20@@ -349,9 +348,6 @@
21 }
22
23 if (scene) {
24- QPoint offset(scene->views().first()->mapFromGlobal(QPoint(0, 0)));
25- touches_rect.translate(offset);
26-
27 if (touches_rect.isValid())
28 items.append(scene->items(touches_rect));
29 else

Subscribers

People subscribed via source and target branches