Mir

Merge lp://qastaging/~mir-team/mir/relative-pointer-events into lp://qastaging/mir

Proposed by Robert Carr
Status: Merged
Approved by: Robert Carr
Approved revision: no longer in the source branch.
Merged at revision: 2770
Proposed branch: lp://qastaging/~mir-team/mir/relative-pointer-events
Merge into: lp://qastaging/mir
Diff against target: 356 lines (+120/-17)
17 files modified
3rd_party/android-input/android/frameworks/base/services/input/InputReader.cpp (+3/-0)
3rd_party/android-input/android/frameworks/base/services/input/InputTransport.cpp (+3/-2)
include/client/mir/events/event_builders.h (+8/-0)
include/client/mir_toolkit/events/input/pointer_event.h (+6/-1)
include/test/mir/test/event_matchers.h (+14/-0)
src/client/event_printer.cpp (+2/-0)
src/client/events/event_builders.cpp (+14/-1)
src/client/input/android/android_input_lexicon.cpp (+3/-1)
src/client/input/input_event.cpp (+4/-0)
src/include/common/mir/events/event_private.h (+2/-0)
src/server/input/android/input_sender.cpp (+2/-0)
src/server/input/android/input_translator.cpp (+11/-7)
src/server/input/surface_input_dispatcher.cpp (+3/-2)
tests/acceptance-tests/test_client_input.cpp (+34/-0)
tests/mir_test_framework/fake_input_device_impl.cpp (+3/-1)
tests/unit-tests/input/android/test_android_input_sender.cpp (+1/-1)
tests/unit-tests/input/android/test_input_translator.cpp (+7/-1)
To merge this branch: bzr merge lp://qastaging/~mir-team/mir/relative-pointer-events
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Chris Halse Rogers Approve
Kevin DuBois (community) Approve
Andreas Pokorny Pending
Cemil Azizoglu Pending
Review via email: mp+265424@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2015-07-16.

Commit message

Provide relative cursor axes as a way to allow Unity8 to draw the pointer.
(LP: #1276322)

Description of the change

Resubmit without prereq

====

Provide relative cursor axes as a way to allow Unity8 to draw the cursor.

This is provided in lieu of the full raw events API we have discussed. The raw events API may still come at a later time other use cases. I wanted to avoid hacking up the android input layer too much when we are intending to replace it soon though.

I have a concern with this branch in that it leaks the location of clients in some cases. If a client receives a stream of input events where dx/dy is changing but x/y is constant then they now know they are on the edge of the screen. I wonder if this is a real problem? If so we could only allow fullscreen surfaces to receive relative coordinates...or brainstorm for more solutions!

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal

It would be nice to also have a test case that moves the mouse beyond the border of the screen, and verify that even when - from the pov of the pointer controller - the mouse did not move due to the screen boundaries we still send out relative position changes.

From a short dive through our pointer controller - we seem to override that position related filtering.

review: Approve
Revision history for this message
Robert Carr (robertcarr) wrote : Posted in a previous version of this proposal

Good idea Andreas I manually tested this but something came up in doing the automated testing! Notably it turns out we are batching pointer events which made verifying large streams of events difficult (e.g. sometimes I would get (0,0) -> (1, 1) -> (2, 2) and sometimes (0, 0) -> (2, 2)).

I've updated the test to feature your suggestion and proposed a dependency branch which ensures only touch events are batched.

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote : Posted in a previous version of this proposal

ok

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal

still looks good

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote : Posted in a previous version of this proposal

some of the x/y coords like:
32 + float x_axis_value, float y_axis_value,
could make use of some of the mir::geometry stuff, but probably more in line with the existing code's style to have them as floats.

229 + mir_pointer_event_axis_value(pev,mir_pointer_axis_vscroll),
space after comma

323 + const float dx = 7.0f;
324 + const float dy = 9.3f;
const ordering

suppose the last two are hygenic/nits, and the first is a minor suggestion for improvement, so approve overall

review: Approve
Revision history for this message
Robert Carr (robertcarr) wrote : Posted in a previous version of this proposal

In order to avoid controversy I've merged prevent-cursor-batching back out of this branch and implemented a workaround using MIR_CLIENT_INPUT_RATE=0

MIR_CLIENT_INPUT_RATE only disables RESAMPLING and not BATCHING so I've modified that in r2755 to allow disabling batching.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

<copy of review from before resubmission>

some of the x/y coords like:
32 + float x_axis_value, float y_axis_value,
could make use of some of the mir::geometry stuff, but probably more in line with the existing code's style to have them as floats.

229 + mir_pointer_event_axis_value(pev,mir_pointer_axis_vscroll),
space after comma

323 + const float dx = 7.0f;
324 + const float dy = 9.3f;
const ordering

suppose the last two are hygenic/nits, and the first is a minor suggestion for improvement, so approve overall

review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

Looks sensible, although I thought we'd be exposing these as a different form of opt-in event?

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Carr (robertcarr) wrote :

Jenkins error unrelated.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches