ibus-anthy/ibus-anthy-HEAD.patch

102 lines
3.7 KiB
Diff
Raw Normal View History

2024-03-12 10:21:56 +00:00
From 9ae92d7b8085e869d37a068a1a94815c78de6110 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 12 Mar 2024 18:25:39 +0900
Subject: [PATCH] engine: Ignore Super modifier key
Super-l is a shortcut key to launch a lock screen in GNOME desktop
session and now it can be sent to the engine prior to the window
manager.
---
engine/python2/engine.py | 6 ++++--
engine/python3/engine.py | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/engine/python2/engine.py b/engine/python2/engine.py
index 42d4dc1..c7ccd3f 100644
--- a/engine/python2/engine.py
+++ b/engine/python2/engine.py
@@ -4,7 +4,7 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2010-2024 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -1976,7 +1976,9 @@ class Engine(IBus.EngineSimple):
state & hex_mod_mask == hex_mod_mask:
return True
- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK):
+ if state & (IBus.ModifierType.CONTROL_MASK | \
+ IBus.ModifierType.MOD1_MASK | \
+ IBus.ModifierType.MOD4_MASK):
return False
if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or
diff --git a/engine/python3/engine.py b/engine/python3/engine.py
index 4b50a01..0858614 100644
--- a/engine/python3/engine.py
+++ b/engine/python3/engine.py
@@ -4,7 +4,7 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2010-2024 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -1971,7 +1971,9 @@ class Engine(IBus.EngineSimple):
state & hex_mod_mask == hex_mod_mask:
return True
- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK):
+ if state & (IBus.ModifierType.CONTROL_MASK | \
+ IBus.ModifierType.MOD1_MASK | \
+ IBus.ModifierType.MOD4_MASK):
return False
if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or
--
2.43.0
2024-05-12 04:24:22 +00:00
From c89a60350b2a949306bf75d64e06a0cde3a7846c Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Sun, 12 May 2024 13:01:50 +0900
Subject: [PATCH] tests: Fix CI freeze
Seems infinit calling g_resources_register_unlocked() happens
in register_lazy_static_resources_unlocked() from
g_resources_lookup_data() when ibus_init() is called after
gtk_init() or gdk_display_open() is called.
It's good to delete ibus_init() here since IBus GTK IM module already
calls it.
---
tests/anthytest.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/anthytest.py b/tests/anthytest.py
index 1d18d19..cf2d6bc 100755
--- a/tests/anthytest.py
+++ b/tests/anthytest.py
@@ -77,7 +77,13 @@ class AnthyTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
- IBus.init()
+ # Already called in ibus/client/gtk3/ibusim.c:im_module_init().
+ # Otherwise infinit g_resources_register_unlocked() happens in
+ # register_lazy_static_resources_unlocked()
+ # from g_resources_lookup_data()
+ # or IBus.init() could be called before Gdk.Display.open('') is called.
+ #IBus.init()
+ pass
def setUp(self):
self.__id = 0
--
2.45.0