Mir

Merge lp://staging/~robertcarr/mir/xkbcommon-mapper into lp://staging/~mir-team/mir/trunk

Proposed by Robert Carr
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 593
Proposed branch: lp://staging/~robertcarr/mir/xkbcommon-mapper
Merge into: lp://staging/~mir-team/mir/trunk
Diff against target: 674 lines (+358/-25)
19 files modified
CMakeLists.txt (+1/-0)
cmake/FindXKBCOMMON.cmake (+23/-0)
debian/control (+2/-1)
examples/eglapp.c (+3/-1)
include/test/mir_test/event_factory.h (+1/-0)
src/client/CMakeLists.txt (+1/-0)
src/client/input/CMakeLists.txt (+1/-0)
src/client/input/android_input_receiver.cpp (+31/-3)
src/client/input/android_input_receiver.h (+4/-0)
src/client/input/xkb_mapper.cpp (+102/-0)
src/client/input/xkb_mapper.h (+56/-0)
src/server/input/android/event_filter_dispatcher_policy.cpp (+2/-0)
tests/acceptance-tests/test_client_input.cpp (+75/-14)
tests/mir_test_doubles/event_factory.cpp (+5/-0)
tests/unit-tests/client/input/CMakeLists.txt (+1/-0)
tests/unit-tests/client/input/test_android_input_receiver.cpp (+6/-5)
tests/unit-tests/client/input/test_xkb_mapper.cpp (+40/-0)
tools/setup-android-dependencies.sh (+2/-1)
tools/setup-partial-armhf-chroot.sh (+2/-0)
To merge this branch: bzr merge lp://staging/~robertcarr/mir/xkbcommon-mapper
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Approve
Daniel van Vugt Approve
Kevin DuBois (community) Approve
Review via email: mp+157775@code.staging.launchpad.net

Commit message

Map keys using xkbcommon.

Description of the change

Implement support for a simple client side XKB common based key mapper.

Will resolve the server side todo (event_filter_dispathcer_policy.cpp) over the next few days as I pull together a better working example of server input.

To post a comment you must log in.
Revision history for this message
Kevin DuBois (kdub) wrote :

304 + xkb_context *context;
305 + xkb_keymap *map;
306 + xkb_state *state;

can we use custom deleters instead of the destructor?

+ uint32_t xkb_scan_code = scan_code + 8;
comment/macro/constant to explain the 8

do we need to update the android helper scripts to download the new dependency?

review: Needs Fixing
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 :

>> do we need to update the android helper scripts to download the new dependency?

I updated the android helper scripts but cross-compile-chroot still doesn't work

>> can we use custom deleters instead of the destructor?

Yes

>> comment/macro/constant to explain the 8

Ok

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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
Robert Carr (robertcarr) wrote :

Fixed android build and potentially jenkins hang.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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
Daniel van Vugt (vanvugt) wrote :

Text conflict in examples/eglapp.c
Text conflict in tests/unit-tests/client/input/test_android_input_receiver.cpp
2 conflicts encountered.

Sorry about that. It would be due to my stuff that landed today.

review: Needs Fixing
Revision history for this message
Robert Carr (robertcarr) wrote :

Trunk merged! changes applied!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have no opinion until I get back to this, later. :)

review: Abstain
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

ev->key.action == 0
Can we use constants/macros for action or not possible yet?

Only one real problem:
src/client/* need LGPL headers. Not GPL.

review: Needs Fixing
Revision history for this message
Robert Carr (robertcarr) wrote :

Thanks!

Still no ev->key.action defines (though there is AKEY_EVENT_ACTION_*). I'll try and get this in next week. As always it's not QUITE as simple as it should be to do something sensible ;)

License headers fixed!

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

"stitch in time saves nine":
seems richer types would prevent mis-translation between XKB and evdev codes
that's probably an mp by itself though, just something for later maybe.

367-369 these could probably be const/initialized in constructor.

I'll approve though, looks good as far as the android dependency goes as well

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, I just realized the global:

283 +// xkb scancodes are offset by 8 from evdev scancodes for compatibility with X protocol.
284 +static uint32_t const xkb_scancode_offset_from_evdev = 8;

It would probably be easier to read and less error-prone if you just defined a function or macro...

uint32_t xkb_scancode(uint32_t evdev_scancode)
{
    return evdev_scancode + 8;
}

That would be preferred. But I won't block the proposal on it.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> It would probably be easier to read and less error-prone if you just defined a
> function or macro...
>
> uint32_t xkb_scancode(uint32_t evdev_scancode)
> {
> return evdev_scancode + 8;
> }
>
> That would be preferred. But I won't block the proposal on it.

+1

review: Approve
Revision history for this message
Robert Carr (robertcarr) wrote :

Changed!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Still OK

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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