winemac: Update the keyboard layout data immediately after changing the input source.
It would eventually get updated by the keyboard changed event, but only after the message queue was pumped. Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bce972b156
commit
c3dbe44347
|
@ -2426,7 +2426,8 @@ void macdrv_get_input_source_info(CFDataRef* uchr, CGEventSourceKeyboardType* ke
|
|||
|
||||
*keyboard_type = [WineApplicationController sharedController].keyboardType;
|
||||
*is_iso = (KBGetLayoutType(*keyboard_type) == kKeyboardISO);
|
||||
*input_source = TISCopyCurrentKeyboardInputSource();
|
||||
if (input_source)
|
||||
*input_source = TISCopyCurrentKeyboardInputSource();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1186,7 +1186,15 @@ HKL CDECL macdrv_ActivateKeyboardLayout(HKL hkl, UINT flags)
|
|||
if (macdrv_select_input_source(layout->input_source))
|
||||
{
|
||||
oldHkl = thread_data->active_keyboard_layout;
|
||||
if (thread_data->keyboard_layout_uchr)
|
||||
CFRelease(thread_data->keyboard_layout_uchr);
|
||||
|
||||
macdrv_get_input_source_info(&thread_data->keyboard_layout_uchr, &thread_data->keyboard_type,
|
||||
&thread_data->iso_keyboard, NULL);
|
||||
thread_data->active_keyboard_layout = hkl;
|
||||
thread_data->dead_key_state = 0;
|
||||
|
||||
macdrv_compute_keyboard_layout(thread_data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue