MirMotionEvent.action needs stronger typing (to MirMotionAction etc)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Medium
|
Robert Carr | ||
mir (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
MirMotionEvent.
MirMotionAction action = static_
OLD DESCRIPTION:
MirEvent::action is currently effectively an opaque value, as Mir headers do not specify its meaning.
So event.h must either define counterparts to the android AMOTION_
"""
/* Bit shift for the action bits holding the pointer index as
* defined by AMOTION_
*/
#define AMOTION_
enum {
/* Bit mask of the parts of the action code that are the action itself.
*/
AMOTION_
/* Bits in the action code that represent a pointer index, used with
* AMOTION_
* down by AMOTION_
* index where the data for the pointer going up or down can be found.
*/
AMOTION_
"""
Right now in the "Qt compositor" code I had to resort to locally defining those values, which is a hack:
""
// from android-input AMOTION_
// mir headers should define them
const int QtEventFeeder:
const int QtEventFeeder:
const int QtEventFeeder:
""
Related branches
- Chris Halse Rogers: Approve
- Alberto Aguirre (community): Needs Information
- PS Jenkins bot (community): Approve (continuous-integration)
- Alexandros Frantzis (community): Approve
- Andreas Pokorny (community): Approve
- Cemil Azizoglu (community): Approve
-
Diff: 1174 lines (+963/-22)14 files modifiedclient-ABI-sha1sums (+4/-1)
common-ABI-sha1sums (+4/-1)
examples/fingerpaint.c (+23/-16)
include/common/mir_toolkit/event.h (+22/-1)
include/common/mir_toolkit/input/input_event.h (+101/-0)
include/common/mir_toolkit/input/key_input_event.h (+113/-0)
include/common/mir_toolkit/input/touch_input_event.h (+141/-0)
platform-ABI-sha1sums (+4/-1)
server-ABI-sha1sums (+4/-1)
src/common/input/CMakeLists.txt (+1/-0)
src/common/input/input_event.cpp (+330/-0)
src/common/symbols.map (+1/-1)
tests/unit-tests/input/CMakeLists.txt (+1/-0)
tests/unit-tests/input/test_input_event.cpp (+214/-0)
summary: |
- MirEvent::action is not defined by the API + MirMotionEvent::action is not defined by the API |
Changed in mir: | |
milestone: | none → 0.10.0 |
Changed in mir: | |
status: | In Progress → Fix Committed |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Just a comment in mir_toolkit/event.h
/*
* TODO(racarr): We would like to store this as a MirMotionAction but the android input stack
* encodes some non enumerable values in it. It's convenient to keep things
* this way for now until we can drop SF/Hybris support in QtUbuntu.
*/
int action;