From e226c06c32c4626dd807ac86891546ee7f95bdc7 Mon Sep 17 00:00:00 2001 From: longcheng Date: Fri, 5 Aug 2022 15:34:05 +0800 Subject: [PATCH] Add some patchesAdd some patches --- ...ebar-and-font-and-composite-49944cb7.patch | 46 +++++ ...d-Alt-F1-to-popop-mate-menu-b638cc7c.patch | 25 +++ ...t-menu-when-press-super-key-bf212ac7.patch | 179 ++++++++++++++++++ ...d-kiran-flameshot-super-key-ce015032.patch | 40 ++++ marco.spec | 21 +- 5 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 0000-change-workspace-titlebar-and-font-and-composite-49944cb7.patch create mode 100644 0001-fix-disabled-Alt-F1-to-popop-mate-menu-b638cc7c.patch create mode 100644 0002-feature-menu-pop-up-start-menu-when-press-super-key-bf212ac7.patch create mode 100644 0003-add-kiran-flameshot-super-key-ce015032.patch diff --git a/0000-change-workspace-titlebar-and-font-and-composite-49944cb7.patch b/0000-change-workspace-titlebar-and-font-and-composite-49944cb7.patch new file mode 100644 index 0000000..73e5a28 --- /dev/null +++ b/0000-change-workspace-titlebar-and-font-and-composite-49944cb7.patch @@ -0,0 +1,46 @@ +From 49944cb7e9cda0a56e4e0c367e73d025b1e20983 Mon Sep 17 00:00:00 2001 +From: longcheng +Date: Thu, 24 Mar 2022 18:53:11 +0800 +Subject: [PATCH 0/5] change workspace titlebar and font and composite + +--- + configure | 2 +- + src/org.mate.marco.gschema.xml | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index f89f5be..3135a6e 100755 +--- a/configure ++++ b/configure +@@ -14897,7 +14897,7 @@ fi + if test x$have_xcomposite = xyes; then + MARCO_PC_MODULES="$MARCO_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage" + +-$as_echo "#define HAVE_COMPOSITE_EXTENSIONS 1" >>confdefs.h ++$as_echo "#define HAVE_COMPOSITE_EXTENSIONS 0" >>confdefs.h + + echo "Building with compositing manager" + +diff --git a/src/org.mate.marco.gschema.xml b/src/org.mate.marco.gschema.xml +index 6632e6b..afd64b8 100644 +--- a/src/org.mate.marco.gschema.xml ++++ b/src/org.mate.marco.gschema.xml +@@ -116,13 +116,13 @@ + If true, ignore the titlebar_font option, and use the standard application font for window titles. + + +- 'Sans Bold 10' ++ 'Noto Sans CJK SC Regular 9' + Window title font + A font description string describing a font for window titlebars. The size from the description will only be used if the titlebar_font_size option is set to 0. Also, this option is disabled if the titlebar_uses_desktop_font option is set to true. + + + +- 4 ++ 2 + Number of workspaces + Number of workspaces. Must be more than zero, and has a fixed maximum to prevent making the desktop unusable by accidentally asking for too many workspaces. + +-- +2.27.0 + diff --git a/0001-fix-disabled-Alt-F1-to-popop-mate-menu-b638cc7c.patch b/0001-fix-disabled-Alt-F1-to-popop-mate-menu-b638cc7c.patch new file mode 100644 index 0000000..f849f19 --- /dev/null +++ b/0001-fix-disabled-Alt-F1-to-popop-mate-menu-b638cc7c.patch @@ -0,0 +1,25 @@ +From b638cc7c8bb7cfb9d61ae85e3ad00b3cfd1ec884 Mon Sep 17 00:00:00 2001 +From: longcheng +Date: Thu, 24 Mar 2022 18:54:48 +0800 +Subject: [PATCH 1/5] fix: disabled Alt+F1 to popop mate menu + +--- + src/org.mate.marco.gschema.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/org.mate.marco.gschema.xml b/src/org.mate.marco.gschema.xml +index afd64b8..94f63b4 100644 +--- a/src/org.mate.marco.gschema.xml ++++ b/src/org.mate.marco.gschema.xml +@@ -603,7 +603,7 @@ + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + +- '<Alt>F1' ++ 'disabled' + Show the panel's main menu + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + +-- +2.27.0 + diff --git a/0002-feature-menu-pop-up-start-menu-when-press-super-key-bf212ac7.patch b/0002-feature-menu-pop-up-start-menu-when-press-super-key-bf212ac7.patch new file mode 100644 index 0000000..3cde2a9 --- /dev/null +++ b/0002-feature-menu-pop-up-start-menu-when-press-super-key-bf212ac7.patch @@ -0,0 +1,179 @@ +From bf212ac737d114d639457802ce8b1363a465c7a3 Mon Sep 17 00:00:00 2001 +From: longcheng +Date: Thu, 24 Mar 2022 18:58:13 +0800 +Subject: [PATCH 2/5] feature[menu] : pop up start menu when press super key + +--- + po/zh_CN.po | 3 +++ + src/50-marco-desktop-key.xml.in | 2 ++ + src/core/atomnames.h | 1 + + src/core/keybindings.c | 48 +++++++++++++++++++++++++++++++++ + src/include/all-keybindings.h | 2 ++ + src/include/prefs.h | 3 ++- + src/org.mate.marco.gschema.xml | 5 ++++ + src/ui/ui.c | 8 ++++++ + 8 files changed, 71 insertions(+), 1 deletion(-) + +diff --git a/po/zh_CN.po b/po/zh_CN.po +index ad1d1eb..4399cda 100644 +--- a/po/zh_CN.po ++++ b/po/zh_CN.po +@@ -42,6 +42,9 @@ msgstr "显示面板的“运行应用程序”对话框" + msgid "Show the panel's main menu" + msgstr "显示面板主菜单" + ++msgid "Show the panel's main menu of kiran" ++msgstr "显示开始菜单" ++ + #: ../src/50-marco-desktop-key.xml.in.h:4 + #: ../src/org.mate.marco.gschema.xml.h:101 + msgid "Take a screenshot" +diff --git a/src/50-marco-desktop-key.xml.in b/src/50-marco-desktop-key.xml.in +index 219109e..1719291 100644 +--- a/src/50-marco-desktop-key.xml.in ++++ b/src/50-marco-desktop-key.xml.in +@@ -5,6 +5,8 @@ + + + ++ ++ + + + +diff --git a/src/core/atomnames.h b/src/core/atomnames.h +index 3744f42..48582aa 100644 +--- a/src/core/atomnames.h ++++ b/src/core/atomnames.h +@@ -64,6 +64,7 @@ item(_GTK_SHOW_WINDOW_MENU) + item(_MATE_PANEL_ACTION) + item(_MATE_PANEL_ACTION_MAIN_MENU) + item(_MATE_PANEL_ACTION_RUN_DIALOG) ++item(_MATE_PANEL_ACTION_KIRAN_MENU) + item(_MARCO_SENTINEL) + item(_MARCO_VERSION) + item(WM_CLIENT_MACHINE) +diff --git a/src/core/keybindings.c b/src/core/keybindings.c +index 83ff985..542c89f 100644 +--- a/src/core/keybindings.c ++++ b/src/core/keybindings.c +@@ -2917,6 +2917,54 @@ handle_panel (MetaDisplay *display, + meta_error_trap_pop (display, FALSE); + } + ++static void ++handle_kiran_panel (MetaDisplay *display, ++ MetaScreen *screen, ++ MetaWindow *window, ++ XEvent *event, ++ MetaKeyBinding *binding) ++ { ++ /*MetaKeyBindingAction action = binding->handler->data;*/ ++ MetaKeyBindingAction action = META_KEYBINDING_ACTION_KIRAN_PANEL_MENU; ++ Atom action_atom; ++ XClientMessageEvent ev; ++ ++ action_atom = None; ++ switch (action) ++ { ++ /* FIXME: The numbers are wrong */ ++ case META_KEYBINDING_ACTION_KIRAN_PANEL_MENU: ++ action_atom = display->atom__MATE_PANEL_ACTION_KIRAN_MENU; ++ break; ++ default: ++ return; ++ } ++ ++ ev.type = ClientMessage; ++ ev.window = screen->xroot; ++ ev.message_type = display->atom__MATE_PANEL_ACTION; ++ ev.format = 32; ++ ev.data.l[0] = action_atom; ++ ev.data.l[1] = event->xkey.time; ++ ++ meta_topic (META_DEBUG_KEYBINDINGS, ++ "Sending panel message with timestamp %lu, and turning mouse_mode " ++ "off due to keybinding press\n", event->xkey.time); ++ display->mouse_mode = FALSE; ++ ++ meta_error_trap_push (display); ++ ++ /* Release the grab for the panel before sending the event */ ++ XUngrabKeyboard (display->xdisplay, event->xkey.time); ++ XSendEvent (display->xdisplay, ++ screen->xroot, ++ False, ++ StructureNotifyMask, ++ (XEvent*) &ev); ++ ++ meta_error_trap_pop (display, FALSE); ++} ++ + static void + handle_activate_window_menu (MetaDisplay *display, + MetaScreen *screen, +diff --git a/src/include/all-keybindings.h b/src/include/all-keybindings.h +index cba8e9f..a7ade33 100644 +--- a/src/include/all-keybindings.h ++++ b/src/include/all-keybindings.h +@@ -154,6 +154,8 @@ keybind (show-desktop, handle_show_desktop, 0, 0) + keybind (panel-main-menu, handle_panel, META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0) + keybind (panel-run-dialog, handle_panel, META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0) + ++keybind (panel-kiran-menu, handle_kiran_panel, META_KEYBINDING_ACTION_KIRAN_PANEL_MENU, 0) ++ + /* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing + * at some point.) The description is NULL here because the stanza is + * irregularly shaped in marco.schemas.in. This will probably be fixed +diff --git a/src/include/prefs.h b/src/include/prefs.h +index 34ab802..eda0693 100644 +--- a/src/include/prefs.h ++++ b/src/include/prefs.h +@@ -205,7 +205,8 @@ typedef enum _MetaKeyBindingAction + META_KEYBINDING_ACTION_COMMAND_9, + META_KEYBINDING_ACTION_COMMAND_10, + META_KEYBINDING_ACTION_COMMAND_11, +- META_KEYBINDING_ACTION_COMMAND_12 ++ META_KEYBINDING_ACTION_COMMAND_12, ++ META_KEYBINDING_ACTION_KIRAN_PANEL_MENU + } MetaKeyBindingAction; + + typedef struct +diff --git a/src/org.mate.marco.gschema.xml b/src/org.mate.marco.gschema.xml +index 94f63b4..5716af3 100644 +--- a/src/org.mate.marco.gschema.xml ++++ b/src/org.mate.marco.gschema.xml +@@ -607,6 +607,11 @@ + Show the panel's main menu + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + ++ ++ '<Super>' ++ Show the panel's main menu of kiran ++ The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. ++ + + '<Alt>F2' + Show the panel's "Run Application" dialog box +diff --git a/src/ui/ui.c b/src/ui/ui.c +index ed2c577..ddfa9bc 100644 +--- a/src/ui/ui.c ++++ b/src/ui/ui.c +@@ -772,6 +772,14 @@ meta_ui_parse_accelerator (const char *accel, + return TRUE; + + meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask); ++ if(gdk_mask & GDK_SUPER_MASK) ++ { ++ unsigned char super_L_keycode=0; ++ Display *display = XOpenDisplay(NULL); ++ super_L_keycode = XKeysymToKeycode(display , XK_Super_L); ++ gdk_code = super_L_keycode; ++ gdk_mask = 0; ++ } + if (gdk_mask == 0 && gdk_sym == 0 && gdk_code == 0) + return FALSE; + +-- +2.27.0 + diff --git a/0003-add-kiran-flameshot-super-key-ce015032.patch b/0003-add-kiran-flameshot-super-key-ce015032.patch new file mode 100644 index 0000000..6bbe0df --- /dev/null +++ b/0003-add-kiran-flameshot-super-key-ce015032.patch @@ -0,0 +1,40 @@ +From ce01503237138704e94b9f51be135675f841c3fd Mon Sep 17 00:00:00 2001 +From: longcheng +Date: Thu, 24 Mar 2022 18:59:42 +0800 +Subject: [PATCH 3/5] add kiran-flameshot super key + +--- + src/org.mate.marco.gschema.xml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/org.mate.marco.gschema.xml b/src/org.mate.marco.gschema.xml +index 5716af3..57c286a 100644 +--- a/src/org.mate.marco.gschema.xml ++++ b/src/org.mate.marco.gschema.xml +@@ -618,7 +618,7 @@ + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + +- 'Print' ++ '<Control><Alt>A' + Take a screenshot + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + +@@ -701,12 +701,12 @@ + The /apps/marco/global_keybindings/run_command_N keys define keybindings that correspond to these commands. Pressing the keybinding for run_command_N will execute command_N. + + +- 'mate-screenshot' ++ 'kiran-flameshot gui' + The screenshot command + The /apps/marco/global_keybindings/run_command_screenshot key defines a keybinding which causes the command specified by this setting to be invoked. + + +- 'mate-screenshot --window' ++ 'kiranflameshot screen' + The window screenshot command + The /apps/marco/global_keybindings/run_command_window_screenshot key defines a keybinding which causes the command specified by this setting to be invoked. + +-- +2.27.0 + diff --git a/marco.spec b/marco.spec index 1ccfac4..b0ddf2b 100644 --- a/marco.spec +++ b/marco.spec @@ -15,9 +15,9 @@ Name: marco Version: %{branch}.3 %if 0%{?rel_build} -Release: 1%{?dist} +Release: 4 %else -Release: 0.11%{?git_rel}%{?dist} +Release: 0.12%{?git_rel} %endif Summary: MATE Desktop window manager License: LGPLv2+ and GPLv2+ @@ -29,6 +29,11 @@ URL: http://mate-desktop.org # Source for snapshot-builds. %{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}} +Patch0: 0000-change-workspace-titlebar-and-font-and-composite-49944cb7.patch +Patch1: 0001-fix-disabled-Alt-F1-to-popop-mate-menu-b638cc7c.patch +Patch2: 0002-feature-menu-pop-up-start-menu-when-press-super-key-bf212ac7.patch +Patch3: 0003-add-kiran-flameshot-super-key-ce015032.patch + BuildRequires: desktop-file-utils BuildRequires: gtk3-devel BuildRequires: libcanberra-devel @@ -145,6 +150,18 @@ desktop-file-install \ %changelog +* Wed Jul 06 2022 longcheng - 1.22.3-4 +- KYOS-F: changed number of workspace to 2; set marco compositor to 0; changed title-bar font to 'Noto Sans CJK SC Regular' +- KYOS-F: fix: disabled Alt+F1 to popop mate menu Related #28275 +- KYOS-F: pop up start menu when press super key, Related #28467 +- KYOS-F: Change the mate-screenshot shortcut key to kiran-flameshot shortcut key, Related #29575 + +* Thu Mar 24 2022 caodongxia - 1.22.3-3 +- restore else branch release + +* Mon Dec 13 2021 liweigang - 1.22.3-2 +- delete %dist + * Thu Sep 19 2019 Wolfgang Ulbrich - 1.22.3-1 - update 1.22.3 release -- Gitee