Skip to content

Commit

Permalink
client/gtk2: Fix a build failure with GDK_MODIFIER_INTENT_NO_TEXT_INPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwarat committed Sep 7, 2017
1 parent bbfb3d7 commit d784e04
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions client/gtk2/ibusimcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,21 @@ ibus_im_context_commit_event (IBusIMContext *ibusimcontext,
for (i = 0; i < G_N_ELEMENTS (IBUS_COMPOSE_IGNORE_KEYLIST); i++)
if (event->keyval == IBUS_COMPOSE_IGNORE_KEYLIST[i])
return FALSE;
#if GTK_CHECK_VERSION (3, 4, 0)
no_text_input_mask = gdk_keymap_get_modifier_mask (
gdk_keymap_get_for_display (gdk_display_get_default ()),
GDK_MODIFIER_INTENT_NO_TEXT_INPUT);
#else
# ifndef GDK_WINDOWING_QUARTZ
# define _IBUS_NO_TEXT_INPUT_MOD_MASK (GDK_MOD1_MASK | GDK_CONTROL_MASK)
# else
# define _IBUS_NO_TEXT_INPUT_MOD_MASK (GDK_MOD2_MASK | GDK_CONTROL_MASK)
# endif

no_text_input_mask = _IBUS_NO_TEXT_INPUT_MOD_MASK;

# undef _IBUS_NO_TEXT_INPUT_MOD_MASK
#endif
if (event->state & no_text_input_mask ||
event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_ISO_Enter ||
Expand Down

0 comments on commit d784e04

Please sign in to comment.