diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2021-12-02 23:53:28 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2021-12-02 23:53:28 +0900 |
commit | 104148bcdada1f8f22ef905c930f9944f3e99a63 (patch) | |
tree | 461db86bb58e0ae1138de6f171f803903da45017 | |
parent | 2bc47f09832073c87ccdf1060bd93ff95878685a (diff) | |
download | ibus-104148bcdada1f8f22ef905c930f9944f3e99a63.tar.gz |
src: Disable emoji shortcut key with no-emoji hint
BUG=https://gitlab.gnome.org/GNOME/gtk/-/issues/4337
-rw-r--r-- | src/ibusengine.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ibusengine.c b/src/ibusengine.c index 9aeafbf9..7e844838 100644 --- a/src/ibusengine.c +++ b/src/ibusengine.c @@ -2,8 +2,8 @@ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com> - * Copyright (C) 2018-2019 Takao Fujiwara <takao.fujiwara1@gmail.com> - * Copyright (C) 2008-2019 Red Hat, Inc. + * Copyright (C) 2018-2021 Takao Fujiwara <takao.fujiwara1@gmail.com> + * Copyright (C) 2008-2021 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -954,6 +954,10 @@ ibus_engine_filter_key_event (IBusEngine *engine, return FALSE; for (n = names; n; n = n->next) { const gchar *name = (const gchar *)n->data; + if (!g_strcmp0 (name, "emoji") && + (engine->priv->content_hints & IBUS_INPUT_HINT_NO_EMOJI)) { + continue; + } keys = g_hash_table_lookup (priv->extension_keybindings, name); for (; keys; keys++) { if (keys->keyval == 0 && keys->keycode == 0 && keys->state == 0) |