Merge lp://qastaging/~andreas-pokorny/mir/add-key-repeat-utility into lp://qastaging/mir
Status: | Work in progress |
---|---|
Proposed branch: | lp://qastaging/~andreas-pokorny/mir/add-key-repeat-utility |
Merge into: | lp://qastaging/mir |
Prerequisite: | lp://qastaging/~andreas-pokorny/mir/add-dispatchable-alarm-factory |
Diff against target: |
407 lines (+340/-11) 6 files modified
include/test/mir/test/doubles/mock_alarm_factory.h (+18/-11) src/platforms/evdev/CMakeLists.txt (+1/-0) src/platforms/evdev/key_repeater.cpp (+97/-0) src/platforms/evdev/key_repeater.h (+64/-0) tests/unit-tests/input/CMakeLists.txt (+1/-0) tests/unit-tests/input/test_key_repeater.cpp (+159/-0) |
To merge this branch: | bzr merge lp://qastaging/~andreas-pokorny/mir/add-key-repeat-utility |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Kevin DuBois (community) | Approve | ||
Review via email:
|
Commit message
Add Key repeat utility
Similar to the key press tracking in KeyRepeatDispat
Description of the change
A split out of an upcoming branch that moves repeat handling into the input platforms and makes it configureable. In this MP an implementation of the necessary key code tracking is added.
Unmerged revisions
- 3421. By Andreas Pokorny
-
merge prereq to resolve conflict
- 3420. By Andreas Pokorny
-
Merge improvement from kdub..
- 3419. By Andreas Pokorny
-
merge prereq
- 3418. By Andreas Pokorny
-
fixed indenting
- 3417. By Andreas Pokorny
-
merge prereq
- 3416. By Andreas Pokorny
-
Add accessors
- 3415. By Andreas Pokorny
-
Add Key repeat utility
Similar to the key press tracking in KeyRepeatDispat
cher, this class will support the evdev platform and fake input devices in implementing repeat handling. - 3414. By Andreas Pokorny
-
Add mir::dispatch:
:AlarmFactory Implementation of mir::time:
:AlarmFactory that works with mir::dispatch: :Dispatchable and supports all the state transitions required by the test suite accumulated in test_glib_ main_loop. cpp. With this change several GPL interfaces defined inside the mirserver API have been moved to mircommon and LGPL.
+ // destructor cancels the alarm
+ ~MockAlarm()
+ {
+ cancel();
+ }
Seems specific to a test
+ if (existing_timer == repeat_ alarms_ by_scancode. end()) alarms_ by_scancode. emplace( >create_ alarm( timeout( code);
+ existing_timer = repeat_
+ std::make_pair(
+ code,
+ alarm_factory-
+ [this, code]()
+ {
+ this->handle_
+ })
+ )
+ ).first;
braces around multi-line if statement
+ mtd::MockAlarm * alarm = new mtd::MockAlarm;
needs delete/unique_ptr?