fix(media-keys):Fix grap keys while set capital letters
-兼容快捷键设置的大写字母 Related #I7C0TD
This commit is contained in:
parent
ffed115903
commit
6552305ae2
@ -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
|
||||
Version: %{branch}.0
|
||||
%if 0%{?rel_build}
|
||||
Release: 6
|
||||
Release: 7
|
||||
%else
|
||||
Release: 0.9%{?git_rel}
|
||||
Release: 0.10%{?git_rel}
|
||||
%endif
|
||||
Summary: MATE Desktop settings daemon
|
||||
License: GPLv2+
|
||||
@ -42,6 +42,7 @@ Patch1003: 0001-fix-plugin-keyboard-not-show-the-xkb-status-icon-2613d058.p
|
||||
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
|
||||
Patch1006: 0001-feature-backends-Compatible-wayland-framework-which-.patch
|
||||
Patch1007: 0001-fix-media-keys-Fix-grap-keys-while-set-capital-lette.patch
|
||||
|
||||
BuildRequires: dbus-glib-devel
|
||||
BuildRequires: dconf-devel
|
||||
@ -139,6 +140,9 @@ desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/mate-settings-dae
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 09 2023 meizhigang <meizhigang@kylinsec.com.cn> - 1.22.0-7
|
||||
- KYOS-B: Fix grap keys while set capital letters (#I7C0TD)
|
||||
|
||||
* Tue Feb 07 2023 tangjie02 <tangjie02@kylinsec.com.cn> - 1.22.0-6
|
||||
- Compatible wayland framework which exists xwayland.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user