From 0037d7c0115c8524f20c823a3d9116028bfdb654 Mon Sep 17 00:00:00 2001 From: Palana Date: Sat, 6 Jun 2015 21:07:37 +0200 Subject: [PATCH] libobs: Ignore OSX keyboard layout notifications w/o layout change These notifications can happen with e.g. the Japanese Kotoeri layout when switching between active windows --- libobs/obs-cocoa.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libobs/obs-cocoa.c b/libobs/obs-cocoa.c index 975100594..25a328bae 100644 --- a/libobs/obs-cocoa.c +++ b/libobs/obs-cocoa.c @@ -1208,6 +1208,14 @@ static void input_method_changed(CFNotificationCenterRef nc, void *observer, pthread_mutex_lock(&hotkeys->mutex); plat = hotkeys->platform_context; + + if (new_plat && plat && + new_plat->layout_data == plat->layout_data) { + pthread_mutex_unlock(&hotkeys->mutex); + hotkeys_release(new_plat); + return; + } + hotkeys->platform_context = new_plat; if (new_plat) log_layout_name(new_plat->tis);