diff --git a/0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch b/0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch new file mode 100644 index 0000000000000000000000000000000000000000..ab02857f081ddc03a256713976afc58e28c0d16e --- /dev/null +++ b/0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch @@ -0,0 +1,26 @@ +From 2195d2302d073b10a09f1c9c65c02a6bb3ff16fd Mon Sep 17 00:00:00 2001 +From: liweigang +Date: Thu, 23 Jun 2022 17:22:20 +0800 +Subject: [PATCH] fix: modify eulerServerEnduserAgreement_new path + +--- + src/frame/window/protocolfile.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/frame/window/protocolfile.cpp b/src/frame/window/protocolfile.cpp +index 5a03939..c1a5a39 100644 +--- a/src/frame/window/protocolfile.cpp ++++ b/src/frame/window/protocolfile.cpp +@@ -30,7 +30,7 @@ DCORE_USE_NAMESPACE + + const static QString serverEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Server-CN-%1.txt"; + const static QString serverEnduserAgreement_old = "/usr/share/deepin-deepinid-client/privacy/End-User-License-Agreement-Server/End-User-License-Agreement-Server-CN-%1.txt"; +-const static QString eulerServerEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Server-Euler-%1.txt"; ++const static QString eulerServerEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Server-CN-%1.txt"; + const static QString eulerServerEnduserAgreement_old = "/usr/share/deepin-deepinid-client/privacy/End-User-License-Agreement-Server/End-User-License-Agreement-Server-Euler-%1.txt"; + const static QString homeEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Home-CN-%1.txt"; + const static QString homeEnduserAgreement_old = "/usr/share/deepin-deepinid-client/privacy/End-User-License-Agreement-Home/End-User-License-Agreement-Home-CN-%1.txt"; + const static QString professionalEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Professional-CN-%1.txt"; +-- +2.20.1 + diff --git a/0001-feat-root.patch b/0001-feat-root.patch new file mode 100644 index 0000000000000000000000000000000000000000..2feb9d3e064774714e2a47b06c4a4ed0a1f7c7c3 --- /dev/null +++ b/0001-feat-root.patch @@ -0,0 +1,31 @@ +From 427b261b78aedd9f04f690e20e773bbc9fd60432 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Sun, 23 Apr 2023 10:14:14 +0800 +Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A7=E5=88=B6=E4=B8=AD=E5=BF=83roo?= + =?UTF-8?q?t=E7=94=A8=E6=88=B7=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9?= + =?UTF-8?q?=E5=85=B6=E4=BB=96=E7=94=A8=E6=88=B7=E7=9A=84=E5=AF=86=E7=A0=81?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + src/frame/modules/accounts/accountsworker.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/frame/modules/accounts/accountsworker.cpp b/src/frame/modules/accounts/accountsworker.cpp +index b57ad5d..a0654e1 100644 +--- a/src/frame/modules/accounts/accountsworker.cpp ++++ b/src/frame/modules/accounts/accountsworker.cpp +@@ -532,7 +532,8 @@ void AccountsWorker::deleteUserIcon(User *user, const QString &iconPath) + + void AccountsWorker::addUser(const QString &userPath) + { +- if (userPath.contains("User0", Qt::CaseInsensitive) || m_userModel->contains(userPath)) ++ //服务器版本需要root用户信息及相关流程 ++ if ((!IsServerSystem && userPath.contains("User0", Qt::CaseInsensitive)) || m_userModel->contains(userPath)) + return; + AccountsUser *userInter = new AccountsUser(AccountsService, userPath, QDBusConnection::systemBus(), this); + userInter->setSync(false); +-- +2.20.1 + diff --git a/0002-dde-control-center-delete-keyboard-wayland.patch b/0002-dde-control-center-delete-keyboard-wayland.patch new file mode 100644 index 0000000000000000000000000000000000000000..3a75bd49b630b23ffa82eb2e6808d4953378a002 --- /dev/null +++ b/0002-dde-control-center-delete-keyboard-wayland.patch @@ -0,0 +1,1461 @@ +From a582d95e0c13d758e36d6045198f42a567a270fb Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Thu, 29 Dec 2022 15:42:49 +0800 +Subject: [PATCH] delete keyboard wayland + +--- + src/frame/CMakeLists.txt | 17 +- + src/frame/modules/keyboard/customedit.cpp | 75 +----- + src/frame/modules/keyboard/customedit.h | 9 - + src/frame/modules/keyboard/keyboardwork.cpp | 8 +- + src/frame/modules/keyboard/keyboardwork.h | 1 - + .../modules/keyboard/shortcutcontent.cpp | 85 +----- + src/frame/modules/keyboard/shortcutcontent.h | 10 - + src/frame/modules/keyboard/shortcutitem.cpp | 1 - + src/frame/modules/keyboard/shortcutmodel.cpp | 33 +-- + src/frame/modules/keyboard/shortcutmodel.h | 1 - + .../authentication/biologicalbasedialog.h | 2 +- + .../authentication/faceiddetailwidget.cpp | 2 +- + .../window/modules/keyboard/customcontent.cpp | 73 ------ + .../window/modules/keyboard/customcontent.h | 7 - + .../modules/keyboard/keyboardmodule.cpp | 18 +- + .../keyboard/shortcutsettingwidget.cpp | 78 +----- + .../modules/keyboard/shortcutsettingwidget.h | 7 - + ...wayland-keyboard-grab-v1-client-protocol.h | 248 ------------------ + ...yland-xwayland-keyboard-grab-v1-protocol.c | 60 ----- + .../window/modules/keyboard/waylandgrab.cpp | 79 ------ + .../window/modules/keyboard/waylandgrab.h | 45 ---- + src/frame/window/utils.h | 12 - + tests/dde-control-center/CMakeLists.txt | 12 +- + 23 files changed, 19 insertions(+), 864 deletions(-) + delete mode 100644 src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-client-protocol.h + delete mode 100644 src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-protocol.c + delete mode 100644 src/frame/window/modules/keyboard/waylandgrab.cpp + delete mode 100644 src/frame/window/modules/keyboard/waylandgrab.h + +diff --git a/src/frame/CMakeLists.txt b/src/frame/CMakeLists.txt +index a5c64d0..223eeb7 100644 +--- a/src/frame/CMakeLists.txt ++++ b/src/frame/CMakeLists.txt +@@ -22,6 +22,9 @@ endif() + + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") + ++# disable qt keywords, cause gio have signals member; ++ADD_DEFINITIONS(-DQT_NO_KEYWORDS) ++ + if (DEFINED ENABLE_MIEEE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mieee") + endif() +@@ -406,9 +409,6 @@ set(KEYBOARD_FILES + window/modules/keyboard/systemlanguagesettingwidget.cpp + window/modules/keyboard/shortcutsettingwidget.cpp + window/modules/keyboard/systemlanguagewidget.cpp +- window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-protocol.c +- window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-client-protocol.h +- window/modules/keyboard/waylandgrab.cpp + ) + + # load mouse +@@ -598,15 +598,12 @@ find_package(Qt5 COMPONENTS + DBus + Multimedia + Svg +- WaylandClient + REQUIRED) + if(${Qt5_VERSION} VERSION_GREATER "5.15.1") + find_package(Qt5 COMPONENTS + XkbCommonSupport + REQUIRED) + endif() +-find_package(KF5Wayland QUIET) +-pkg_check_modules(WaylandClient REQUIRED wayland-client) + pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11 xext xkbcommon) + pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus) + pkg_check_modules(QGSettings REQUIRED gsettings-qt) +@@ -624,7 +621,6 @@ set(Qt_LIBS + Qt5::Widgets + Qt5::X11Extras + Qt5::Multimedia +- Qt5::WaylandClient + ) + + set(DEEPIN_PW_CHECK libdeepin_pw_check.so) +@@ -730,7 +726,6 @@ target_include_directories(dccwidgets PUBLIC + ${CMAKE_SOURCE_DIR}/include + ${DtkWidget_INCLUDE_DIRS} + ${Qt5Gui_PRIVATE_INCLUDE_DIRS} +- ${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS} + ${WaylandClient_INCLUDE_DIRS} + ${XCB_EWMH_INCLUDE_DIRS} + ) +@@ -745,9 +740,6 @@ target_link_libraries(dccwidgets PRIVATE + ${DtkWidget_LIBRARIES} + ${Qt5Widgets_LIBRARIES} + ${Qt5Svg_LIBRARIES} +- KF5::WaylandClient +- Qt5::WaylandClient +- ${WaylandClient_LIBRARIES} + ) + + +@@ -782,9 +774,6 @@ target_link_libraries(${BIN_NAME} PRIVATE + crypt + ${LIBS} + PolkitQt5-1::Agent +- KF5::WaylandClient +- Qt5::WaylandClient +- ${WaylandClient_LIBRARIES} + ) + # bin + install(TARGETS ${BIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff --git a/src/frame/modules/keyboard/customedit.cpp b/src/frame/modules/keyboard/customedit.cpp +index fe5b6ad..99347a9 100644 +--- a/src/frame/modules/keyboard/customedit.cpp ++++ b/src/frame/modules/keyboard/customedit.cpp +@@ -5,19 +5,15 @@ + #include "customedit.h" + #include "widgets/translucentframe.h" + #include "customitem.h" +-#include "window/modules/keyboard/waylandgrab.h" +-#include "window/utils.h" + + #include + #include + #include + #include +-#include + + #include + + DWIDGET_USE_NAMESPACE +-using namespace DCC_NAMESPACE; + + keyboard::CustomEdit::CustomEdit(ShortcutModel *model, QWidget *parent): + ContentWidget(parent), +@@ -27,12 +23,8 @@ keyboard::CustomEdit::CustomEdit(ShortcutModel *model, QWidget *parent): + m_command(new LineEditWidget), + m_short(new CustomItem(this)), + m_tip(new QLabel), +- m_conflict(nullptr), +- m_waylandGrab(nullptr) ++ m_conflict(nullptr) + { +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- m_waylandGrab = new WaylandGrab(this->topLevelWidget()); +- } + m_tip->setVisible(false); + m_tip->setWordWrap(true); + +@@ -204,68 +196,3 @@ void keyboard::CustomEdit::onUpdateKey() + { + Q_EMIT requestUpdateKey(nullptr); + } +- +-void keyboard::CustomEdit::onGrab(ShortcutInfo *info) +-{ +- if (m_waylandGrab) +- m_waylandGrab->onGrab(info); +-} +- +-void keyboard::CustomEdit::keyPressEvent(QKeyEvent *e) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- m_waylandGrab->setKeyValue(WaylandkeyMap[e->key()]); +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- +- m_waylandGrab->setRecordState(true); +- keyEvent(true, m_waylandGrab->getRecordState() ? lastKey + keyValue : keyValue); +- if (e->key() == Qt::Key_Control || e->key() == Qt::Key_Alt +- || e->key() == Qt::Key_Shift || e->key() == Qt::Key_Super_L || e->key() == Qt::Key_Super_R) { +- lastKey += ("<" + keyValue.remove(keyValue.indexOf("_"), 2) + ">"); +- m_waylandGrab->setLastKey(lastKey); +- } +- QWidget::keyPressEvent(e); +-} +- +-void keyboard::CustomEdit::keyReleaseEvent(QKeyEvent *e) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm() || !m_waylandGrab->getRecordState()) { +- return; +- } +- QString lastKey = m_waylandGrab->getLastKey(); +- const QString keyValue = m_waylandGrab->getKeyValue(); +- if (!lastKey.isEmpty()) { +- if (WaylandkeyMap[Qt::Key_Control] == keyValue +- || WaylandkeyMap[Qt::Key_Alt] == keyValue || WaylandkeyMap[Qt::Key_Shift] == keyValue) { +- keyEvent(false, ""); +- } else if (WaylandkeyMap[Qt::Key_Super_L] == keyValue || WaylandkeyMap[Qt::Key_Super_R] == keyValue) { +- keyEvent(false, "Super_L"); +- } else { +- keyEvent(false, lastKey + keyValue); +- } +- } else { +- keyEvent(false, ""); +- } +- m_waylandGrab->setLastKey(""); +- m_waylandGrab->setRecordState(false); +- m_waylandGrab->onUnGrab(); +- QWidget::keyReleaseEvent(e); +-} +- +-void keyboard::CustomEdit::mousePressEvent(QMouseEvent *e) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- setFocus(); +- if (!m_waylandGrab->getRecordState()) { +- m_waylandGrab->onUnGrab(); +- } +- QWidget::mousePressEvent(e); +-} +diff --git a/src/frame/modules/keyboard/customedit.h b/src/frame/modules/keyboard/customedit.h +index cceeb3b..bfc5ac6 100644 +--- a/src/frame/modules/keyboard/customedit.h ++++ b/src/frame/modules/keyboard/customedit.h +@@ -16,8 +16,6 @@ + using namespace dcc; + using namespace dcc::widgets; + +-class WaylandGrab; +- + namespace dcc { + namespace keyboard{ + struct ShortcutInfo; +@@ -37,12 +35,6 @@ Q_SIGNALS: + public Q_SLOTS: + void setBottomTip(ShortcutInfo *conflict); + void keyEvent(bool press, const QString &shortcut); +- void onGrab(ShortcutInfo *info); +- +-protected: +- void keyPressEvent(QKeyEvent *e) override; +- void keyReleaseEvent(QKeyEvent *e) override; +- void mousePressEvent(QMouseEvent *e) override; + + private Q_SLOTS: + void onOpenFile(); +@@ -58,7 +50,6 @@ private: + ShortcutInfo *m_info; + QLabel *m_tip; + ShortcutInfo *m_conflict; +- WaylandGrab *m_waylandGrab; + }; + } + } +diff --git a/src/frame/modules/keyboard/keyboardwork.cpp b/src/frame/modules/keyboard/keyboardwork.cpp +index 1f66cf7..b4f8723 100644 +--- a/src/frame/modules/keyboard/keyboardwork.cpp ++++ b/src/frame/modules/keyboard/keyboardwork.cpp +@@ -10,7 +10,6 @@ + #include + #include + #include +-#include + + namespace dcc { + namespace keyboard{ +@@ -605,11 +604,8 @@ void KeyboardWorker::updateKey(ShortcutInfo *info) + { + if (m_shortcutModel) + m_shortcutModel->setCurrentInfo(info); +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- Q_EMIT stareGrab(info); +- } else { +- m_keybindInter->SelectKeystroke(); +- } ++ ++ m_keybindInter->SelectKeystroke(); + } + + void KeyboardWorker::cleanShortcutSlef(const QString &id, const int type, const QString &shortcut) +diff --git a/src/frame/modules/keyboard/keyboardwork.h b/src/frame/modules/keyboard/keyboardwork.h +index d5b1add..f04b1fe 100644 +--- a/src/frame/modules/keyboard/keyboardwork.h ++++ b/src/frame/modules/keyboard/keyboardwork.h +@@ -83,7 +83,6 @@ Q_SIGNALS: + // 快捷键恢复默认完成 + void onResetFinished(); + +- void stareGrab(ShortcutInfo *info); + + public Q_SLOTS: + #ifndef DCC_DISABLE_LANGUAGE +diff --git a/src/frame/modules/keyboard/shortcutcontent.cpp b/src/frame/modules/keyboard/shortcutcontent.cpp +index c3f5129..815b15d 100644 +--- a/src/frame/modules/keyboard/shortcutcontent.cpp ++++ b/src/frame/modules/keyboard/shortcutcontent.cpp +@@ -9,15 +9,10 @@ + #include "keyboardcontrol.h" + #include "widgets/translucentframe.h" + #include "keyboardmodel.h" +-#include "window/modules/keyboard/waylandgrab.h" +-#include "window/utils.h" + + #include +-#include + #include + +-using namespace DCC_NAMESPACE; +- + namespace dcc { + namespace keyboard { + ShortcutContent::ShortcutContent(ShortcutModel *model, QWidget *parent) +@@ -26,11 +21,7 @@ ShortcutContent::ShortcutContent(ShortcutModel *model, QWidget *parent) + , m_conflict(nullptr) + , m_shortcutItem(new ShortcutItem) + , m_buttonTuple(new ButtonTuple(ButtonTuple::Save)) +- , m_waylandGrab(nullptr) + { +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- m_waylandGrab = new WaylandGrab(this->topLevelWidget()); +- } + TranslucentFrame *widget = new TranslucentFrame(); + setContentsMargins(10, 10, 10, 10); + QVBoxLayout *layout = new QVBoxLayout(); +@@ -117,17 +108,12 @@ void ShortcutContent::setShortcut(const QString &shortcut) + m_shortcutItem->setShortcut(shortcut); + } + +-void ShortcutContent::setConflictShortcut(const QString &shortcut) +-{ +- m_conflictShortcut = shortcut; +-} +- + void ShortcutContent::keyEvent(bool press, const QString &shortcut) + { + if (!press) { + + if (shortcut.isEmpty()) { +- setBottomTip(m_shortcut == m_conflictShortcut ? m_conflict : nullptr); ++ setBottomTip(m_info); + m_shortcutItem->setShortcut(m_shortcut); + return; + } +@@ -145,12 +131,9 @@ void ShortcutContent::keyEvent(bool press, const QString &shortcut) + if (info && info != m_info && info->accels != m_info->accels) { + m_shortcutItem->setShortcut(info->accels); + setBottomTip(info); +- setConflictShortcut(shortcut); + return; + } +- } + +- if (!shortcut.isEmpty()) { + setBottomTip(nullptr); + m_shortcutItem->setShortcut(shortcut); + } +@@ -175,71 +158,5 @@ void ShortcutContent::onUpdateKey() + Q_EMIT requestUpdateKey(nullptr); + } + +-void ShortcutContent::onGrab(ShortcutInfo *info) +-{ +- if (m_waylandGrab) +- m_waylandGrab->onGrab(info); +-} +- +-void ShortcutContent::keyPressEvent(QKeyEvent *ke) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- unsigned int keKey = static_cast(ke->key()); +- m_waylandGrab->setKeyValue(WaylandkeyMap[keKey]); +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- +- m_waylandGrab->setRecordState(true); +- keyEvent(true, m_waylandGrab->getRecordState() ? lastKey + keyValue : keyValue); +- if (keKey == Qt::Key_Control || keKey == Qt::Key_Alt +- || keKey == Qt::Key_Shift || keKey == Qt::Key_Super_L || keKey == Qt::Key_Super_R) { +- lastKey += ("<" + keyValue.remove(keyValue.indexOf("_"), 2) + ">"); +- m_waylandGrab->setLastKey(lastKey); +- } +- return QWidget::keyPressEvent(ke); +-} +- +-void ShortcutContent::keyReleaseEvent(QKeyEvent *ke) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()|| !m_waylandGrab->getRecordState()) { +- return; +- } +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- if (!lastKey.isEmpty()) { +- if (WaylandkeyMap[Qt::Key_Control] == keyValue +- || WaylandkeyMap[Qt::Key_Alt] == keyValue || WaylandkeyMap[Qt::Key_Shift] == keyValue) { +- keyEvent(false, ""); +- } else if (WaylandkeyMap[Qt::Key_Super_L] == keyValue || WaylandkeyMap[Qt::Key_Super_R] == keyValue) { +- keyEvent(false, "Super_L"); +- } else { +- keyEvent(false, lastKey + keyValue); +- } +- } else { +- keyEvent(false, ""); +- } +- m_waylandGrab->setLastKey(""); +- m_waylandGrab->setRecordState(false); +- m_waylandGrab->onUnGrab(); +- return QWidget::keyReleaseEvent(ke); +-} +- +-void ShortcutContent::mousePressEvent(QMouseEvent *e) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- setFocus(); +- if (!m_waylandGrab->getRecordState()) { +- m_waylandGrab->onUnGrab(); +- } +- QWidget::mousePressEvent(e); +-} +- + } + } +diff --git a/src/frame/modules/keyboard/shortcutcontent.h b/src/frame/modules/keyboard/shortcutcontent.h +index 5e31eb8..f1138a1 100644 +--- a/src/frame/modules/keyboard/shortcutcontent.h ++++ b/src/frame/modules/keyboard/shortcutcontent.h +@@ -14,7 +14,6 @@ + #include "widgets/buttontuple.h" + + using namespace dcc; +-class WaylandGrab; + + namespace dcc { + namespace keyboard{ +@@ -31,7 +30,6 @@ public: + void setBottomTip(ShortcutInfo *conflict); + void setInfo(ShortcutInfo *info); + void setShortcut(const QString &shortcut); +- void setConflictShortcut(const QString &shortcut); + + Q_SIGNALS: + void requestUpdateKey(ShortcutInfo *conflict); +@@ -42,12 +40,6 @@ public Q_SLOTS: + void keyEvent(bool press, const QString &shortcut); + void onReplace(); + void onUpdateKey(); +- void onGrab(ShortcutInfo *info); +- +-protected: +- void keyPressEvent(QKeyEvent *ke) override; +- void keyReleaseEvent(QKeyEvent *ke) override; +- void mousePressEvent(QMouseEvent *e) override; + + private: + ShortcutModel *m_model; +@@ -58,8 +50,6 @@ private: + dcc::widgets::ButtonTuple *m_buttonTuple; + TitleButtonItem* m_item; + QString m_shortcut; +- QString m_conflictShortcut; +- WaylandGrab *m_waylandGrab; + }; + } + } +diff --git a/src/frame/modules/keyboard/shortcutitem.cpp b/src/frame/modules/keyboard/shortcutitem.cpp +index facb5d2..1a75eff 100644 +--- a/src/frame/modules/keyboard/shortcutitem.cpp ++++ b/src/frame/modules/keyboard/shortcutitem.cpp +@@ -128,7 +128,6 @@ void ShortcutItem::setShortcut(const QString &shortcut) + accels = accels.replace("Control", "Ctrl"); + + m_key->setTextList(accels.split("-")); +- m_key->setFocus(); + QTimer::singleShot(0, this, &ShortcutItem::updateTitleSize); + } + +diff --git a/src/frame/modules/keyboard/shortcutmodel.cpp b/src/frame/modules/keyboard/shortcutmodel.cpp +index 44c33d8..df1112f 100644 +--- a/src/frame/modules/keyboard/shortcutmodel.cpp ++++ b/src/frame/modules/keyboard/shortcutmodel.cpp +@@ -303,12 +303,8 @@ void ShortcutModel::setCurrentInfo(ShortcutInfo *currentInfo) + + ShortcutInfo *ShortcutModel::getInfo(const QString &shortcut) + { +- QString newShortcut = shortcut; +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- newShortcut = parseKeystroke(newShortcut); +- } + auto res = std::find_if(m_infos.begin(), m_infos.end(), [ = ] (const ShortcutInfo *info)->bool{ +- return !QString::compare(info->accels, newShortcut, Qt::CaseInsensitive); //判断是否相等,相等则返回0 ++ return !QString::compare(info->accels, shortcut, Qt::CaseInsensitive); //判断是否相等,相等则返回0 + }); + + if (res != m_infos.end()) { +@@ -318,33 +314,6 @@ ShortcutInfo *ShortcutModel::getInfo(const QString &shortcut) + return nullptr; + } + +-QString ShortcutModel::parseKeystroke(QString& shortcut) +-{ +- // 如L转换后为L +- QStringList keys = shortcut.replace(">", ">,").split(","); +- keys.removeAll(""); +- QString sortArr[5]; +- foreach (const QString& key, keys) { +- if (key.contains("Shift")) { +- sortArr[0] = key; +- } else if (key.contains("Control")) { +- sortArr[1] = key; +- } else if (key.contains("Alt")) { +- sortArr[2] = key; +- } else if (key.contains("Super")) { +- sortArr[3] = key; +- } else { +- sortArr[4] = key; +- } +- } +- QString newShort; +- for (const QString& key : sortArr) { +- if (!key.isEmpty()) { +- newShort += key; +- } +- } +- return newShort; +-} + + void ShortcutModel::setSearchResult(const QString &searchResult) + { +diff --git a/src/frame/modules/keyboard/shortcutmodel.h b/src/frame/modules/keyboard/shortcutmodel.h +index 0e67f1f..537ec4d 100644 +--- a/src/frame/modules/keyboard/shortcutmodel.h ++++ b/src/frame/modules/keyboard/shortcutmodel.h +@@ -78,7 +78,6 @@ public: + ShortcutInfo *getInfo(const QString &shortcut); + void setSearchResult(const QString &searchResult); + bool getWindowSwitch(); +- QString parseKeystroke(QString& shortcuts); + + Q_SIGNALS: + void listChanged(QList, InfoType); +diff --git a/src/frame/window/modules/authentication/biologicalbasedialog.h b/src/frame/window/modules/authentication/biologicalbasedialog.h +index 77c28fd..7f25e05 100644 +--- a/src/frame/window/modules/authentication/biologicalbasedialog.h ++++ b/src/frame/window/modules/authentication/biologicalbasedialog.h +@@ -24,7 +24,7 @@ public: + explicit BiologicalBaseDialog(QWidget *parent = nullptr); + ~BiologicalBaseDialog(); + +-public slots: ++public Q_SLOTS: + void onShowDisclaimer(); + void onAcceptDisclaimer(bool accept); + +diff --git a/src/frame/window/modules/authentication/faceiddetailwidget.cpp b/src/frame/window/modules/authentication/faceiddetailwidget.cpp +index cc32719..2dd32eb 100644 +--- a/src/frame/window/modules/authentication/faceiddetailwidget.cpp ++++ b/src/frame/window/modules/authentication/faceiddetailwidget.cpp +@@ -43,7 +43,7 @@ FaceidDetailWidget::FaceidDetailWidget(dcc::authentication::CharaMangerModel *mo + + FaceidDetailWidget::~FaceidDetailWidget() + { +- emit requestStopEnroll(); ++ Q_EMIT requestStopEnroll(); + } + + void FaceidDetailWidget::initFaceidShow() +diff --git a/src/frame/window/modules/keyboard/customcontent.cpp b/src/frame/window/modules/keyboard/customcontent.cpp +index 0fd17e1..d36c02c 100644 +--- a/src/frame/window/modules/keyboard/customcontent.cpp ++++ b/src/frame/window/modules/keyboard/customcontent.cpp +@@ -12,8 +12,6 @@ + #include "widgets/buttontuple.h" + #include "widgets/lineeditwidget.h" + #include "widgets/settingsgroup.h" +-#include "window/utils.h" +-#include "waylandgrab.h" + + #include + +@@ -24,7 +22,6 @@ + #include + #include + #include +-#include + + DWIDGET_USE_NAMESPACE + +@@ -38,12 +35,7 @@ CustomContent::CustomContent(ShortcutModel *model, QWidget *parent) + , m_conflict(nullptr) + , m_model(model) + , m_buttonTuple(new ButtonTuple(ButtonTuple::Save)) +- , m_waylandGrab(nullptr) + { +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- m_waylandGrab = new WaylandGrab(this->parent()); +- } +- + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->setContentsMargins(10, 35, 10, 0); + //~ contents_path /keyboard/Shortcuts/Add Custom Shortcut +@@ -207,68 +199,3 @@ void CustomContent::updateKey() + { + Q_EMIT requestUpdateKey(nullptr); + } +- +-void CustomContent::onGrab(ShortcutInfo *info) +-{ +- if (m_waylandGrab) +- m_waylandGrab->onGrab(info); +-} +- +-void CustomContent::keyPressEvent(QKeyEvent *ke) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- m_waylandGrab->setKeyValue(WaylandkeyMap[ke->key()]); +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- +- m_waylandGrab->setRecordState(true); +- keyEvent(true, m_waylandGrab->getRecordState() ? lastKey + keyValue : keyValue); +- if (ke->key() == Qt::Key_Control || ke->key() == Qt::Key_Alt +- || ke->key() == Qt::Key_Shift || ke->key() == Qt::Key_Super_L || ke->key() == Qt::Key_Super_R) { +- lastKey += ("<" + keyValue.remove(keyValue.indexOf("_"), 2) + ">"); +- m_waylandGrab->setLastKey(lastKey); +- } +- return QWidget::keyPressEvent(ke); +-} +- +-void CustomContent::keyReleaseEvent(QKeyEvent *ke) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm() || !m_waylandGrab->getRecordState()) { +- return; +- } +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- if (!lastKey.isEmpty()) { +- if (WaylandkeyMap[Qt::Key_Control] == keyValue +- || WaylandkeyMap[Qt::Key_Alt] == keyValue || WaylandkeyMap[Qt::Key_Shift] == keyValue) { +- keyEvent(false, ""); +- } else if (WaylandkeyMap[Qt::Key_Super_L] == keyValue || WaylandkeyMap[Qt::Key_Super_R] == keyValue) { +- keyEvent(false, "Super_L"); +- } else { +- keyEvent(false, lastKey + keyValue); +- } +- } else { +- keyEvent(false, ""); +- } +- m_waylandGrab->setLastKey(""); +- m_waylandGrab->setRecordState(false); +- m_waylandGrab->onUnGrab(); +- return QWidget::keyReleaseEvent(ke); +-} +- +-void CustomContent::mousePressEvent(QMouseEvent *e) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- setFocus(); +- if (!m_waylandGrab->getRecordState()) { +- m_waylandGrab->onUnGrab(); +- } +- QWidget::mousePressEvent(e); +-} +\ No newline at end of file +diff --git a/src/frame/window/modules/keyboard/customcontent.h b/src/frame/window/modules/keyboard/customcontent.h +index adfa6ab..076cc6f 100644 +--- a/src/frame/window/modules/keyboard/customcontent.h ++++ b/src/frame/window/modules/keyboard/customcontent.h +@@ -51,12 +51,6 @@ public Q_SLOTS: + void keyEvent(bool press, const QString &shortcut); + void updateKey(); + +- void onGrab(dcc::keyboard::ShortcutInfo *info); +- +-protected: +- void keyPressEvent(QKeyEvent *ke) override; +- void keyReleaseEvent(QKeyEvent *ke) override; +- void mousePressEvent(QMouseEvent *e) override; + + private: + dcc::keyboard::KeyboardWorker *m_work; +@@ -68,7 +62,6 @@ private: + dcc::keyboard::ShortcutModel *m_model; + dcc::widgets::ButtonTuple *m_buttonTuple; + +- WaylandGrab *m_waylandGrab; + }; + } + } +diff --git a/src/frame/window/modules/keyboard/keyboardmodule.cpp b/src/frame/window/modules/keyboard/keyboardmodule.cpp +index 12e8d74..463c627 100644 +--- a/src/frame/window/modules/keyboard/keyboardmodule.cpp ++++ b/src/frame/window/modules/keyboard/keyboardmodule.cpp +@@ -20,7 +20,6 @@ + #include "modules/keyboard/shortcutcontent.h" + #include "window/mainwindow.h" + +-#include + + using namespace dcc; + using namespace dcc::keyboard; +@@ -352,7 +351,7 @@ void KeyboardModule::onAddLocale(const QModelIndex &index) + void KeyboardModule::showShortCutSetting() + { + m_work->refreshShortcut(); +- m_shortcutSettingWidget = new ShortCutSettingWidget(m_shortcutModel, m_pMainWindow); ++ m_shortcutSettingWidget = new ShortCutSettingWidget(m_shortcutModel); + GSettingWatcher::instance()->bind("keyboardShortcut", m_shortcutSettingWidget); // 使用GSettings来控制显示状态 + m_shortcutSettingWidget->setVisible(false); + connect(m_shortcutSettingWidget, &ShortCutSettingWidget::customShortcut, this, &KeyboardModule::onPushCustomShortcut); +@@ -368,9 +367,6 @@ void KeyboardModule::showShortCutSetting() + connect(m_work, &KeyboardWorker::searchChangd, m_shortcutSettingWidget, &ShortCutSettingWidget::onSearchInfo); + connect(m_work, &KeyboardWorker::onResetFinished, m_shortcutSettingWidget, &ShortCutSettingWidget::onResetFinished); + +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- connect(m_work, &KeyboardWorker::stareGrab, m_shortcutSettingWidget, &ShortCutSettingWidget::onGrab); +- } + + m_frameProxy->pushWidget(this, m_shortcutSettingWidget); + m_shortcutSettingWidget->setVisible(GSettingWatcher::instance()->getStatus("keyboardShortcut") != "Hidden"); +@@ -393,7 +389,7 @@ void KeyboardModule::onPushSystemLanguageSetting() + + void KeyboardModule::onPushCustomShortcut() + { +- m_customContent = new CustomContent(m_shortcutModel, m_pMainWindow); ++ m_customContent = new CustomContent(m_shortcutModel); + m_customContent->setVisible(false); + m_customContent->setAccessibleName(tr("Custom Shortcut")); + connect(m_customContent, &CustomContent::requestUpdateKey, m_work, &KeyboardWorker::updateKey); +@@ -401,9 +397,6 @@ void KeyboardModule::onPushCustomShortcut() + connect(m_customContent, &CustomContent::requestForceSubs, m_work, &KeyboardWorker::onDisableShortcut); + connect(m_customContent, &CustomContent::back, this, &KeyboardModule::showShortCutSetting); + +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- connect(m_work, &KeyboardWorker::stareGrab, m_customContent, &CustomContent::onGrab); +- } + + m_frameProxy->pushWidget(this, m_customContent); + m_customContent->setVisible(true); +@@ -419,13 +412,9 @@ void KeyboardModule::onPushConflict(ShortcutInfo *info, const QString &shortcut) + connect(m_scContent, &ShortcutContent::requestUpdateKey, m_work, &KeyboardWorker::updateKey); + connect(m_scContent, &ShortcutContent::requestDisableShortcut, m_work, &KeyboardWorker::onDisableShortcut); + connect(m_scContent, &ShortcutContent::back, this, &KeyboardModule::showShortCutSetting); +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- connect(m_work, &KeyboardWorker::stareGrab, m_scContent, &ShortcutContent::onGrab); +- } + + m_scContent->setInfo(info); + m_scContent->setShortcut(shortcut); +- m_scContent->setConflictShortcut(shortcut); + m_scContent->setBottomTip(m_shortcutModel->getInfo(shortcut)); + + m_frameProxy->pushWidget(this, m_scContent); +@@ -446,9 +435,6 @@ void KeyboardModule::onShortcutEdit(ShortcutInfo *info) + connect(m_customEdit, &CustomEdit::requestSaveShortcut, head, &SettingsHead::toCancel); + connect(m_customEdit, &CustomEdit::requestSaveShortcut, m_work, &KeyboardWorker::modifyCustomShortcut); + connect(m_customEdit, &CustomEdit::back, this, &KeyboardModule::showShortCutSetting); +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- connect(m_work, &KeyboardWorker::stareGrab, m_customEdit, &CustomEdit::onGrab); +- } + + m_frameProxy->pushWidget(this, m_customEdit); + m_customEdit->setVisible(true); +diff --git a/src/frame/window/modules/keyboard/shortcutsettingwidget.cpp b/src/frame/window/modules/keyboard/shortcutsettingwidget.cpp +index 8b7024e..44989b0 100644 +--- a/src/frame/window/modules/keyboard/shortcutsettingwidget.cpp ++++ b/src/frame/window/modules/keyboard/shortcutsettingwidget.cpp +@@ -12,12 +12,10 @@ + #include "widgets/settingsgroup.h" + #include "widgets/searchinput.h" + #include "window/gsettingwatcher.h" +-#include "waylandgrab.h" + + #include + + #include +-#include + + using namespace DCC_NAMESPACE; + using namespace DCC_NAMESPACE::keyboard; +@@ -29,12 +27,7 @@ ShortCutSettingWidget::ShortCutSettingWidget(ShortcutModel *model, QWidget *pare + , m_workspaceGroup(nullptr) + , m_assistiveToolsGroup(nullptr) + , m_model(model) +- , m_waylandGrab(nullptr) + { +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- m_waylandGrab = new WaylandGrab(this->parent()); +- } +- + setAccessibleName("ShortCutSettingWidget"); + m_searchDelayTimer = new QTimer(this); + m_searchDelayTimer->setInterval(300); +@@ -242,12 +235,12 @@ void ShortCutSettingWidget::addShortcut(QList list, ShortcutMode + ShortcutItem *item = new ShortcutItem(); + item->setAccessibleName(info->name); + connect(item, &ShortcutItem::requestUpdateKey, this, &ShortCutSettingWidget::requestUpdateKey); +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- connect(item, &ShortcutItem::waylandEditKeyFinshed, this, [ this ]{ +- if(m_waylandGrab && !m_waylandGrab->getRecordState()) +- m_waylandGrab->onUnGrab(); +- }); +- } ++ //if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { ++ // connect(item, &ShortcutItem::waylandEditKeyFinshed, this, [ this ]{ ++ // if(m_waylandGrab && !m_waylandGrab->getRecordState()) ++ // m_waylandGrab->onUnGrab(); ++ // }); ++ //} + item->setShortcutInfo(info); + item->setTitle(info->name); + info->item = item; +@@ -444,11 +437,6 @@ void ShortCutSettingWidget::onSearchStringFinish(const QList sear + + ShortcutItem *item = new ShortcutItem; + connect(item, &ShortcutItem::requestUpdateKey, this, &ShortCutSettingWidget::requestUpdateKey); +- if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { +- connect(this, &ShortCutSettingWidget::changed, [ & ] { +- onSearchTextChanged(m_searchText); +- }); +- } + item->setShortcutInfo(list[i]); + item->setTitle(list[i]->name); + item->setFixedHeight(36); +@@ -536,57 +524,3 @@ void ShortCutSettingWidget::onResetFinished() + { + m_bIsResting = false; + } +- +-void ShortCutSettingWidget::onGrab(ShortcutInfo *info) +-{ +- if (m_waylandGrab) +- m_waylandGrab->onGrab(info); +-} +- +-void ShortCutSettingWidget::keyPressEvent(QKeyEvent *ke) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm()) { +- return; +- } +- unsigned int keKey = static_cast(ke->key()); +- m_waylandGrab->setKeyValue(WaylandkeyMap[keKey]); +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- +- m_waylandGrab->setRecordState(true); +- onKeyEvent(true, m_waylandGrab->getRecordState() ? lastKey + keyValue : keyValue); +- if (keKey == Qt::Key_Control || keKey == Qt::Key_Alt +- || keKey == Qt::Key_Shift || keKey == Qt::Key_Super_L || keKey == Qt::Key_Super_R) { +- lastKey += ("<" + keyValue.remove(keyValue.indexOf("_"), 2) + ">"); +- m_waylandGrab->setLastKey(lastKey); +- } +- QWidget::keyPressEvent(ke); +-} +- +-void ShortCutSettingWidget::keyReleaseEvent(QKeyEvent *ke) +-{ +- if (!QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive) +- || !m_waylandGrab || !m_waylandGrab->getZxgm() || !m_waylandGrab->getRecordState()) { +- return; +- } +- QString lastKey = m_waylandGrab->getLastKey(); +- QString keyValue = m_waylandGrab->getKeyValue(); +- if (!lastKey.isEmpty()) { +- if (WaylandkeyMap[Qt::Key_Control] == keyValue +- || WaylandkeyMap[Qt::Key_Alt] == keyValue || WaylandkeyMap[Qt::Key_Shift] == keyValue) { +- onKeyEvent(false, ""); +- } else if (WaylandkeyMap[Qt::Key_Super_L] == keyValue || WaylandkeyMap[Qt::Key_Super_R] == keyValue) { +- onKeyEvent(false, "Super_L"); +- } else { +- onKeyEvent(false, lastKey + keyValue); +- } +- } else { +- onKeyEvent(false, ""); +- } +- m_waylandGrab->setLastKey(""); +- m_waylandGrab->setRecordState(false); +- Q_EMIT changed(m_waylandGrab->getInfo()->id, m_waylandGrab->getInfo()->type); +- m_waylandGrab->onUnGrab(); +- QWidget::keyReleaseEvent(ke); +-} +diff --git a/src/frame/window/modules/keyboard/shortcutsettingwidget.h b/src/frame/window/modules/keyboard/shortcutsettingwidget.h +index d9941f5..d8ced0a 100644 +--- a/src/frame/window/modules/keyboard/shortcutsettingwidget.h ++++ b/src/frame/window/modules/keyboard/shortcutsettingwidget.h +@@ -61,7 +61,6 @@ Q_SIGNALS: + void requestReset(); + void requestSearch(const QString &key); + +- void changed(const QString &in0, int in1); + + public Q_SLOTS: + void onSearchTextChanged(const QString &text); +@@ -75,11 +74,6 @@ public Q_SLOTS: + void onKeyEvent(bool press, const QString &shortcut); + void onResetFinished(); + +- void onGrab(dcc::keyboard::ShortcutInfo *info); +- +-protected: +- void keyPressEvent(QKeyEvent *ke) override; +- void keyReleaseEvent(QKeyEvent *ke) override; + + private: + QWidget *m_searchWidget; +@@ -115,7 +109,6 @@ private: + QStringList m_assistiveToolsIdList; + QStringList m_workspaceIdList; + +- WaylandGrab *m_waylandGrab; + }; + } + } +diff --git a/src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-client-protocol.h b/src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-client-protocol.h +deleted file mode 100644 +index 1da9fdc..0000000 +--- a/src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-client-protocol.h ++++ /dev/null +@@ -1,248 +0,0 @@ +-/* Generated by wayland-scanner 1.16.0 */ +- +-#ifndef XWAYLAND_KEYBOARD_GRAB_UNSTABLE_V1_CLIENT_PROTOCOL_H +-#define XWAYLAND_KEYBOARD_GRAB_UNSTABLE_V1_CLIENT_PROTOCOL_H +- +-#include +-#include +-#include "wayland-client.h" +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/** +- * @page page_xwayland_keyboard_grab_unstable_v1 The xwayland_keyboard_grab_unstable_v1 protocol +- * Protocol for grabbing the keyboard from Xwayland +- * +- * @section page_desc_xwayland_keyboard_grab_unstable_v1 Description +- * +- * This protocol is application-specific to meet the needs of the X11 +- * protocol through Xwayland. It provides a way for Xwayland to request +- * all keyboard events to be forwarded to a surface even when the +- * surface does not have keyboard focus. +- * +- * In the X11 protocol, a client may request an "active grab" on the +- * keyboard. On success, all key events are reported only to the +- * grabbing X11 client. For details, see XGrabKeyboard(3). +- * +- * The core Wayland protocol does not have a notion of an active +- * keyboard grab. When running in Xwayland, X11 applications may +- * acquire an active grab inside Xwayland but that cannot be translated +- * to the Wayland compositor who may set the input focus to some other +- * surface. In doing so, it breaks the X11 client assumption that all +- * key events are reported to the grabbing client. +- * +- * This protocol specifies a way for Xwayland to request all keyboard +- * be directed to the given surface. The protocol does not guarantee +- * that the compositor will honor this request and it does not +- * prescribe user interfaces on how to handle the respond. For example, +- * a compositor may inform the user that all key events are now +- * forwarded to the given client surface, or it may ask the user for +- * permission to do so. +- * +- * Compositors are required to restrict access to this application +- * specific protocol to Xwayland alone. +- * +- * Warning! The protocol described in this file is experimental and +- * backward incompatible changes may be made. Backward compatible +- * changes may be added together with the corresponding interface +- * version bump. +- * Backward incompatible changes are done by bumping the version +- * number in the protocol and interface names and resetting the +- * interface version. Once the protocol is to be declared stable, +- * the 'z' prefix and the version number in the protocol and +- * interface names are removed and the interface version number is +- * reset. +- * +- * @section page_ifaces_xwayland_keyboard_grab_unstable_v1 Interfaces +- * - @subpage page_iface_zwp_xwayland_keyboard_grab_manager_v1 - context object for keyboard grab manager +- * - @subpage page_iface_zwp_xwayland_keyboard_grab_v1 - interface for grabbing the keyboard +- * @section page_copyright_xwayland_keyboard_grab_unstable_v1 Copyright +- *
+- *
+- * Copyright © 2017 Red Hat Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice (including the next
+- * paragraph) shall be included in all copies or substantial portions of the
+- * Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+- * DEALINGS IN THE SOFTWARE.
+- * 
+- */ +-struct wl_seat; +-struct wl_surface; +-struct zwp_xwayland_keyboard_grab_manager_v1; +-struct zwp_xwayland_keyboard_grab_v1; +- +-/** +- * @page page_iface_zwp_xwayland_keyboard_grab_manager_v1 zwp_xwayland_keyboard_grab_manager_v1 +- * @section page_iface_zwp_xwayland_keyboard_grab_manager_v1_desc Description +- * +- * A global interface used for grabbing the keyboard. +- * @section page_iface_zwp_xwayland_keyboard_grab_manager_v1_api API +- * See @ref iface_zwp_xwayland_keyboard_grab_manager_v1. +- */ +-/** +- * @defgroup iface_zwp_xwayland_keyboard_grab_manager_v1 The zwp_xwayland_keyboard_grab_manager_v1 interface +- * +- * A global interface used for grabbing the keyboard. +- */ +-extern const struct wl_interface zwp_xwayland_keyboard_grab_manager_v1_interface; +-/** +- * @page page_iface_zwp_xwayland_keyboard_grab_v1 zwp_xwayland_keyboard_grab_v1 +- * @section page_iface_zwp_xwayland_keyboard_grab_v1_desc Description +- * +- * A global interface used for grabbing the keyboard. +- * @section page_iface_zwp_xwayland_keyboard_grab_v1_api API +- * See @ref iface_zwp_xwayland_keyboard_grab_v1. +- */ +-/** +- * @defgroup iface_zwp_xwayland_keyboard_grab_v1 The zwp_xwayland_keyboard_grab_v1 interface +- * +- * A global interface used for grabbing the keyboard. +- */ +-extern const struct wl_interface zwp_xwayland_keyboard_grab_v1_interface; +- +-#define ZWP_XWAYLAND_KEYBOARD_GRAB_MANAGER_V1_DESTROY 0 +-#define ZWP_XWAYLAND_KEYBOARD_GRAB_MANAGER_V1_GRAB_KEYBOARD 1 +- +- +-/** +- * @ingroup iface_zwp_xwayland_keyboard_grab_manager_v1 +- */ +-#define ZWP_XWAYLAND_KEYBOARD_GRAB_MANAGER_V1_DESTROY_SINCE_VERSION 1 +-/** +- * @ingroup iface_zwp_xwayland_keyboard_grab_manager_v1 +- */ +-#define ZWP_XWAYLAND_KEYBOARD_GRAB_MANAGER_V1_GRAB_KEYBOARD_SINCE_VERSION 1 +- +-/** @ingroup iface_zwp_xwayland_keyboard_grab_manager_v1 */ +-static inline void +-zwp_xwayland_keyboard_grab_manager_v1_set_user_data(struct zwp_xwayland_keyboard_grab_manager_v1 *zwp_xwayland_keyboard_grab_manager_v1, void *user_data) +-{ +- wl_proxy_set_user_data((struct wl_proxy *) zwp_xwayland_keyboard_grab_manager_v1, user_data); +-} +- +-/** @ingroup iface_zwp_xwayland_keyboard_grab_manager_v1 */ +-static inline void * +-zwp_xwayland_keyboard_grab_manager_v1_get_user_data(struct zwp_xwayland_keyboard_grab_manager_v1 *zwp_xwayland_keyboard_grab_manager_v1) +-{ +- return wl_proxy_get_user_data((struct wl_proxy *) zwp_xwayland_keyboard_grab_manager_v1); +-} +- +-static inline uint32_t +-zwp_xwayland_keyboard_grab_manager_v1_get_version(struct zwp_xwayland_keyboard_grab_manager_v1 *zwp_xwayland_keyboard_grab_manager_v1) +-{ +- return wl_proxy_get_version((struct wl_proxy *) zwp_xwayland_keyboard_grab_manager_v1); +-} +- +-/** +- * @ingroup iface_zwp_xwayland_keyboard_grab_manager_v1 +- * +- * Destroy the keyboard grab manager. +- */ +-static inline void +-zwp_xwayland_keyboard_grab_manager_v1_destroy(struct zwp_xwayland_keyboard_grab_manager_v1 *zwp_xwayland_keyboard_grab_manager_v1) +-{ +- wl_proxy_marshal((struct wl_proxy *) zwp_xwayland_keyboard_grab_manager_v1, +- ZWP_XWAYLAND_KEYBOARD_GRAB_MANAGER_V1_DESTROY); +- +- wl_proxy_destroy((struct wl_proxy *) zwp_xwayland_keyboard_grab_manager_v1); +-} +- +-/** +- * @ingroup iface_zwp_xwayland_keyboard_grab_manager_v1 +- * +- * The grab_keyboard request asks for a grab of the keyboard, forcing +- * the keyboard focus for the given seat upon the given surface. +- * +- * The protocol provides no guarantee that the grab is ever satisfied, +- * and does not require the compositor to send an error if the grab +- * cannot ever be satisfied. It is thus possible to request a keyboard +- * grab that will never be effective. +- * +- * The protocol: +- * +- * * does not guarantee that the grab itself is applied for a surface, +- * the grab request may be silently ignored by the compositor, +- * * does not guarantee that any events are sent to this client even +- * if the grab is applied to a surface, +- * * does not guarantee that events sent to this client are exhaustive, +- * a compositor may filter some events for its own consumption, +- * * does not guarantee that events sent to this client are continuous, +- * a compositor may change and reroute keyboard events while the grab +- * is nominally active. +- */ +-static inline struct zwp_xwayland_keyboard_grab_v1 * +-zwp_xwayland_keyboard_grab_manager_v1_grab_keyboard(struct zwp_xwayland_keyboard_grab_manager_v1 *zwp_xwayland_keyboard_grab_manager_v1, struct wl_surface *surface, struct wl_seat *seat) +-{ +- struct wl_proxy *id; +- +- id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_xwayland_keyboard_grab_manager_v1, +- ZWP_XWAYLAND_KEYBOARD_GRAB_MANAGER_V1_GRAB_KEYBOARD, &zwp_xwayland_keyboard_grab_v1_interface, NULL, surface, seat); +- +- return (struct zwp_xwayland_keyboard_grab_v1 *) id; +-} +- +-#define ZWP_XWAYLAND_KEYBOARD_GRAB_V1_DESTROY 0 +- +- +-/** +- * @ingroup iface_zwp_xwayland_keyboard_grab_v1 +- */ +-#define ZWP_XWAYLAND_KEYBOARD_GRAB_V1_DESTROY_SINCE_VERSION 1 +- +-/** @ingroup iface_zwp_xwayland_keyboard_grab_v1 */ +-static inline void +-zwp_xwayland_keyboard_grab_v1_set_user_data(struct zwp_xwayland_keyboard_grab_v1 *zwp_xwayland_keyboard_grab_v1, void *user_data) +-{ +- wl_proxy_set_user_data((struct wl_proxy *) zwp_xwayland_keyboard_grab_v1, user_data); +-} +- +-/** @ingroup iface_zwp_xwayland_keyboard_grab_v1 */ +-static inline void * +-zwp_xwayland_keyboard_grab_v1_get_user_data(struct zwp_xwayland_keyboard_grab_v1 *zwp_xwayland_keyboard_grab_v1) +-{ +- return wl_proxy_get_user_data((struct wl_proxy *) zwp_xwayland_keyboard_grab_v1); +-} +- +-static inline uint32_t +-zwp_xwayland_keyboard_grab_v1_get_version(struct zwp_xwayland_keyboard_grab_v1 *zwp_xwayland_keyboard_grab_v1) +-{ +- return wl_proxy_get_version((struct wl_proxy *) zwp_xwayland_keyboard_grab_v1); +-} +- +-/** +- * @ingroup iface_zwp_xwayland_keyboard_grab_v1 +- * +- * Destroy the grabbed keyboard object. If applicable, the compositor +- * will ungrab the keyboard. +- */ +-static inline void +-zwp_xwayland_keyboard_grab_v1_destroy(struct zwp_xwayland_keyboard_grab_v1 *zwp_xwayland_keyboard_grab_v1) +-{ +- wl_proxy_marshal((struct wl_proxy *) zwp_xwayland_keyboard_grab_v1, +- ZWP_XWAYLAND_KEYBOARD_GRAB_V1_DESTROY); +- +- wl_proxy_destroy((struct wl_proxy *) zwp_xwayland_keyboard_grab_v1); +-} +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif +diff --git a/src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-protocol.c b/src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-protocol.c +deleted file mode 100644 +index 1947d41..0000000 +--- a/src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-protocol.c ++++ /dev/null +@@ -1,60 +0,0 @@ +-/* Generated by wayland-scanner 1.16.0 */ +- +-/* +- * Copyright © 2017 Red Hat Inc. +- * +- * Permission is hereby granted, free of charge, to any person obtaining a +- * copy of this software and associated documentation files (the "Software"), +- * to deal in the Software without restriction, including without limitation +- * the rights to use, copy, modify, merge, publish, distribute, sublicense, +- * and/or sell copies of the Software, and to permit persons to whom the +- * Software is furnished to do so, subject to the following conditions: +- * +- * The above copyright notice and this permission notice (including the next +- * paragraph) shall be included in all copies or substantial portions of the +- * Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +- * DEALINGS IN THE SOFTWARE. +- */ +- +-#include +-#include +-#include "wayland-util.h" +- +-extern const struct wl_interface wl_seat_interface; +-extern const struct wl_interface wl_surface_interface; +-extern const struct wl_interface zwp_xwayland_keyboard_grab_v1_interface; +- +-static const struct wl_interface *types[] = { +- &zwp_xwayland_keyboard_grab_v1_interface, +- &wl_surface_interface, +- &wl_seat_interface, +-}; +- +-static const struct wl_message zwp_xwayland_keyboard_grab_manager_v1_requests[] = { +- { "destroy", "", types + 0 }, +- { "grab_keyboard", "noo", types + 0 }, +-}; +- +-WL_EXPORT const struct wl_interface zwp_xwayland_keyboard_grab_manager_v1_interface = { +- "zwp_xwayland_keyboard_grab_manager_v1", 1, +- 2, zwp_xwayland_keyboard_grab_manager_v1_requests, +- 0, NULL, +-}; +- +-static const struct wl_message zwp_xwayland_keyboard_grab_v1_requests[] = { +- { "destroy", "", types + 0 }, +-}; +- +-WL_EXPORT const struct wl_interface zwp_xwayland_keyboard_grab_v1_interface = { +- "zwp_xwayland_keyboard_grab_v1", 1, +- 1, zwp_xwayland_keyboard_grab_v1_requests, +- 0, NULL, +-}; +- +diff --git a/src/frame/window/modules/keyboard/waylandgrab.cpp b/src/frame/window/modules/keyboard/waylandgrab.cpp +deleted file mode 100644 +index 5b2f6fb..0000000 +--- a/src/frame/window/modules/keyboard/waylandgrab.cpp ++++ /dev/null +@@ -1,79 +0,0 @@ +-// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. +-// +-// SPDX-License-Identifier: LGPL-3.0-or-later +- +-#include "waylandgrab.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +- +-using namespace dcc::keyboard; +- +-static struct zwp_xwayland_keyboard_grab_manager_v1* xkgm = nullptr; +- +-void MyRegistryListener(void *data, +- struct wl_registry *registry, +- uint32_t id, +- const QString &interface, +- uint32_t version) +-{ +- Q_UNUSED(data); +- Q_UNUSED(version); +- if(interface == QLatin1String("zwp_xwayland_keyboard_grab_manager_v1")){ +- xkgm = static_cast(wl_registry_bind( +- registry,id,&zwp_xwayland_keyboard_grab_manager_v1_interface,version)); +- } +-} +- +-WaylandGrab::WaylandGrab(QObject *parent) +- : QObject(parent) +- , m_zxgm(nullptr) +- , m_info(nullptr) +- , m_record(false) +- , m_lastKey("") +- , m_keyValue("") +-{ +- dynamic_cast(parent)->createWinId(); +- QtWaylandClient::QWaylandWindow* waylandwindow = static_cast(dynamic_cast(parent)->windowHandle()->handle()); +- QtWaylandClient::QWaylandIntegration * waylandIntergration = static_cast( +- QGuiApplicationPrivate::platformIntegration()); +- m_wlSurface = waylandwindow->wlSurface(); +- m_wlSeat = waylandIntergration->display()->currentInputDevice()->wl_seat(); +- waylandIntergration->display()->addRegistryListener(MyRegistryListener, nullptr); +-} +- +-WaylandGrab::~WaylandGrab() +-{ +- if (m_zxgm) { +- zwp_xwayland_keyboard_grab_v1_destroy(m_zxgm); +- m_zxgm = nullptr; +- } +- if (xkgm) { +- zwp_xwayland_keyboard_grab_manager_v1_destroy(xkgm); +- xkgm = nullptr; +- } +-} +- +-void WaylandGrab::onGrab(ShortcutInfo *info) +-{ +- m_info = info; +- m_zxgm = zwp_xwayland_keyboard_grab_manager_v1_grab_keyboard(xkgm, m_wlSurface, m_wlSeat); +-} +- +-void WaylandGrab::onUnGrab() +-{ +- if (m_zxgm) { +- zwp_xwayland_keyboard_grab_v1_destroy(m_zxgm); +- m_zxgm = nullptr; +- } +- +-} +\ No newline at end of file +diff --git a/src/frame/window/modules/keyboard/waylandgrab.h b/src/frame/window/modules/keyboard/waylandgrab.h +deleted file mode 100644 +index 30876fb..0000000 +--- a/src/frame/window/modules/keyboard/waylandgrab.h ++++ /dev/null +@@ -1,45 +0,0 @@ +-// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. +-// +-// SPDX-License-Identifier: LGPL-3.0-or-later +- +-#ifndef WAYLANDGRAB_H +-#define WAYLANDGRAB_H +- +-#include "wayland-xwayland-keyboard-grab-v1-client-protocol.h" +-#include "modules/keyboard/shortcutmodel.h" +- +-class WaylandGrab : public QObject +-{ +- Q_OBJECT +-public: +- explicit WaylandGrab(QObject *parent = nullptr); +- ~WaylandGrab(); +- +-private: +- QString m_lastKey, m_keyValue; +- bool m_record; +- dcc::keyboard::ShortcutInfo *m_info; +- +- struct ::wl_seat* m_wlSeat; +- struct ::wl_surface* m_wlSurface; +- struct zwp_xwayland_keyboard_grab_v1 *m_zxgm; +- +-public: +- QString getLastKey() { return m_lastKey; } +- QString getKeyValue() { return m_keyValue; } +- bool getRecordState() { return m_record; } +- void setLastKey(QString key) { m_lastKey = key; } +- void setKeyValue(QString key) { m_keyValue = key; } +- void setRecordState(bool state) { m_record = state; } +- dcc::keyboard::ShortcutInfo *getInfo() { return m_info; } +- struct zwp_xwayland_keyboard_grab_v1 *getZxgm() { return m_zxgm; } +- +-public Q_SLOTS: +- void onGrab(dcc::keyboard::ShortcutInfo *info); +- void onUnGrab(); +-}; +- +- +- +- +-#endif // WAYLANDGRAB_Hs +\ No newline at end of file +diff --git a/src/frame/window/utils.h b/src/frame/window/utils.h +index 5cc5309..4c49439 100644 +--- a/src/frame/window/utils.h ++++ b/src/frame/window/utils.h +@@ -62,18 +62,6 @@ const bool DisableDeveloperMode = { + false + #endif + }; +-const QMap WaylandkeyMap = { {Qt::Key_A, "A"}, {Qt::Key_B, "B"}, {Qt::Key_C, "C"}, {Qt::Key_D, "D"}, {Qt::Key_E, "E"}, +- {Qt::Key_F, "F"}, {Qt::Key_G, "G"}, {Qt::Key_H, "H"}, {Qt::Key_I, "I"}, {Qt::Key_J, "J"}, {Qt::Key_K, "K"}, {Qt::Key_L, "L"}, {Qt::Key_M, "M"}, +- {Qt::Key_N, "N"}, {Qt::Key_O, "O"}, {Qt::Key_P, "P"}, {Qt::Key_Q, "Q"}, {Qt::Key_R, "R"}, {Qt::Key_S, "S"}, {Qt::Key_T, "T"}, {Qt::Key_U, "U"}, +- {Qt::Key_V, "V"}, {Qt::Key_W, "W"}, {Qt::Key_X, "X"}, {Qt::Key_Y, "Y"}, {Qt::Key_Z, "Z"}, {Qt::Key_Escape, "Escape"}, {Qt::Key_Tab, "Tab"}, +- {Qt::Key_Backtab, "Tab"}, {Qt::Key_Backspace, "Backspace"}, {Qt::Key_Return, "Return"}, {Qt::Key_Enter, "Enter"}, {Qt::Key_Insert, "Insert"}, +- {Qt::Key_Delete, "Delete"}, {Qt::Key_Pause, "Pause"}, {Qt::Key_Print, "Print"}, {Qt::Key_SysReq, "SysReq"}, {Qt::Key_Clear, "Clear"}, {Qt::Key_Home, "Home"}, +- {Qt::Key_End, "End"}, {Qt::Key_Left, "←"}, {Qt::Key_Up, "↑"}, {Qt::Key_Right, "→"}, {Qt::Key_Down, "↓"}, {Qt::Key_PageUp, "PageUp"}, +- {Qt::Key_PageDown, "PageDown"}, {Qt::Key_Shift, "Shift_L"}, {Qt::Key_Control, "Control_L"}, {Qt::Key_Super_L, "Super_L"}, {Qt::Key_Super_R, "Super_R"}, {Qt::Key_Alt, "Alt_L"}, +- {Qt::Key_CapsLock, "CapLock"}, {Qt::Key_NumLock, "NumLock"}, {Qt::Key_ScrollLock, "ScrollLock"}, {Qt::Key_F1, "F1"}, {Qt::Key_F2, "F2"}, {Qt::Key_F3, "F3"}, +- {Qt::Key_F4, "F4"}, {Qt::Key_F5, "F5"}, {Qt::Key_F6, "F6"}, {Qt::Key_F7, "F7"}, {Qt::Key_F8, "F8"}, {Qt::Key_F9, "F9"}, +- {Qt::Key_F10, "F10"}, {Qt::Key_F11, "F11"}, {Qt::Key_F12, "F12"}, {Qt::Key_Space, "Space"}, {Qt::Key_AsciiTilde, "~"} +-}; + + struct ListSubItem { + ListSubItem(); +diff --git a/tests/dde-control-center/CMakeLists.txt b/tests/dde-control-center/CMakeLists.txt +index 6ad2b77..3e8c998 100644 +--- a/tests/dde-control-center/CMakeLists.txt ++++ b/tests/dde-control-center/CMakeLists.txt +@@ -143,9 +143,6 @@ file(GLOB_RECURSE KEYBOARD_Tasks_SRCS + ../../src/frame/window/modules/keyboard/systemlanguagewidget.cpp + ../../src/frame/window/modules/keyboard/systemlanguagesettingwidget.cpp + ../../src/frame/window/modules/keyboard/shortcutsettingwidget.cpp +- ../../src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-client-protocol.h +- ../../src/frame/window/modules/keyboard/wayland-xwayland-keyboard-grab-v1-protocol.c +- ../../src/frame/window/modules/keyboard/waylandgrab.cpp + ../../src/frame/modules/keyboard/keyboardmodel.cpp + ../../src/frame/modules/keyboard/indexmodel.cpp + ../../src/frame/modules/keyboard/shortcutmodel.cpp +@@ -163,10 +160,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -lgcov") + + # 查找依赖库 + find_package(PkgConfig REQUIRED) +-find_package(Qt5 COMPONENTS Widgets Test DBus WaylandClient REQUIRED Concurrent Svg) ++find_package(Qt5 COMPONENTS Widgets Test DBus REQUIRED Concurrent Svg) + find_package(DtkWidget REQUIRED) + find_package(GTest REQUIRED) +-find_package(KF5Wayland QUIET) + + pkg_check_modules(QGSettings REQUIRED gsettings-qt) + pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus) +@@ -318,8 +314,6 @@ target_link_libraries(${SYSTEMINFO_NAME} PRIVATE + -lpthread + ) + +-find_package(PkgConfig REQUIRED) +-pkg_check_modules(WaylandClient REQUIRED wayland-client) + + # 键盘模块链接库 + target_link_libraries(${KEYBOARD_NAME} PRIVATE +@@ -334,9 +328,6 @@ target_link_libraries(${KEYBOARD_NAME} PRIVATE + ${DtkWidget_LIBRARIES} + ${GTEST_LIBRARIES} + -lpthread +- KF5::WaylandClient +- Qt5::WaylandClient +- ${WaylandClient_LIBRARIES} + ) + + # 系统信息模块引用头文件 +@@ -355,7 +346,6 @@ target_include_directories(${KEYBOARD_NAME} PUBLIC + ${QGSettings_INCLUDE_DIRS} + ${Qt5Gui_PRIVATE_INCLUDE_DIRS} + ${DFrameworkDBus_INCLUDE_DIRS} +- ${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS} + ) + + add_custom_target(check +-- +2.20.1 + diff --git a/0003-dde-control-center-uos-open-activate-button-for-1050.patch b/0003-dde-control-center-uos-open-activate-button-for-1050.patch new file mode 100644 index 0000000000000000000000000000000000000000..f4fe3b11f443ec6a4fc800d9cb7e134f3083e472 --- /dev/null +++ b/0003-dde-control-center-uos-open-activate-button-for-1050.patch @@ -0,0 +1,31 @@ +From 8186e031531b6e09e2c633c57d632a73786c6953 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Wed, 4 Jan 2023 13:27:37 +0800 +Subject: [PATCH] dde-control-center uos open activate button for 1050a + +--- + src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +index 754edd9..7c6c1b5 100644 +--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp ++++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +@@ -202,11 +202,12 @@ void NativeInfoWidget::initWidget() + m_authorized->setValue(tr("To be activated")); + m_authorized->setValueForegroundRole(QColor(255, 0, 0)); + m_authorized->setButtonText(tr("Activate")); +- if (DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC) { ++ /*if (DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC) { + m_authorized->setVisable(false); + } else { + m_authorized->setVisable(true); +- } ++ }*/ ++ m_authorized->setVisable(true); + + m_kernel = new TitleValueItem(frame); + //~ contents_path /systeminfo/About This PC +-- +2.20.1 + diff --git a/0004-dde-control-center-disable-windowmoveswitch.patch b/0004-dde-control-center-disable-windowmoveswitch.patch new file mode 100644 index 0000000000000000000000000000000000000000..0a27d90390a785c0ec8780b168a42e3614265ae4 --- /dev/null +++ b/0004-dde-control-center-disable-windowmoveswitch.patch @@ -0,0 +1,50 @@ +From 263559ccfd3615ed1f7f733456f73c54ef364101 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Wed, 1 Feb 2023 13:40:57 +0800 +Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3?= + =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=97=B6=E5=90=AF=E7=94=A8=E9=80=8F=E6=98=8E?= + =?UTF-8?q?=E7=89=B9=E6=95=88?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + .../window/modules/personalization/personalizationgeneral.cpp | 2 ++ + .../window/modules/personalization/personalizationgeneral.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/frame/window/modules/personalization/personalizationgeneral.cpp b/src/frame/window/modules/personalization/personalizationgeneral.cpp +index 13e7b65..137c165 100644 +--- a/src/frame/window/modules/personalization/personalizationgeneral.cpp ++++ b/src/frame/window/modules/personalization/personalizationgeneral.cpp +@@ -493,11 +493,13 @@ void PersonalizationGeneral::paintEvent(QPaintEvent *event) + } + } + ++#if 0 + void PersonalizationGeneral::resizeEvent(QResizeEvent *event) + { + m_windowMovedLabel->setText(QFontMetrics(m_windowMovedLabel->font()).elidedText(m_displayData, Qt::ElideRight, event->size().width() >= 430 ? 500 : 280)); + QWidget::resizeEvent(event); + } ++#endif + + void PersonalizationGeneral::updateActiveColors(RoundColorWidget *selectedWidget) + { +diff --git a/src/frame/window/modules/personalization/personalizationgeneral.h b/src/frame/window/modules/personalization/personalizationgeneral.h +index b4856bb..00809fa 100644 +--- a/src/frame/window/modules/personalization/personalizationgeneral.h ++++ b/src/frame/window/modules/personalization/personalizationgeneral.h +@@ -76,7 +76,9 @@ public: + + protected: + void paintEvent(QPaintEvent *event); ++#if 0 + void resizeEvent(QResizeEvent *event) override; ++#endif + + private: + void updateActiveColors(RoundColorWidget *selectedWidget); +-- +2.20.1 + diff --git a/0005-dde-control-center-feat-add-setVersion.patch b/0005-dde-control-center-feat-add-setVersion.patch new file mode 100644 index 0000000000000000000000000000000000000000..211117a3efee482376ae65a1592d5cdffd2075c4 --- /dev/null +++ b/0005-dde-control-center-feat-add-setVersion.patch @@ -0,0 +1,24 @@ +From d59f4e1bb7972884eff879f7be6810b2b3310c85 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Thu, 2 Feb 2023 16:38:14 +0800 +Subject: [PATCH] feat: add setVersion + +--- + src/frame/modules/systeminfo/systeminfowork.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/frame/modules/systeminfo/systeminfowork.cpp b/src/frame/modules/systeminfo/systeminfowork.cpp +index 20b280c..5b1ce99 100644 +--- a/src/frame/modules/systeminfo/systeminfowork.cpp ++++ b/src/frame/modules/systeminfo/systeminfowork.cpp +@@ -167,6 +167,7 @@ void SystemInfoWork::activate() + version = QString("%1 %2").arg(DSysInfo::productVersion()) + .arg(DSysInfo::productTypeString()); + } ++ m_model->setVersion(version); + m_model->setType(QSysInfo::WordSize); + + if (m_systemInfo->isValid()) { +-- +2.20.1 + diff --git a/0006-dde-control-center-feat-hide-commoninfo.patch b/0006-dde-control-center-feat-hide-commoninfo.patch new file mode 100644 index 0000000000000000000000000000000000000000..4a5a333bfff371b70b4da2825c26d2de653d31df --- /dev/null +++ b/0006-dde-control-center-feat-hide-commoninfo.patch @@ -0,0 +1,25 @@ +From ec9c7104aa14156e8ea1570980e1c7c486c9b1de Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Tue, 7 Feb 2023 09:13:32 +0800 +Subject: [PATCH] feat: hide commoninfo + +--- + com.deepin.dde.control-center.gschema.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/com.deepin.dde.control-center.gschema.xml b/com.deepin.dde.control-center.gschema.xml +index e4d2951..c6e1d49 100644 +--- a/com.deepin.dde.control-center.gschema.xml ++++ b/com.deepin.dde.control-center.gschema.xml +@@ -39,7 +39,7 @@ + Waiting for sound receipt Wait 1 second by default + + +- [] ++ ['commoninfo'] + The module to display + + +-- +2.20.1 + diff --git a/0007-dde-control-center-uos-add-Free-license.patch b/0007-dde-control-center-uos-add-Free-license.patch new file mode 100644 index 0000000000000000000000000000000000000000..bcac6a392edc87376b289bf27774fdfd98b957e6 --- /dev/null +++ b/0007-dde-control-center-uos-add-Free-license.patch @@ -0,0 +1,129 @@ +From 778442f97f0af8631980f4dc75ee264c448b8d6e Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Thu, 16 Feb 2023 14:48:33 +0800 +Subject: [PATCH] dde-control-center uos add Free license + +--- + include/widgets/utils.h | 3 ++- + src/frame/modules/systeminfo/systeminfomodel.h | 3 ++- + src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 4 ++++ + translations/dde-control-center_zh_CN.ts | 7 ++++++- + translations/dde-control-center_zh_HK.ts | 7 ++++++- + translations/dde-control-center_zh_TW.ts | 7 ++++++- + 6 files changed, 26 insertions(+), 5 deletions(-) + +diff --git a/include/widgets/utils.h b/include/widgets/utils.h +index 1387ada..45debcc 100644 +--- a/include/widgets/utils.h ++++ b/include/widgets/utils.h +@@ -39,7 +39,8 @@ enum UiActiveState { + Authorized, //已授权 + AuthorizedLapse, //授权失效 + TrialAuthorized, //试用期已授权 +- TrialExpired //试用期已过期 ++ TrialExpired, //试用期已过期 ++ FreeLicenseAuthorized = 5 //商业免费授权 + }; + + inline bool isFileExist(const QString &path){ +diff --git a/src/frame/modules/systeminfo/systeminfomodel.h b/src/frame/modules/systeminfo/systeminfomodel.h +index 8cdb1fa..401c76f 100644 +--- a/src/frame/modules/systeminfo/systeminfomodel.h ++++ b/src/frame/modules/systeminfo/systeminfomodel.h +@@ -19,7 +19,8 @@ enum ActiveState { + Authorized, //已授权 + AuthorizedLapse, //授权失效 + TrialAuthorized, //试用期已授权 +- TrialExpired //试用期已过期 ++ TrialExpired, //试用期已过期 ++ FreeLicenseAuthorized = 5 //商业免费授权 + }; + + class SystemInfoModel : public QObject +diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +index 7c6c1b5..771bb57 100644 +--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp ++++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +@@ -357,6 +357,10 @@ void NativeInfoWidget::setLicenseState(ActiveState state) + m_authorized->setValue(tr("Trial expired")); + m_authorized->setValueForegroundRole(QColor(255, 87, 54)); + m_authorized->setButtonText(tr("Activate")); ++ } else if (state == FreeLicenseAuthorized) { ++ m_authorized->setValue(tr("Free license")); ++ m_authorized->setValueForegroundRole(QColor(21, 187, 24)); ++ m_authorized->setButtonText(tr("View")); + } + } + +diff --git a/translations/dde-control-center_zh_CN.ts b/translations/dde-control-center_zh_CN.ts +index 2ce90ac..3d5e66b 100644 +--- a/translations/dde-control-center_zh_CN.ts ++++ b/translations/dde-control-center_zh_CN.ts +@@ -4511,6 +4511,11 @@ + Activate + 激活 + ++ ++ ++ Free license ++ 免费授权 ++ + + + Kernel +@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a + 控制中心提供操作系统的所有设置选项。 + + +- +\ No newline at end of file ++ +diff --git a/translations/dde-control-center_zh_HK.ts b/translations/dde-control-center_zh_HK.ts +index 9ba8c3a..2adaccd 100644 +--- a/translations/dde-control-center_zh_HK.ts ++++ b/translations/dde-control-center_zh_HK.ts +@@ -4511,6 +4511,11 @@ + Activate + 啟用 + ++ ++ ++ Free license ++ 免費授權 ++ + + + Kernel +@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a + 控制中心提供操作系統的所有設置選項。 + + +- +\ No newline at end of file ++ +diff --git a/translations/dde-control-center_zh_TW.ts b/translations/dde-control-center_zh_TW.ts +index 23f6817..de875ec 100644 +--- a/translations/dde-control-center_zh_TW.ts ++++ b/translations/dde-control-center_zh_TW.ts +@@ -4511,6 +4511,11 @@ + Activate + 啟用 + ++ ++ ++ Free license ++ 免費授權 ++ + + + Kernel +@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a + 《控制中心》提供系統設定選項。 + + +- +\ No newline at end of file ++ +-- +2.20.1 + diff --git a/0008-dde-control-center-feat-hidden-power-press-powerbtn.patch b/0008-dde-control-center-feat-hidden-power-press-powerbtn.patch new file mode 100644 index 0000000000000000000000000000000000000000..f00964b65f0c71d21031d7c6c7a5ad5ee65da7f0 --- /dev/null +++ b/0008-dde-control-center-feat-hidden-power-press-powerbtn.patch @@ -0,0 +1,25 @@ +From 9f8b031614a9c29a57dd0ad97ef672453c9e4442 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Wed, 1 Mar 2023 14:19:19 +0800 +Subject: [PATCH] feat: hidden power-press-powerbtn + +--- + com.deepin.dde.control-center.gschema.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/com.deepin.dde.control-center.gschema.xml b/com.deepin.dde.control-center.gschema.xml +index c6e1d49..58bd4c1 100644 +--- a/com.deepin.dde.control-center.gschema.xml ++++ b/com.deepin.dde.control-center.gschema.xml +@@ -212,7 +212,7 @@ + default is Enabled + + +- 'Enabled' ++ 'Hidden' + change power press powerbtn status + default is Enabled + +-- +2.20.1 + diff --git a/0009-dde-control-center-feat-modify-copyright-read-current-year.patch b/0009-dde-control-center-feat-modify-copyright-read-current-year.patch new file mode 100644 index 0000000000000000000000000000000000000000..73a7e9d7a6737d2f44f84c73927c656aeb7d23f2 --- /dev/null +++ b/0009-dde-control-center-feat-modify-copyright-read-current-year.patch @@ -0,0 +1,28 @@ +From 77e3cdac535359ec5e6f013702653675ab448d80 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Wed, 8 Mar 2023 11:21:10 +0800 +Subject: [PATCH] feat: modify copyright read current year + +--- + src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +index 771bb57..3ba9b1f 100644 +--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp ++++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +@@ -371,9 +371,9 @@ const QString NativeInfoWidget::systemCopyright() const + + if (oem_copyright.isEmpty()) { + if (DSysInfo::isCommunityEdition()) +- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(2022); ++ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(QString(__DATE__).right(4)); + else +- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(2022); ++ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(QString(__DATE__).right(4)); + } else { + return oem_copyright; + } +-- +2.20.1 + diff --git a/README.md b/README.md deleted file mode 100644 index 1fa98e56ded55f4c171db20feb82b1fdad4f53f8..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Anolis OS -======================================= -# 代码仓库说明 -## 分支说明 ->进行代码开发工作时,请注意选择当前版本对应的分支 -* aX分支为对应大版本的主分支,如a8分支对应当前最新版本 -* aX.Y分支为对应小版本的维护分支,如a8.2分支对应8.2版本 -## 开发流程 -1. 首先fork目标分支到自己的namespace -2. 在自己的fork分支上做出修改 -3. 向对应的仓库中提交merge request,源分支为fork分支 - diff --git a/dde-control-center-5.5.182.tar.gz b/dde-control-center-5.5.182.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..28663ee94e4bbe1d657e7fc2d137b649e8db8f17 Binary files /dev/null and b/dde-control-center-5.5.182.tar.gz differ diff --git a/dde-control-center.spec b/dde-control-center.spec new file mode 100644 index 0000000000000000000000000000000000000000..24ad00a23648298c4cd2db8dcd6ca7cf55f60a33 --- /dev/null +++ b/dde-control-center.spec @@ -0,0 +1,194 @@ +Name: dde-control-center +Version: 5.5.182 +Release: 9%{?dist} +Summary: New control center for Linux Deepin +License: GPLv3 +URL: https://github.com/linuxdeepin/%{name} +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +#add by uos +Patch0001: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch +# uel qt5 don't support +Patch0002: 0002-dde-control-center-delete-keyboard-wayland.patch +# activate butten +Patch0003: 0003-dde-control-center-uos-open-activate-button-for-1050.patch +# disable windowmoveswitch +Patch0004: 0004-dde-control-center-disable-windowmoveswitch.patch +# add setVersion +Patch0005: 0005-dde-control-center-feat-add-setVersion.patch +# uelc hide commoninfo +Patch0006: 0006-dde-control-center-feat-hide-commoninfo.patch +# add Free-license +Patch0007: 0007-dde-control-center-uos-add-Free-license.patch +# hidden power-press-powerbtn +Patch0008: 0008-dde-control-center-feat-hidden-power-press-powerbtn.patch +# modify copyright read current year +Patch0009: 0009-dde-control-center-feat-modify-copyright-read-current-year.patch +Patch0010: 0001-feat-root.patch +#end + +BuildRequires: gcc-c++ +BuildRequires: desktop-file-utils +BuildRequires: dde-dock-devel +BuildRequires: dde-network-core-devel +BuildRequires: dtkwidget-devel +BuildRequires: dtkgui-devel dtkcore-devel +BuildRequires: dde-qt-dbus-factory-devel +BuildRequires: pkgconfig(gsettings-qt) +BuildRequires: pkgconfig(geoip) +BuildRequires: pkgconfig(libnm) +BuildRequires: libpwquality-devel +BuildRequires: qt5-devel +BuildRequires: pkgconfig(xcb-ewmh) +BuildRequires: kf5-networkmanager-qt-devel +BuildRequires: udisks2-qt5-devel +BuildRequires: qt5-linguist +BuildRequires: cmake +BuildRequires: libXext-devel +BuildRequires: gtest-devel +BuildRequires: polkit-qt5-1-devel +BuildRequires: deepin-pw-check +BuildRequires: deepin-pw-check-devel +BuildRequires: pkgconfig(wayland-client) +BuildRequires: kf5-kwayland-devel +BuildRequires: qt5-qtbase-static +BuildRequires: libxkbcommon-devel +BuildRequires: pkgconfig(wayland-client) +BuildRequires: kf5-kwayland-devel +BuildRequires: qt5-qtbase-static +BuildRequires: libxkbcommon-devel +BuildRequires: dareader-devel +BuildRequires: qt5-qtbase-private-devel + +Requires: dde-account-faces +Requires: dde-api +Requires: dde-daemon +Requires: dde-qt5integration +Requires: dde-network-core +Requires: startdde +Requires: dde-server-industry-config +Requires: deepin-pw-check +Requires: NetworkManager-l2tp +Requires: cracklib + +%description +New control center for Linux Deepin. + +%package devel +Summary: %{summary} + +%description devel +%{summary}. + +%prep +%setup -q -n %{name}-%{version} +%patch0001 -p1 +%if 0%{?openeuler} +%patch0002 -p1 +%endif +%patch0003 -p1 +%patch0004 -p1 +%patch0005 -p1 +%patch0006 -p1 +%patch0007 -p1 +%patch0008 -p1 +%patch0009 -p1 +%patch0010 -p1 +sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh +sed -i -E '/add_compile_definitions/d' CMakeLists.txt + +%build +%cmake . -DDCC_DISABLE_GRUB=YES \ + -DCVERSION=%{version} \ + -DDISABLE_SYS_UPDATE=YES \ + -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} +%make_build + +%post +## create-cracklib-dict /usr/share/dict/MainEnglishDictionary_ProbWL.txt + +%postun +## if [ "$1" = "0" ] ; then +## create-cracklib-dict /usr/share/dict/MainEnglishDictionary_ProbWL.txt +## fi + +%install +%make_install INSTALL_ROOT=%{buildroot} +# place holder plugins dir +mkdir -p %{buildroot}%{_libdir}/%{name}/plugins +# https://github.com/linuxdeepin/dde-control-center/issues/115 +# And we disabled SYS_UPDATE, so reboot-reminder-dialog is useless. +#rm %{buildroot}%{_bindir}/reboot-reminder-dialog +%ifnarch %{ix86} +mv %{buildroot}/usr/lib/libdccwidgets.so %{buildroot}%{_libdir}/ +%endif +install -Dm644 com.deepin.controlcenter.addomain.policy %{buildroot}%{_datadir}/polkit-1/actions/ + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||: + +%ldconfig_scriptlets + +%files +%doc README.md +%license LICENSE +%{_bindir}/abrecovery +%{_bindir}/dde-control-center +%{_bindir}/dde-control-center-wapper +%{_datadir}/ +%{_libdir}/libdccwidgets.so +%{_prefix}/lib/dde-grand-search-daemon/ +%{_sysconfdir}/xdg/autostart/deepin-ab-recovery.desktop + +%files devel +%{_includedir}/dde-control-center +%{_libdir}/cmake/DdeControlCenter/ + +%changelog +* Sun Apr 23 2023 liweiganga - 5.5.182.4-9 +- feat: 控制中心root用户无法修改其他用户的密码(bugid:191003) + +* Thu Mar 30 2023 mahailiang - 5.5.182.4-8 +- rebuild + +* Wed Mar 08 2023 liweiganga - 5.5.182.4-7 +- feat: modify copyright current year(bugid:189011) + +* Wed Mar 01 2023 liweiganga - 5.5.182.4-6 +- feat: hidden power-press-powerbtn(bugid:189171) + +* Sat Feb 25 2023 mahailiang - 5.5.182.4-5 +- rebuild + +* Thu Feb 16 2023 liweiganga - 5.5.182.4-4 +- feat: add Free license + +* Tue Feb 07 2023 liweiganga - 5.5.182.4-3 +- feat: uelc hide commoninfo + +* Fri Feb 03 2023 liweiganga - 5.5.182.4-2 +- spec: dde-network-utils replace for dde-network-core + +* Thu Feb 02 2023 liweiganga - 5.5.182.4-1.03 +- feat: add setVersion + +* Wed Feb 01 2023 liweiganga - 5.5.182.4-1.02 +- feat: disable windowmoveswitch + +* Wed Jan 18 2023 liweiganga - 5.5.182.4-1.01 +- spec: modify path + +* Fri Jan 06 2023 liweiganga - 5.5.182.4-1 +- update: update to 5.5.182 + +* Tue Nov 01 2022 herengui - 5.4.85.4-1 +- feat: update to 5.4.85.4 + +* Fri Jun 24 2022 Lujun - 5.4.84.7-1.05 +- fix: sync password dictionary(bugid:142197) + +* Thu Jun 23 2022 liweiganga - 5.4.84.7-1.03 +- fix: fix E control center not display User license protocol + +* Mon Jun 13 2022 uoser - 5.4.84.7-1.02 +- Update to 5.4.84.7 +