!12 Fix grap keys while set capital letters
From: @meizhigang Reviewed-by: @tangjie02 Signed-off-by: @tangjie02
This commit is contained in:
commit
8ee836eedc
@ -0,0 +1,63 @@
|
|||||||
|
From 7e74e79da8ef92e1800fc451ac0b9bc5aaada184 Mon Sep 17 00:00:00 2001
|
||||||
|
From: meizhigang <meizhigang@kylinsec.com.cn>
|
||||||
|
Date: Fri, 9 Jun 2023 15:19:34 +0800
|
||||||
|
Subject: [PATCH] fix(media-keys):Fix grap keys while set capital letters
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
-兼容快捷键设置的大写字母
|
||||||
|
|
||||||
|
Related #I7C0TD
|
||||||
|
|
||||||
|
Signed-off-by: meizhigang <meizhigang@kylinsec.com.cn>
|
||||||
|
---
|
||||||
|
plugins/common/eggaccelerators.c | 25 ++++++++++++++++++++++++-
|
||||||
|
1 file changed, 24 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/common/eggaccelerators.c b/plugins/common/eggaccelerators.c
|
||||||
|
index 9662a3f..2099eca 100644
|
||||||
|
--- a/plugins/common/eggaccelerators.c
|
||||||
|
+++ b/plugins/common/eggaccelerators.c
|
||||||
|
@@ -197,6 +197,22 @@ is_keycode (const gchar *string)
|
||||||
|
(string[1] == 'x'));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static guint
|
||||||
|
+get_single_letter_keyval(gchar ch)
|
||||||
|
+{
|
||||||
|
+ gchar str[2] = {0};
|
||||||
|
+ if (ch >= 'A' && ch <= 'Z')
|
||||||
|
+ {
|
||||||
|
+ snprintf(str, 2, "%c", tolower(ch));
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ snprintf(str, 2, "%c", ch);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return gdk_keyval_from_name (str);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* egg_accelerator_parse_virtual:
|
||||||
|
* @accelerator: string representing an accelerator
|
||||||
|
@@ -346,7 +362,14 @@ egg_accelerator_parse_virtual (const gchar *accelerator,
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- keyval = gdk_keyval_from_name (accelerator);
|
||||||
|
+ if (len == 1)
|
||||||
|
+ {
|
||||||
|
+ keyval = get_single_letter_keyval(*accelerator);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ keyval = gdk_keyval_from_name (accelerator);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (keyval == 0)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -15,9 +15,9 @@
|
|||||||
Name: mate-settings-daemon
|
Name: mate-settings-daemon
|
||||||
Version: %{branch}.0
|
Version: %{branch}.0
|
||||||
%if 0%{?rel_build}
|
%if 0%{?rel_build}
|
||||||
Release: 5
|
Release: 6
|
||||||
%else
|
%else
|
||||||
Release: 0.9%{?git_rel}
|
Release: 0.10%{?git_rel}
|
||||||
%endif
|
%endif
|
||||||
Summary: MATE Desktop settings daemon
|
Summary: MATE Desktop settings daemon
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -41,6 +41,7 @@ Patch1002: 0001-feature-touchpad-set-the-default-values-of-disable-w.patch
|
|||||||
Patch1003: 0001-fix-plugin-keyboard-not-show-the-xkb-status-icon-2613d058.patch
|
Patch1003: 0001-fix-plugin-keyboard-not-show-the-xkb-status-icon-2613d058.patch
|
||||||
Patch1004: 1004-fix-keybinding-add-some-media-key-translations-f605e267.patch
|
Patch1004: 1004-fix-keybinding-add-some-media-key-translations-f605e267.patch
|
||||||
Patch1005: 1005-fix-media-keys-add-the-case-of-kiran-screensaver-whi-cc8f2984.patch
|
Patch1005: 1005-fix-media-keys-add-the-case-of-kiran-screensaver-whi-cc8f2984.patch
|
||||||
|
Patch1006: 0001-fix-media-keys-Fix-grap-keys-while-set-capital-lette.patch
|
||||||
|
|
||||||
BuildRequires: dbus-glib-devel
|
BuildRequires: dbus-glib-devel
|
||||||
BuildRequires: dconf-devel
|
BuildRequires: dconf-devel
|
||||||
@ -138,6 +139,9 @@ desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/mate-settings-dae
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 09 2023 meizhigang <meizhigang@kylinsec.com.cn> - 1.22.0-6
|
||||||
|
- KYOS-B: Fix grap keys while set capital letters (#I7C0TD)
|
||||||
|
|
||||||
* Fri Jul 08 2022 longcheng <longcheng@kylinos.com.cn> - 1.22.0-5
|
* Fri Jul 08 2022 longcheng <longcheng@kylinos.com.cn> - 1.22.0-5
|
||||||
- Always use preferred size for Virtual screens or when auto configure monitors Related #24217 #24260
|
- Always use preferred size for Virtual screens or when auto configure monitors Related #24217 #24260
|
||||||
- add the window scale changed tip with notify. (#25310)
|
- add the window scale changed tip with notify. (#25310)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user