Mir

Merge lp:~andreas-pokorny/mir/fix-1521225 into lp:mir

Proposed by Andreas Pokorny
Status: Merged
Approved by: Kevin DuBois
Approved revision: no longer in the source branch.
Merged at revision: 3155
Proposed branch: lp:~andreas-pokorny/mir/fix-1521225
Merge into: lp:mir
Diff against target: 16 lines (+3/-1)
1 file modified
src/server/input/vt_filter.cpp (+3/-1)
To merge this branch: bzr merge lp:~andreas-pokorny/mir/fix-1521225
Reviewer Review Type Date Requested Status
Kevin DuBois (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Alberto Aguirre (community) Approve
Alan Griffiths Approve
Review via email: mp+279123@code.launchpad.net

Commit message

fix error in bitwise logic

Description of the change

Current logic actually triggers when either ctrl or alt modifier is pressed.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Better, but there's another error in the same area:

After exiting Mir (by Ctrl+Alt+BkSp) VT switching by Ctrl+Alt+Fn seems broken (A switch by "sudo chvt 7" gets things back to normal).

Is this a separate problem?

review: Needs Information
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> Better, but there's another error in the same area:
>
> After exiting Mir (by Ctrl+Alt+BkSp) VT switching by Ctrl+Alt+Fn seems broken
> (A switch by "sudo chvt 7" gets things back to normal).
>
> Is this a separate problem?

Yes I think so..

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

OK then. Logged the VT switching issue as lp:1521651

review: Approve
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

OK.

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

could use a test, but looks good otherwise

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/input/vt_filter.cpp'
2--- src/server/input/vt_filter.cpp 2015-11-17 11:34:17 +0000
3+++ src/server/input/vt_filter.cpp 2015-12-01 14:13:32 +0000
4@@ -46,9 +46,11 @@
5 return false;
6
7 auto const keyboard_event = mir_input_event_get_keyboard_event(input_event);
8+ auto const modifier_state = mir_keyboard_event_modifiers(keyboard_event);
9
10 if (mir_keyboard_event_action(keyboard_event) == mir_keyboard_action_down &&
11- (mir_keyboard_event_modifiers(keyboard_event) & (mir_input_event_modifier_alt | mir_input_event_modifier_ctrl)))
12+ (modifier_state & mir_input_event_modifier_alt) &&
13+ (modifier_state & mir_input_event_modifier_ctrl))
14 {
15 switch (mir_keyboard_event_scan_code(keyboard_event))
16 {

Subscribers

People subscribed via source and target branches