Merge lp://qastaging/~andreas-pokorny/mir/fix-1530946 into lp://qastaging/mir
Status: | Merged |
---|---|
Approved by: | Andreas Pokorny |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3266 |
Proposed branch: | lp://qastaging/~andreas-pokorny/mir/fix-1530946 |
Merge into: | lp://qastaging/mir |
Diff against target: |
1416 lines (+544/-220) 33 files modified
include/client/mir/events/event_builders.h (+2/-1) include/client/mir_toolkit/events/keymap_event.h (+25/-1) include/server/mir/scene/null_surface_observer.h (+1/-1) include/server/mir/scene/surface.h (+2/-1) include/server/mir/scene/surface_observer.h (+4/-2) include/test/mir/test/doubles/stub_surface.h (+2/-1) include/test/mir/test/event_matchers.h (+2/-15) src/client/event.cpp (+23/-6) src/client/event_printer.cpp (+1/-8) src/client/events/CMakeLists.txt (+2/-0) src/client/events/event_builders.cpp (+41/-46) src/client/events/make_empty_event.cpp (+42/-0) src/client/events/make_empty_event.h (+32/-0) src/client/events/serialization.cpp (+111/-0) src/client/input/xkb_mapper.cpp (+70/-45) src/client/mir_surface.cpp (+8/-4) src/client/rpc/mir_protobuf_rpc_channel.cpp (+45/-46) src/client/symbols.map (+4/-0) src/include/client/mir/events/serialization.h (+35/-0) src/include/common/mir/events/event_private.h (+3/-1) src/include/common/mir/input/xkb_mapper.h (+22/-7) src/include/server/mir/scene/surface_event_source.h (+2/-1) src/include/server/mir/scene/surface_observers.h (+2/-1) src/server/frontend/event_sender.cpp (+4/-3) src/server/scene/basic_surface.cpp (+7/-5) src/server/scene/basic_surface.h (+2/-1) src/server/scene/legacy_surface_change_notification.cpp (+2/-1) src/server/scene/legacy_surface_change_notification.h (+2/-1) src/server/scene/null_surface_observer.cpp (+5/-1) src/server/scene/surface_event_source.cpp (+6/-2) tests/acceptance-tests/test_client_input.cpp (+31/-17) tests/include/mir/test/doubles/stub_scene_surface.h (+2/-1) tests/mir_test_framework/stub_surface.cpp (+2/-1) |
To merge this branch: | bzr merge lp://qastaging/~andreas-pokorny/mir/fix-1530946 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Mir CI Bot | continuous-integration | Approve | |
Alan Griffiths | Approve | ||
Chris Halse Rogers | Approve | ||
Alberto Aguirre (community) | Approve | ||
Review via email:
|
Commit message
Send the keymap instead of not sending the credentials over the wire
Moves the compilation of keymaps to the server, so that a client may never receive an invalid keymap set up. Also adds a MirDeviceId to the event, so that in a future iteration we can implement the per device keymaps. Those cannot be implemented right now, since the nested server has yet no access to the set of available devices that may need a keymap.
In a better world we would use a mem-fd and compile the keymaps only once, and just send the keymap over the wire.
Description of the change
Surprise surprise keymap changing never worked.
This fixes three issues, and prepares a new feature:
- xkb commons xkb_rule_names is easy to initialize wrongly, the surface interface now uses strings instead
- xkb_rule_names was never serialized properly so, the client rpc channel only received server side pointers
- keymap compilation happens on server so illegal combinations are tracked immediately
The new feature is configuring per device keymaps. This cannot be implemented with the current MP yet, since the nested server is still unaware of any attached keyboards, that might need keymaps..
There are changes that seem unrelated to this fix. For example: a public make_event() function that creates an uninitialized (aka invalid) event. I don't think any code outside our event creation could need this.