Commit c3dbe443 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

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: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bce972b1
......@@ -2426,6 +2426,7 @@ void macdrv_get_input_source_info(CFDataRef* uchr, CGEventSourceKeyboardType* ke
*keyboard_type = [WineApplicationController sharedController].keyboardType;
*is_iso = (KBGetLayoutType(*keyboard_type) == kKeyboardISO);
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment