diff --git a/0002-dde-control-center-delete-keyboard-wayland.patch b/0002-dde-control-center-delete-keyboard-wayland.patch deleted file mode 100644 index 3a75bd49b630b23ffa82eb2e6808d4953378a002..0000000000000000000000000000000000000000 --- a/0002-dde-control-center-delete-keyboard-wayland.patch +++ /dev/null @@ -1,1461 +0,0 @@ -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/0006-dde-control-center-feat-hide-commoninfo.patch b/0006-dde-control-center-feat-hide-commoninfo.patch deleted file mode 100644 index 4a5a333bfff371b70b4da2825c26d2de653d31df..0000000000000000000000000000000000000000 --- a/0006-dde-control-center-feat-hide-commoninfo.patch +++ /dev/null @@ -1,25 +0,0 @@ -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/0011-hide-activate-function.patch b/0011-hide-activate-function.patch new file mode 100644 index 0000000000000000000000000000000000000000..c6a2e668fef359b040adf2b36c9d2a39ab375d57 --- /dev/null +++ b/0011-hide-activate-function.patch @@ -0,0 +1,634 @@ +From 4815b66c57916eaa17fa66d97211db1bc27eb411 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Thu, 7 Sep 2023 09:33:11 +0800 +Subject: [PATCH] hide activate function + +--- + src/frame/CMakeLists.txt | 1 + + .../modules/systeminfo/systeminfomodel.cpp | 4 ++++ + .../modules/systeminfo/systeminfomodel.h | 12 +++++++++++ + .../modules/systeminfo/systeminfowork.cpp | 8 ++++++- + src/frame/modules/systeminfo/systeminfowork.h | 4 ++++ + src/frame/modules/update/updatemodel.cpp | 4 ++++ + src/frame/modules/update/updatemodel.h | 6 ++++++ + src/frame/modules/update/updatework.cpp | 4 ++++ + src/frame/modules/update/updatework.h | 4 ++++ + .../modules/systeminfo/nativeinfowidget.cpp | 14 +++++++++++++ + .../modules/systeminfo/nativeinfowidget.h | 6 ++++++ + .../modules/systeminfo/systeminfomodule.cpp | 2 ++ + .../modules/update/updatectrlwidget.cpp | 21 ++++++++++++++++++- + .../window/modules/update/updatectrlwidget.h | 6 ++++++ + .../window/modules/update/updatemodule.cpp | 4 +++- + 15 files changed, 97 insertions(+), 3 deletions(-) + +diff --git a/src/frame/CMakeLists.txt b/src/frame/CMakeLists.txt +index a5c64d0..288ef7f 100644 +--- a/src/frame/CMakeLists.txt ++++ b/src/frame/CMakeLists.txt +@@ -28,6 +28,7 @@ endif() + + + set(DEFINED_LIST ++DISABLE_ACTIVATOR + DISABLE_OPACITY_ANIMATION + DISABLE_CLOUD_SYNC + DISABLE_SYS_UPDATE +diff --git a/src/frame/modules/systeminfo/systeminfomodel.cpp b/src/frame/modules/systeminfo/systeminfomodel.cpp +index 4965879..3488577 100644 +--- a/src/frame/modules/systeminfo/systeminfomodel.cpp ++++ b/src/frame/modules/systeminfo/systeminfomodel.cpp +@@ -39,7 +39,9 @@ SystemInfoModel::SystemInfoModel(QObject *parent) + , m_themeEnabled(false) + , m_updating(false) + , m_type(64) ++#ifndef DISABLE_ACTIVATOR + , m_licenseState(ActiveState::Unauthorized) ++#endif + { + + } +@@ -206,6 +208,7 @@ void SystemInfoModel::setKernel(const QString &kernel) + kernelChanged(kernel); + } + ++#ifndef DISABLE_ACTIVATOR + void SystemInfoModel::setLicenseState(ActiveState state) + { + if (m_licenseState != state) { +@@ -213,6 +216,7 @@ void SystemInfoModel::setLicenseState(ActiveState state) + Q_EMIT licenseStateChanged(state); + } + } ++#endif + + } + } +diff --git a/src/frame/modules/systeminfo/systeminfomodel.h b/src/frame/modules/systeminfo/systeminfomodel.h +index 401c76f..0c7006c 100644 +--- a/src/frame/modules/systeminfo/systeminfomodel.h ++++ b/src/frame/modules/systeminfo/systeminfomodel.h +@@ -13,6 +13,7 @@ namespace systeminfo{ + + // !!! 不要用C++11的前置声明枚举类型,这里lupdate命令有个bug.具体见 + // https://stackoverflow.com/questions/6504902/lupdate-error-qualifying-with-unknown-namespace-class ++#ifndef DISABLE_ACTIVATOR + //授权状态 + enum ActiveState { + Unauthorized = 0, //未授权 +@@ -22,6 +23,7 @@ enum ActiveState { + TrialExpired, //试用期已过期 + FreeLicenseAuthorized = 5 //商业免费授权 + }; ++#endif + + class SystemInfoModel : public QObject + { +@@ -45,7 +47,9 @@ public: + QString kernel() const { return m_kernel;} + QString hostName() const { return m_hostName;} + ++#ifndef DISABLE_ACTIVATOR + inline ActiveState licenseState() const { return m_licenseState; } ++#endif + + bool bootDelay() const; + bool themeEnabled() const { return m_themeEnabled; } +@@ -70,7 +74,9 @@ Q_SIGNALS: + void memoryChanged(const QString& memory); + void diskChanged(const QString& disk); + void kernelChanged(const QString& kernel); ++#ifndef DISABLE_ACTIVATOR + void licenseStateChanged(ActiveState state); ++#endif + void hostNameChanged(const QString& hostName); + void setHostNameChanged(const QString& hostName); + void setHostNameError(const QString& error); +@@ -90,7 +96,9 @@ public Q_SLOTS: + void setMemory(qulonglong totalMemory, qulonglong installedMemory); + void setDisk(qulonglong disk); + void setKernel(const QString &kernel); ++#ifndef DISABLE_ACTIVATOR + void setLicenseState(ActiveState state); ++#endif + void setHostName(const QString& hostName); + + private: +@@ -112,12 +120,16 @@ private: + QString m_disk; + QString m_kernel; + QString m_hostName; ++#ifndef DISABLE_ACTIVATOR + ActiveState m_licenseState; ++#endif + }; + + } + } + ++#ifndef DISABLE_ACTIVATOR + Q_DECLARE_METATYPE(dcc::systeminfo::ActiveState); ++#endif + + #endif // SYSTEMINFOMODEL_H +diff --git a/src/frame/modules/systeminfo/systeminfowork.cpp b/src/frame/modules/systeminfo/systeminfowork.cpp +index 5b1ce99..e0465d2 100644 +--- a/src/frame/modules/systeminfo/systeminfowork.cpp ++++ b/src/frame/modules/systeminfo/systeminfowork.cpp +@@ -90,12 +90,14 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent) + m_dbusGrubTheme->setSync(false, false); + m_dbusHostName->setSync(false, false); + ++#ifndef DISABLE_ACTIVATOR + if (DSysInfo::isDeepin()) { + QDBusConnection::systemBus().connect("com.deepin.license", "/com/deepin/license/Info", + "com.deepin.license.Info", "LicenseStateChange", + this, SLOT(licenseStateChangeSlot())); + licenseStateChangeSlot(); + } ++#endif + + connect(m_dbusGrub, &GrubDbus::DefaultEntryChanged, m_model, &SystemInfoModel::setDefaultEntry); + connect(m_dbusGrub, &GrubDbus::EnableThemeChanged, m_model, &SystemInfoModel::setThemeEnabled); +@@ -139,7 +141,9 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent) + + void SystemInfoWork::activate() + { ++#ifndef DISABLE_ACTIVATOR + qRegisterMetaType("ActiveState"); ++#endif + m_model->setDistroID(m_systemInfoInter->distroID()); + m_model->setDistroVer(m_systemInfoInter->distroVer()); + m_model->setDisk(m_systemInfoInter->diskCap()); +@@ -320,6 +324,7 @@ void SystemInfoWork::setBackground(const QString &path) + #endif + } + ++#ifndef DISABLE_ACTIVATOR + void SystemInfoWork::showActivatorDialog() + { + QDBusInterface activator("com.deepin.license.activator", +@@ -338,6 +343,7 @@ void SystemInfoWork::licenseStateChangeSlot() + QFuture future = QtConcurrent::run(this, &SystemInfoWork::getLicenseState); + watcher->setFuture(future); + } ++#endif + + void SystemInfoWork::getEntryTitles() + { +@@ -399,6 +405,7 @@ void SystemInfoWork::getLicenseState() + qDebug() << "authorize result:" << reply; + m_model->setLicenseState(reply); + } ++#endif + + unsigned int SystemInfoWork::getLicenseAuthorizationProperty() + { +@@ -414,7 +421,6 @@ unsigned int SystemInfoWork::getLicenseAuthorizationProperty() + + return licenseInfo.property("AuthorizationProperty").value(); + } +-#endif + + } + } +diff --git a/src/frame/modules/systeminfo/systeminfowork.h b/src/frame/modules/systeminfo/systeminfowork.h +index 284a6a5..b9887f5 100644 +--- a/src/frame/modules/systeminfo/systeminfowork.h ++++ b/src/frame/modules/systeminfo/systeminfowork.h +@@ -50,15 +50,19 @@ public Q_SLOTS: + void grubServerFinished(); + void onBackgroundChanged(); + void setBackground(const QString &path); ++#ifndef DISABLE_ACTIVATOR + void showActivatorDialog(); + void licenseStateChangeSlot(); ++#endif + void processChanged(QDBusMessage msg); + void onLicenseAuthorizationProperty(void); + + private: + void getEntryTitles(); + void getBackgroundFinished(QDBusPendingCallWatcher *w); ++#ifndef DISABLE_ACTIVATOR + void getLicenseState(); ++#endif + unsigned int getLicenseAuthorizationProperty(); + + private: +diff --git a/src/frame/modules/update/updatemodel.cpp b/src/frame/modules/update/updatemodel.cpp +index a01e711..fe2c45b 100644 +--- a/src/frame/modules/update/updatemodel.cpp ++++ b/src/frame/modules/update/updatemodel.cpp +@@ -64,7 +64,9 @@ UpdateModel::UpdateModel(QObject *parent) + , m_bRecoverRestoring(false) + , m_systemVersionInfo(QString()) + , m_metaEnum(QMetaEnum::fromType()) ++#ifndef DISABLE_ACTIVATOR + , m_bSystemActivation(UiActiveState::Unknown) ++#endif + , m_lastCheckUpdateTime(QString()) + , m_autoCheckUpdateCircle(0) + , m_testingChannelServer(QString()) +@@ -411,6 +413,7 @@ void UpdateModel::setSystemVersionInfo(const QString &systemVersionInfo) + Q_EMIT systemVersionChanged(systemVersionInfo); + } + ++#ifndef DISABLE_ACTIVATOR + void UpdateModel::setSystemActivation(const UiActiveState &systemactivation) + { + if (m_bSystemActivation == systemactivation) { +@@ -420,6 +423,7 @@ void UpdateModel::setSystemActivation(const UiActiveState &systemactivation) + + Q_EMIT systemActivationChanged(systemactivation); + } ++#endif + + void UpdateModel::isUpdatablePackages(bool isUpdatablePackages) + { +diff --git a/src/frame/modules/update/updatemodel.h b/src/frame/modules/update/updatemodel.h +index 6187b89..f4189fb 100644 +--- a/src/frame/modules/update/updatemodel.h ++++ b/src/frame/modules/update/updatemodel.h +@@ -164,8 +164,10 @@ public: + + bool getIsRecoveryBackingup(UpdatesStatus state) const; + ++#ifndef DISABLE_ACTIVATOR + inline UiActiveState systemActivation() const {return m_bSystemActivation;} + void setSystemActivation(const UiActiveState &systemactivation); ++#endif + + inline bool getUpdatablePackages() const {return m_isUpdatablePackages;} + void isUpdatablePackages(bool isUpdatablePackages); +@@ -282,7 +284,9 @@ Q_SIGNALS: + void recoverConfigValidChanged(bool recoverConfigValid); + void recoverRestoringChanged(bool recoverRestoring); + void systemVersionChanged(QString version); ++#ifndef DISABLE_ACTIVATOR + void systemActivationChanged(UiActiveState systemactivation); ++#endif + void beginCheckUpdate(); + void updateCheckUpdateTime(); + void updateHistoryAppInfos(); +@@ -334,7 +338,9 @@ private: + bool m_bRecoverRestoring; + QString m_systemVersionInfo; + QMetaEnum m_metaEnum; ++#ifndef DISABLE_ACTIVATOR + UiActiveState m_bSystemActivation; ++#endif + + QString m_lastCheckUpdateTime; //上次检查更新时间 + QList m_historyAppInfos; //历史更新应用列表 +diff --git a/src/frame/modules/update/updatework.cpp b/src/frame/modules/update/updatework.cpp +index ffda8a3..8a64560 100644 +--- a/src/frame/modules/update/updatework.cpp ++++ b/src/frame/modules/update/updatework.cpp +@@ -221,6 +221,7 @@ void UpdateWorker::init() + #endif + } + ++#ifndef DISABLE_ACTIVATOR + void UpdateWorker::licenseStateChangeSlot() + { + QFutureWatcher *watcher = new QFutureWatcher(); +@@ -248,6 +249,7 @@ void UpdateWorker::getLicenseState() + qDebug() << "Authorization State:" << reply; + m_model->setSystemActivation(reply); + } ++#endif + + void UpdateWorker::activate() + { +@@ -300,11 +302,13 @@ void UpdateWorker::activate() + refreshMirrors(); + #endif + ++#ifndef DISABLE_ACTIVATOR + licenseStateChangeSlot(); + + QDBusConnection::systemBus().connect("com.deepin.license", "/com/deepin/license/Info", + "com.deepin.license.Info", "LicenseStateChange", + this, SLOT(licenseStateChangeSlot())); ++#endif + + QFutureWatcher> *packagesWatcher = new QFutureWatcher>(); + connect(packagesWatcher, &QFutureWatcher::finished, this, [ = ] { +diff --git a/src/frame/modules/update/updatework.h b/src/frame/modules/update/updatework.h +index 7610383..a34ef72 100644 +--- a/src/frame/modules/update/updatework.h ++++ b/src/frame/modules/update/updatework.h +@@ -85,7 +85,9 @@ public: + void setOnBattery(bool onBattery); + void setBatteryPercentage(const BatteryPercentageInfo &info); + void setSystemBatteryPercentage(const double &value); ++#ifndef DISABLE_ACTIVATOR + void getLicenseState(); ++#endif + + void setSysUpdateDownloadJobName(const QString &sysUpdateDownloadJobName); + void setSafeUpdateDownloadJobName(const QString &safeUpdateDownloadJobName); +@@ -127,7 +129,9 @@ public Q_SLOTS: + void recoveryStartRestore(); + void onRecoveryBackupFinshed(const QString &kind, const bool success, const QString &errMsg); + ++#ifndef DISABLE_ACTIVATOR + void licenseStateChangeSlot(); ++#endif + void refreshHistoryAppsInfo(); + void refreshLastTimeAndCheckCircle(); + void setUpdateNotify(const bool notify); +diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +index 3ba9b1f..02fc1ca 100644 +--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp ++++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp +@@ -84,7 +84,9 @@ NativeInfoWidget::NativeInfoWidget(SystemInfoModel *model, QWidget *parent) + + NativeInfoWidget::~NativeInfoWidget() + { ++#ifndef DISABLE_ACTIVATOR + GSettingWatcher::instance()->erase("systeminfoNativeinfoAuthorized", m_authorized); ++#endif + GSettingWatcher::instance()->erase("systeminfoNativeinfoKernel", m_kernel); + GSettingWatcher::instance()->erase("systeminfoNativeinfoProcessor", m_processor); + GSettingWatcher::instance()->erase("systeminfoNativeinfoMemory", m_memory); +@@ -195,6 +197,7 @@ void NativeInfoWidget::initWidget() + //~ child_page About This PC + m_type->setTitle(tr("Type") + ':'); + ++#ifndef DISABLE_ACTIVATOR + m_authorized = new TitleAuthorizedItem(frame); + //~ contents_path /systeminfo/About This PC + //~ child_page About This PC +@@ -208,6 +211,7 @@ void NativeInfoWidget::initWidget() + m_authorized->setVisable(true); + }*/ + m_authorized->setVisable(true); ++#endif + + m_kernel = new TitleValueItem(frame); + //~ contents_path /systeminfo/About This PC +@@ -227,7 +231,9 @@ void NativeInfoWidget::initWidget() + m_memory->setTitle(tr("Memory") + ':'); + m_memory->setValue(m_model->memory()); + ++#ifndef DISABLE_ACTIVATOR + GSettingWatcher::instance()->bind("systeminfoNativeinfoAuthorized", m_authorized); ++#endif + GSettingWatcher::instance()->bind("systeminfoNativeinfoKernel", m_kernel); + GSettingWatcher::instance()->bind("systeminfoNativeinfoProcessor", m_processor); + GSettingWatcher::instance()->bind("systeminfoNativeinfoMemory", m_memory); +@@ -240,9 +246,11 @@ void NativeInfoWidget::initWidget() + } + infoGroup->appendItem(m_version, SettingsGroup::ItemBackground); + infoGroup->appendItem(m_type); ++#ifndef DISABLE_ACTIVATOR + if (!DSysInfo::isCommunityEdition()) + infoGroup->appendItem(m_authorized); + m_authorized->setVisible(!DSysInfo::isCommunityEdition()); ++#endif + infoGroup->appendItem(m_kernel); + infoGroup->appendItem(m_processor); + infoGroup->appendItem(m_memory); +@@ -273,13 +281,17 @@ void NativeInfoWidget::initWidget() + connect(m_model, &SystemInfoModel::processorChanged, this, &NativeInfoWidget::setProcessor); + connect(m_model, &SystemInfoModel::memoryChanged, this, &NativeInfoWidget::setMemory); + ++#ifndef DISABLE_ACTIVATOR + //传递button的点击信号 + connect(m_authorized, &TitleAuthorizedItem::clicked, this, &NativeInfoWidget::clickedActivator); + connect(m_model, &SystemInfoModel::licenseStateChanged, this, &NativeInfoWidget::setLicenseState); ++#endif + + setType(m_model->type()); + ++#ifndef DISABLE_ACTIVATOR + setLicenseState(m_model->licenseState()); ++#endif + } + + void NativeInfoWidget::resizeEvent(QResizeEvent *event) +@@ -335,6 +347,7 @@ void NativeInfoWidget::setMemory(const QString &memory) + m_memory->setValue(memory); + } + ++#ifndef DISABLE_ACTIVATOR + void NativeInfoWidget::setLicenseState(ActiveState state) + { + if (state == Authorized) { +@@ -363,6 +376,7 @@ void NativeInfoWidget::setLicenseState(ActiveState state) + m_authorized->setButtonText(tr("View")); + } + } ++#endif + + const QString NativeInfoWidget::systemCopyright() const + { +diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.h b/src/frame/window/modules/systeminfo/nativeinfowidget.h +index 8dea9d7..699c2f4 100644 +--- a/src/frame/window/modules/systeminfo/nativeinfowidget.h ++++ b/src/frame/window/modules/systeminfo/nativeinfowidget.h +@@ -63,7 +63,9 @@ public Q_SLOTS: + void setType(const QString &type); + void setProcessor(const QString &processor); + void setMemory(const QString &memory); ++#ifndef DISABLE_ACTIVATOR + void setLicenseState(dcc::systeminfo::ActiveState state); ++#endif + + void onToolButtonButtonClicked(); + void onFocusChanged(const bool onFocus); +@@ -74,7 +76,9 @@ public Q_SLOTS: + void onSetHostNameError(const QString &error); + + Q_SIGNALS: ++#ifndef DISABLE_ACTIVATOR + void clickedActivator(); ++#endif + + protected: + void resizeEvent(QResizeEvent *event) override; +@@ -92,7 +96,9 @@ private: + dcc::widgets::TitleValueItem *m_versionNumber; + dcc::widgets::TitleValueItem *m_version; + dcc::widgets::TitleValueItem *m_type; ++#ifndef DISABLE_ACTIVATOR + dcc::widgets::TitleAuthorizedItem *m_authorized; ++#endif + dcc::widgets::TitleValueItem *m_kernel; + dcc::widgets::TitleValueItem *m_processor; + dcc::widgets::TitleValueItem *m_memory; +diff --git a/src/frame/window/modules/systeminfo/systeminfomodule.cpp b/src/frame/window/modules/systeminfo/systeminfomodule.cpp +index ba7444a..3d4a4d4 100644 +--- a/src/frame/window/modules/systeminfo/systeminfomodule.cpp ++++ b/src/frame/window/modules/systeminfo/systeminfomodule.cpp +@@ -254,7 +254,9 @@ void SystemInfoModule::onShowAboutNativePage() + m_frameProxy->pushWidget(this, w); + w->setVisible(true); + //showActivatorDialog ++#ifndef DISABLE_ACTIVATOR + connect(w, &NativeInfoWidget::clickedActivator, m_work, &SystemInfoWork::showActivatorDialog); ++#endif + } + + void SystemInfoModule::onVersionProtocolPage() +diff --git a/src/frame/window/modules/update/updatectrlwidget.cpp b/src/frame/window/modules/update/updatectrlwidget.cpp +index 6285d73..db26368 100644 +--- a/src/frame/window/modules/update/updatectrlwidget.cpp ++++ b/src/frame/window/modules/update/updatectrlwidget.cpp +@@ -51,9 +51,13 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent) + , m_bRecoverBackingUp(false) + , m_bRecoverConfigValid(false) + , m_bRecoverRestoring(false) ++#ifndef DISABLE_ACTIVATOR + , m_activeState(UiActiveState::Unknown) ++#endif + , m_updateList(new ContentWidget(parent)) ++#ifndef DISABLE_ACTIVATOR + , m_authorizationPrompt(new TipsLabel(parent)) ++#endif + , m_isUpdateingAll(false) + , m_checkUpdateBtn(new QPushButton(parent)) + , m_lastCheckTimeTip(new TipsLabel(parent)) +@@ -94,11 +98,15 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent) + m_fullProcess->setVisible(false); + m_fullProcess->setProcessValue(100); + ++#ifndef DISABLE_ACTIVATOR + m_authorizationPrompt->setText(tr("Your system is not authorized, please activate first")); + m_authorizationPrompt->setAlignment(Qt::AlignHCenter); + m_authorizationPrompt->setVisible(false); ++#endif + fullProcesslayout->addWidget(m_fullProcess); ++#ifndef DISABLE_ACTIVATOR + fullProcesslayout->addWidget(m_authorizationPrompt); ++#endif + + m_powerTip->setWordWrap(true); + m_powerTip->setAlignment(Qt::AlignHCenter); +@@ -290,7 +298,9 @@ void UpdateCtrlWidget::setShowInfo(const UiActiveState value) + } + + m_fullProcess->setEnabled(activation); ++#ifndef DISABLE_ACTIVATOR + m_authorizationPrompt->setVisible(UpdatesStatus::UpdatesAvailable == m_model->status() && !activation); ++#endif + } + + void UpdateCtrlWidget::setStatus(const UpdatesStatus &status) +@@ -298,9 +308,11 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status) + m_status = status; + + qDebug() << "UpdateCtrlWidget::setStatus " << status; ++#ifndef DISABLE_ACTIVATOR + if (m_model->systemActivation() == UiActiveState::Unauthorized || m_model->systemActivation() == UiActiveState::TrialExpired) { + m_status = NoAtive; + } ++#endif + + Q_EMIT notifyUpdateState(m_status); + +@@ -309,7 +321,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status) + m_resultItem->setVisible(false); + m_progress->setVisible(false); + m_fullProcess->setVisible(false); ++#ifndef DISABLE_ACTIVATOR + m_authorizationPrompt->setVisible(false); ++#endif + m_updateList->setVisible(false); + m_upgradeWarningGroup->setVisible(false); + m_reminderTip->setVisible(false); +@@ -430,10 +444,12 @@ void UpdateCtrlWidget::setLowBattery(const bool &lowBattery) + { + if (m_status == UpdatesStatus::Updateing || m_status == UpdatesStatus::UpdatesAvailable) { + bool activation = false; ++#ifndef DISABLE_ACTIVATOR + const UiActiveState value = m_model->systemActivation(); + if (UiActiveState::Authorized == value || UiActiveState::TrialAuthorized == value || UiActiveState::AuthorizedLapse == value) { + activation = true; + } ++#endif + if (lowBattery) { + m_powerTip->setText(tr("Your battery is lower than 50%, please plug in to continue")); + } else { +@@ -481,6 +497,7 @@ void UpdateCtrlWidget::setRecoverRestoring(const bool value) + } + } + ++#ifndef DISABLE_ACTIVATOR + void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate) + { + if (m_activeState != activestate) { +@@ -493,7 +510,7 @@ void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate) + setStatus(m_model->status()); + } + } +- ++#endif + + void UpdateCtrlWidget::setModel(UpdateModel *model) + { +@@ -514,7 +531,9 @@ void UpdateCtrlWidget::setModel(UpdateModel *model) + connect(m_model, &UpdateModel::recoverBackingUpChanged, this, &UpdateCtrlWidget::setRecoverBackingUp); + connect(m_model, &UpdateModel::recoverConfigValidChanged, this, &UpdateCtrlWidget::setRecoverConfigValid); + connect(m_model, &UpdateModel::recoverRestoringChanged, this, &UpdateCtrlWidget::setRecoverRestoring); ++#ifndef DISABLE_ACTIVATOR + connect(m_model, &UpdateModel::systemActivationChanged, this, &UpdateCtrlWidget::setActiveState); ++#endif + connect(m_model, &UpdateModel::classityUpdateJobErrorChanged, this, &UpdateCtrlWidget::onClassityUpdateJonErrorChanged); + + connect(m_model, &UpdateModel::systemUpdateInfoChanged, this, &UpdateCtrlWidget::setSystemUpdateInfo); +diff --git a/src/frame/window/modules/update/updatectrlwidget.h b/src/frame/window/modules/update/updatectrlwidget.h +index 99713c2..a4a9cb1 100644 +--- a/src/frame/window/modules/update/updatectrlwidget.h ++++ b/src/frame/window/modules/update/updatectrlwidget.h +@@ -103,7 +103,9 @@ private: + void setRecoverConfigValid(const bool value); + void setRecoverRestoring(const bool value); + void setShowInfo(const UiActiveState value); ++#ifndef DISABLE_ACTIVATOR + void setActiveState(const UiActiveState &activestate); ++#endif + void showUpdateInfo(); + + void onChangeUpdatesAvailableStatus(); +@@ -135,9 +137,13 @@ private: + bool m_bRecoverBackingUp; + bool m_bRecoverConfigValid; + bool m_bRecoverRestoring; ++#ifndef DISABLE_ACTIVATOR + UiActiveState m_activeState; ++#endif + dcc::ContentWidget *m_updateList; ++#ifndef DISABLE_ACTIVATOR + dcc::widgets::TipsLabel *m_authorizationPrompt; ++#endif + bool m_isUpdateingAll; + + QPushButton *m_checkUpdateBtn; +diff --git a/src/frame/window/modules/update/updatemodule.cpp b/src/frame/window/modules/update/updatemodule.cpp +index 2de16ba..9bf5b9a 100644 +--- a/src/frame/window/modules/update/updatemodule.cpp ++++ b/src/frame/window/modules/update/updatemodule.cpp +@@ -61,7 +61,9 @@ void UpdateModule::preInitialize(bool sync, FrameProxyInterface::PushType pushty + + connect(m_work.get(), &UpdateWorker::requestInit, m_work.get(), &UpdateWorker::init); + connect(m_work.get(), &UpdateWorker::requestActive, m_work.get(), &UpdateWorker::activate); ++#ifndef DISABLE_ACTIVATOR + connect(m_work.get(), &UpdateWorker::requestRefreshLicenseState, m_work.get(), &UpdateWorker::licenseStateChangeSlot); ++#endif + + #ifndef DISABLE_SYS_UPDATE_MIRRORS + connect(m_work.get(), &UpdateWorker::requestRefreshMirrors, m_work.get(), &UpdateWorker::refreshMirrors); +@@ -176,7 +178,7 @@ void UpdateModule::active() + m_updateWidget->setSystemVersion(m_model->systemVersionInfo()); + } + #else +- mainWidget->setSystemVersion(m_model->systemVersionInfo()); ++ m_updateWidget->setSystemVersion(m_model->systemVersionInfo()); + #endif + + m_frameProxy->pushWidget(this, m_updateWidget); +-- +2.20.1 + diff --git a/dde-control-center.spec b/dde-control-center.spec index 71177735fb690ed681000afb2ef8dbb99778cdfd..2a8db5d0653275076b6b5bb0319463087f065763 100644 --- a/dde-control-center.spec +++ b/dde-control-center.spec @@ -1,7 +1,7 @@ %define __cmake_builddir $(pwd) Name: dde-control-center Version: 5.5.182 -Release: 4 +Release: 8 Summary: New control center for Linux Deepin License: GPLv3 URL: https://github.com/linuxdeepin/dde-control-center @@ -26,6 +26,8 @@ Patch0009: 0009-dde-control-center-feat-modify-copyright-read-current-year. Patch0010: 0001-feat-root.patch # pms 204145 Patch0011: 0010-fix-Array-out-of-bounds-causes-crash-handling.patch +# hide activate +Patch0012: 0011-hide-activate-function.patch #end #Patch0: 0002-hide-authorized.patch @@ -36,9 +38,8 @@ Patch0011: 0010-fix-Array-out-of-bounds-causes-crash-handling.patch BuildRequires: gcc-c++ BuildRequires: desktop-file-utils -#BuildRequires: dde-dock-devel -#BuildRequires: dde-network-core-devel -#BuildRequires: dde-network-utils-devel +BuildRequires: dde-dock-devel +BuildRequires: dde-network-core-devel BuildRequires: dtkwidget-devel BuildRequires: dtkgui-devel BuildRequires: dtkcore-devel @@ -73,10 +74,10 @@ BuildRequires: qt5-qtbase-private-devel Requires: dde-account-faces Requires: dde-api -#Requires: dde-daemon +Requires: dde-daemon Requires: dde-qt5integration -#Requires: dde-network-core -#Requires: startdde +Requires: dde-network-core +Requires: startdde Requires: dde-server-industry-config Requires: deepin-pw-check Requires: cracklib @@ -103,6 +104,7 @@ Summary: %{summary} %patch0009 -p1 %patch0010 -p1 %patch0011 -p1 +%patch0012 -p1 sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh sed -i -E '/add_compile_definitions/d' CMakeLists.txt @@ -159,6 +161,18 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||: %{_libdir}/cmake/DdeControlCenter/ %changelog +* Tue Sep 24 2024 songmingliang - 5.5.182-8 +- delete redundant 0002-dde-control-center-delete-keyboard-wayland.patch + +* Fri Sep 06 2024 liuzhilin - 5.5.182-7 +- update BR + +* Thu Sep 05 2024 liuzhilin - 5.5.182-6 +- fix build BR + +* Fri Apr 12 2024 liuzhilin - 5.5.182-5 +- backport del buildrequires + * Wed Apr 10 2024 liuzhilin - 5.5.182-4 - fix dde-network-core build error