Skip to content

Commit

Permalink
Remove always-on popup toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
tadeokondrak committed Mar 23, 2021
1 parent fcd73e0 commit 8392170
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ https://github.com/swaywm/sway/pull/5890

Currently hard-coded key bindings:

Ctrl+Henkan_Mode: Enable input method with always-on-popup
Henkan_Mode: Enable input method
Muhenkan: Disable input methbod

Expand Down
13 changes: 0 additions & 13 deletions anthywl.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,10 @@ static bool anthywl_seat_composing_handle_key_event(
struct anthywl_seat *seat, xkb_keycode_t keycode)
{
xkb_keysym_t keysym = xkb_state_key_get_one_sym(seat->xkb_state, keycode);
bool ctrl_active = xkb_state_mod_name_is_active(
seat->xkb_state, XKB_MOD_NAME_CTRL, XKB_STATE_EFFECTIVE);

switch (keysym) {
case XKB_KEY_Henkan_Mode:
if (!ctrl_active)
return false;
seat->is_composing_popup_visible = true;
anthywl_seat_composing_update(seat);
return true;
case XKB_KEY_Muhenkan:
seat->is_composing = false;
seat->is_composing_popup_visible = false;
anthywl_buffer_clear(&seat->buffer);
anthywl_seat_composing_update(seat);
return true;
Expand Down Expand Up @@ -792,9 +783,6 @@ static bool anthywl_seat_handle_key(struct anthywl_seat *seat,
return anthywl_seat_composing_handle_key_event(seat, keycode);
if (keysym == XKB_KEY_Henkan_Mode) {
seat->is_composing = true;
seat->is_composing_popup_visible =
xkb_state_mod_name_is_active(
seat->xkb_state, XKB_MOD_NAME_CTRL, XKB_STATE_EFFECTIVE);
return true;
}
return false;
Expand Down Expand Up @@ -1024,7 +1012,6 @@ static void zwp_input_method_v2_done(
seat->done_events_received++;
if (!was_active && seat->active) {
seat->is_selecting = false;
seat->is_composing_popup_visible = false;
seat->is_selecting_popup_visible = false;
anthywl_buffer_clear(&seat->buffer);
anthywl_seat_draw_popup(seat);
Expand Down

0 comments on commit 8392170

Please sign in to comment.