Merge lp:~santileortiz/slingshot/fix-1635776 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Santiago
Status: Merged
Approved by: Cody Garver
Approved revision: 715
Merged at revision: 716
Proposed branch: lp:~santileortiz/slingshot/fix-1635776
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 25 lines (+0/-12)
1 file modified
src/SlingshotView.vala (+0/-12)
To merge this branch: bzr merge lp:~santileortiz/slingshot/fix-1635776
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+314255@code.launchpad.net

Commit message

Remove ancient GDK_MODIFIER hack that breaks input methods like fcitx (lp:1602472)

Description of the change

Fixes input methods on the search entry.

All flags that were not modifiers were being cleared from the event, in particular GDK_MODIFIER_RESERVED_25_MASK was being cleared, which caused an infinite loop when an input method was active (for instance Fcitx).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/SlingshotView.vala'
2--- src/SlingshotView.vala 2016-11-21 04:43:16 +0000
3+++ src/SlingshotView.vala 2017-01-06 21:08:00 +0000
4@@ -343,21 +343,9 @@
5 }
6 }
7
8- /*
9- Overriding the default handler results in infinite loop of error messages
10- when an input method is in use (Gtk3 bug?). Key press events are
11- captured by an Event Box and passed to this function instead.
12-
13- Events not dealt with here are propagated to the search_entry by the
14- usual mechanism.
15- */
16 public bool on_key_press (Gdk.EventKey event) {
17 var key = Gdk.keyval_name (event.keyval).replace ("KP_", "");
18
19- event.state &= (Gdk.ModifierType.SHIFT_MASK |
20- Gdk.ModifierType.MOD1_MASK |
21- Gdk.ModifierType.CONTROL_MASK);
22-
23 if ((event.state & Gdk.ModifierType.CONTROL_MASK) != 0 &&
24 (key == "1" || key == "2")) {
25 change_view_mode (key);

Subscribers

People subscribed via source and target branches