GdkWin32: Remove _gdk_input_codepage variable

It's unused
This commit is contained in:
Luca Bacci 2022-01-14 15:09:48 +01:00
parent 8bbf48eb64
commit 4916ebd05e
No known key found for this signature in database
GPG Key ID: 8E3C8D989C98883D
4 changed files with 9 additions and 17 deletions

View File

@ -1830,22 +1830,18 @@ gdk_event_translate (MSG *msg,
{
GdkWin32Keymap *win32_keymap;
GdkTranslatedKey translated;
char buf[256];
win32_keymap = GDK_WIN32_KEYMAP (_gdk_win32_display_get_keymap (_gdk_display));
_gdk_input_locale = (HKL) msg->lParam;
_gdk_win32_keymap_set_active_layout (win32_keymap, _gdk_input_locale);
GetLocaleInfo (MAKELCID (LOWORD (_gdk_input_locale), SORT_DEFAULT),
LOCALE_IDEFAULTANSICODEPAGE, buf, sizeof (buf));
_gdk_input_codepage = atoi (buf);
_gdk_keymap_serial++;
GDK_NOTE (EVENTS,
g_print (" cs:%lu hkl:%p%s cp:%d",
g_print (" cs:%lu hkl:%p%s",
(gulong) msg->wParam,
(gpointer) msg->lParam,
_gdk_input_locale_is_ime ? " (IME)" : "",
_gdk_input_codepage));
_gdk_input_locale_is_ime ? " (IME)" : ""));
gdk_display_setting_changed (display, "gtk-im-module");
/* Generate a dummy key event to "nudge" IMContext */

View File

@ -38,7 +38,6 @@ int _gdk_input_ignore_core;
HKL _gdk_input_locale;
gboolean _gdk_input_locale_is_ime = FALSE;
UINT _gdk_input_codepage;
GdkWin32ModalOpKind _modal_operation_in_progress = GDK_WIN32_MODAL_OP_NONE;
HWND _modal_move_resize_window = NULL;

View File

@ -52,7 +52,9 @@ static gboolean gdk_synchronize = FALSE;
void
_gdk_win32_surfaceing_init (void)
{
char buf[10];
GdkWin32Keymap *win32_keymap;
win32_keymap = GDK_WIN32_KEYMAP (_gdk_win32_display_get_keymap (_gdk_display));
if (gdk_synchronize)
GdiSetBatchLimit (1);
@ -60,13 +62,9 @@ _gdk_win32_surfaceing_init (void)
_gdk_app_hmodule = GetModuleHandle (NULL);
_gdk_display_hdc = CreateDC ("DISPLAY", NULL, NULL, NULL);
_gdk_input_locale = GetKeyboardLayout (0);
_gdk_win32_keymap_set_active_layout (GDK_WIN32_KEYMAP (_gdk_win32_display_get_keymap (_gdk_display)), _gdk_input_locale);
GetLocaleInfo (MAKELCID (LOWORD (_gdk_input_locale), SORT_DEFAULT),
LOCALE_IDEFAULTANSICODEPAGE,
buf, sizeof (buf));
_gdk_input_codepage = atoi (buf);
GDK_NOTE (EVENTS, g_print ("input_locale:%p, codepage:%d\n",
_gdk_input_locale, _gdk_input_codepage));
_gdk_win32_keymap_set_active_layout (win32_keymap, _gdk_input_locale);
GDK_NOTE (EVENTS, g_print ("input_locale: %p\n", _gdk_input_locale));
_gdk_win32_clipdrop_init ();
}

View File

@ -269,7 +269,6 @@ extern int _gdk_input_ignore_core;
*/
extern HKL _gdk_input_locale;
extern gboolean _gdk_input_locale_is_ime;
extern UINT _gdk_input_codepage;
extern guint _gdk_keymap_serial;