From 3ccdd30a9a3c44d167e0c87e02ae5d7636e3a7e8 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Sun, 27 Sep 2020 10:43:49 +0800 Subject: [PATCH] Fixes Shift key switch issue --- ibus-libpinyin-1.12.x-head.patch | 23 +++++++++++++++++++++++ ibus-libpinyin.spec | 7 +++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ibus-libpinyin-1.12.x-head.patch b/ibus-libpinyin-1.12.x-head.patch index e69de29..d590e89 100644 --- a/ibus-libpinyin-1.12.x-head.patch +++ b/ibus-libpinyin-1.12.x-head.patch @@ -0,0 +1,23 @@ +commit 2ee257c73388df89b4f5966c882d8047a896f9b2 +Author: Peng Wu +Date: Fri Aug 28 11:30:31 2020 +0800 + + restore mainSwitch shortcut key + +diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc +index dcd2e3f..295adc5 100644 +--- a/src/PYPPinyinEngine.cc ++++ b/src/PYPPinyinEngine.cc +@@ -166,8 +166,10 @@ PinyinEngine::processAccelKeyEvent (guint keyval, guint keycode, + * and no other key event between the press and release key event */ + gboolean triggered = FALSE; + +- if (PinyinConfig::instance ().mainSwitch () == accel) { +- triggered = TRUE; ++ if (m_prev_pressed_key == keyval) { ++ if (PinyinConfig::instance ().mainSwitch () == accel) { ++ triggered = TRUE; ++ } + } + + if (triggered) { diff --git a/ibus-libpinyin.spec b/ibus-libpinyin.spec index fb584d5..8497613 100644 --- a/ibus-libpinyin.spec +++ b/ibus-libpinyin.spec @@ -1,8 +1,8 @@ -%global snapshot 0 +%global snapshot 1 Name: ibus-libpinyin Version: 1.11.93 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Intelligent Pinyin engine based on libpinyin for IBus License: GPLv3+ URL: https://github.com/libpinyin/ibus-libpinyin @@ -88,6 +88,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-libbopo %{_datadir}/ibus/component/* %changelog +* Sun Sep 27 2020 Peng Wu - 1.11.93-2 +- Fixes Shift key switch issue + * Wed Aug 26 2020 Peng Wu - 1.11.93-1 - Update to 1.11.93 - switch to use GPLv3+ license