GDK W32: Cache multiple keyboard layouts simultaneously
This changes the group/level semantic. Previously W32 backend used "group 0/1" to denote "AltGr OFF/ON" and "level 0/1" to denote "Shift is OFF/ON". Now "group" means "keyboard layout" and there can be up to 255 groups, while AltGr and Shift are combined into a single level enum that takes values between 0 and 4. Unlike X, W32 doesn't do effective group overriding, meaning that it will never tell the caller that a different group was actually used (even for universal keys, such as Enter), because key symbol table is completely fabricated and there's no point in trying to save a few of kilobytes of RAM by not duplicating universal key records for all groups. Also contains many whitespace changes (tab elimination, fixed indentation) and cleanup (axed a few global variables, these are now accessed via the default keymap). https://bugzilla.gnome.org/show_bug.cgi?id=768722
This commit is contained in:
@ -89,6 +89,7 @@ _gdk_win32_windowing_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);
|
||||
_gdk_input_locale_is_ime = ImmIsIME (_gdk_input_locale);
|
||||
GetLocaleInfo (MAKELCID (LOWORD (_gdk_input_locale), SORT_DEFAULT),
|
||||
LOCALE_IDEFAULTANSICODEPAGE,
|
||||
|
||||
Reference in New Issue
Block a user