代码拉取完成,页面将自动刷新
From 4156ea6bbf3252fd111f6a2f5a0e87ac97171c93 Mon Sep 17 00:00:00 2001
From: yangfeng <yangfeng@kylinsec.com.cn>
Date: Tue, 23 Jul 2024 17:20:17 +0800
Subject: [PATCH 20/22] fix(media-keys-action):The shutdown shortcut cannot be
found
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复关机快捷键找不到
Related #44337
---
.../media-keys/media-keys-action.cpp | 25 ++++++++-----------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/plugins/keybinding/media-keys/media-keys-action.cpp b/plugins/keybinding/media-keys/media-keys-action.cpp
index 31552d5..864f8dc 100644
--- a/plugins/keybinding/media-keys/media-keys-action.cpp
+++ b/plugins/keybinding/media-keys/media-keys-action.cpp
@@ -1,14 +1,14 @@
/**
- * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd.
+ * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd.
* kiran-cc-daemon is licensed under Mulan PSL v2.
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
- * http://license.coscl.org.cn/MulanPSL2
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
- * See the Mulan PSL v2 for more details.
- *
+ * http://license.coscl.org.cn/MulanPSL2
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ * See the Mulan PSL v2 for more details.
+ *
* Author: meizhigang <meizhigang@kylinsec.com.cn>
*/
#include "plugins/keybinding/media-keys/media-keys-action.h"
@@ -68,8 +68,7 @@ void MediaKeysAction::init_touchpad()
if (device_helper->is_touchpad())
{
this->has_touchpad_ = true;
- }
- });
+ } });
}
bool MediaKeysAction::do_action(XEvent *xev, std::string name)
@@ -208,10 +207,9 @@ void MediaKeysAction::do_touchpad_osd(bool state)
void MediaKeysAction::do_shutdown()
{
- std::string cmdline = std::string("mate-session-save --shutdown-dialog");
-
try
{
+ std::string cmdline = "kiran-session-quit --power-off";
Glib::spawn_command_line_async(cmdline);
}
catch (const Glib::Error &e)
@@ -222,10 +220,9 @@ void MediaKeysAction::do_shutdown()
void MediaKeysAction::do_logout()
{
- std::string cmdline = std::string("mate-session-save --logout-dialog");
-
try
{
+ std::string cmdline = "kiran-session-quit --logout";
Glib::spawn_command_line_async(cmdline);
}
catch (const Glib::Error &e)
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。