Skip to content

Commit

Permalink
Merge branch 'win32-runtime-immodule-swap-gtk4' into 'master'
Browse files Browse the repository at this point in the history
GDK W32: Support switching IM contexts at runtime (GTK4)

See merge request GNOME/gtk!372
  • Loading branch information
LRN committed Oct 7, 2018
2 parents 8e2fb9c + 66c0336 commit 10fef2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions gdk/win32/gdkevents-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,7 @@ gdk_event_translate (MSG *msg,
(gulong) msg->wParam,
(gpointer) msg->lParam, _gdk_input_locale_is_ime ? " (IME)" : "",
_gdk_input_codepage));
gdk_display_setting_changed (display, "gtk-im-module");
break;

case WM_SYSKEYUP:
Expand Down
9 changes: 9 additions & 0 deletions gdk/win32/gdkproperty-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ _gdk_win32_get_setting (const gchar *name,
}
}
}
else if (strcmp ("gtk-im-module", name) == 0)
{
if (_gdk_input_locale_is_ime)
g_value_set_string (value, "ime");
else
g_value_set_string (value, "");

return TRUE;
}

return FALSE;
}

0 comments on commit 10fef2f

Please sign in to comment.