diff -Nru kwin-5.24.4/debian/changelog kwin-5.24.4/debian/changelog --- kwin-5.24.4/debian/changelog 2024-09-20 16:59:37.000000000 +0800 +++ kwin-5.24.4/debian/changelog 2025-02-19 11:09:00.000000000 +0800 @@ -1,3 +1,28 @@ +kwin (4:5.24.4-ok11~0219) huanghe; urgency=medium + + * Ignore right button click event on user action menu + + -- Jie Liu <liujie01@kylinos.cn> Wed, 19 Feb 2025 11:09:00 +0800 + +kwin (4:5.24.4-ok11~0107) nile; urgency=medium + + * allow repeated creation of ukui_surface for the same wl_surface + * support for ukui-shell v4 protocols + + -- Jie Liu <liujie01@kylinos.cn> Tue, 07 Jan 2025 14:25:19 +0800 + +kwin (4:5.24.4-ok10~1118) nile; urgency=medium + + * x11client: x11client: enable NET_RESIZE for dock window + + -- Jie Liu <liujie01@kylinos.cn> Mon, 18 Nov 2024 16:10:17 +0800 + +kwin (4:5.24.4-ok10~1107) nile; urgency=medium + + * 代码合并 + + -- zhangshoucheng <zhangshoucheng@kylinos.cn> Thu, 07 Nov 2024 16:14:21 +0800 + kwin (4:5.24.4-ok10~0927) nile; urgency=medium * 更新0920维哈柯翻译文件 diff -Nru kwin-5.24.4/debian/kwin-data.install kwin-5.24.4/debian/kwin-data.install --- kwin-5.24.4/debian/kwin-data.install 2024-09-20 16:59:37.000000000 +0800 +++ kwin-5.24.4/debian/kwin-data.install 2025-02-19 11:09:00.000000000 +0800 @@ -11,3 +11,4 @@ etc/xdg/autostart/kwin.desktop etc/xdg/kwinrulesrc etc/xdg/kcminputrc +etc/xdg/kwinShowShortcut.list diff -Nru kwin-5.24.4/debian/patches/0200-Add-get-modify-block-reset-shortcut-interface.patch kwin-5.24.4/debian/patches/0200-Add-get-modify-block-reset-shortcut-interface.patch --- kwin-5.24.4/debian/patches/0200-Add-get-modify-block-reset-shortcut-interface.patch 1970-01-01 08:00:00.000000000 +0800 +++ kwin-5.24.4/debian/patches/0200-Add-get-modify-block-reset-shortcut-interface.patch 2025-02-19 11:09:00.000000000 +0800 @@ -0,0 +1,496 @@ +From: zhangshoucheng <zhangshoucheng@kylinos.cn> +Date: Mon, 28 Oct 2024 14:04:40 +0800 +Subject: Add: get/modify/block/reset shortcut interface + +--- + data/CMakeLists.txt | 1 + + data/kwinShowShortcut.list | 17 +++++++ + src/dbusinterface.cpp | 111 +++++++++++++++++++++++++++++++++++++++++++++ + src/dbusinterface.h | 5 ++ + src/input.cpp | 5 ++ + src/input.h | 9 ++++ + src/org.kde.KWin.xml | 15 ++++++ + src/tabbox/tabbox.cpp | 6 +++ + src/tabbox/tabbox.h | 2 + + src/useractions.cpp | 19 +++++++- + src/virtualdesktops.cpp | 23 +++++++--- + src/virtualdesktops.h | 2 + + src/workspace.cpp | 2 + + src/workspace.h | 20 ++++++++ + 14 files changed, 230 insertions(+), 7 deletions(-) + create mode 100644 data/kwinShowShortcut.list + +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index 7bbcfaf..062913f 100644 +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -16,3 +16,4 @@ install(FILES kwinrc DESTINATION /etc/xdg) + install(FILES kwin.desktop DESTINATION /etc/xdg/autostart) + install(FILES kwinrulesrc DESTINATION /etc/xdg) + install(FILES kcminputrc DESTINATION /etc/xdg) ++install(FILES kwinShowShortcut.list DESTINATION /etc/xdg) +diff --git a/data/kwinShowShortcut.list b/data/kwinShowShortcut.list +new file mode 100644 +index 0000000..df29db3 +--- /dev/null ++++ b/data/kwinShowShortcut.list +@@ -0,0 +1,17 @@ ++Show/Hide Desktop ++Walk Through Windows ++Multitask View show ++Switch One Desktop to the Left ++Switch One Desktop to the Right ++Minimize All Window ++Unminimize All Window ++Window Close ++Minimize Or Unminimize All Window Besides Active Window ++Window Quick Tile Top ++Window Quick Tile Bottom ++Window Quick Tile Left ++Window Quick Tile Right ++Window Direct Quick Tile Up ++Window Direct Quick Tile Down ++Window Direct Quick Tile Left ++Window Direct Quick Tile Right +\ No newline at end of file +diff --git a/src/dbusinterface.cpp b/src/dbusinterface.cpp +index 2436e57..6e77624 100644 +--- a/src/dbusinterface.cpp ++++ b/src/dbusinterface.cpp +@@ -33,11 +33,17 @@ + #ifdef KWIN_BUILD_ACTIVITIES + #include "activities.h" + #endif ++#ifdef KWIN_BUILD_TABBOX ++#include "tabbox.h" ++#endif + + // Qt + #include <QDBusServiceWatcher> + #include <QOpenGLContext> + ++ ++#include <KGlobalAccel> ++ + namespace KWin + { + +@@ -381,6 +387,111 @@ bool DBusInterface::haveFullScreenActiveWindow() + return false; + } + ++QVariantList DBusInterface::getShortcutInfos() ++{ ++ QVector<Workspace::shortcutInfo> shortcutInfos = workspace()->getShortcutInfos(); ++ QStringList showShortcutInfos = workspace()->getShowShortcutInfos(); ++ QVariantList res; ++ for (auto s : showShortcutInfos) { ++ for (int i = 0; i < shortcutInfos.size(); i++) { ++ QStringList tmp; ++ if (shortcutInfos[i].actionName == s) { ++ tmp.append(shortcutInfos[i].actionName); ++ tmp.append(shortcutInfos[i].description); ++ QList<QKeySequence> keyList = KGlobalAccel::self()->shortcut(shortcutInfos[i].action); ++ if (keyList.isEmpty()) { ++ QList<QKeySequence> defaultKeyList = KGlobalAccel::self()->defaultShortcut(shortcutInfos[i].action); ++ for (int j = 0; j < defaultKeyList.size(); j++) { ++ tmp.append("Null"); ++ } ++ } else { ++ for (int j = 0; j < keyList.size(); j++) { ++ if (keyList[j].toString() == "") { ++ tmp.append("Null"); ++ } else { ++ tmp.append(keyList[j].toString()); ++ } ++ } ++ QList<QKeySequence> defaultKeyList = KGlobalAccel::self()->defaultShortcut(shortcutInfos[i].action); ++ if (defaultKeyList.size() != keyList.size()) { ++ for (int j = 0; j < defaultKeyList.size() - keyList.size(); j++) { ++ tmp.append("Null"); ++ } ++ } ++ } ++ res.append(tmp); ++ } ++ } ++ } ++ return res; ++} ++ ++void DBusInterface::modifyShortcut(QString actionName, QString oldKey, QString newKey) ++{ ++ QAction *a = nullptr; ++ QList<QKeySequence> defaultShortcut; ++ QList<QKeySequence> keyList; ++ QVector<Workspace::shortcutInfo> shortcutInfos = workspace()->getShortcutInfos(); ++ for (int i = 0; i < shortcutInfos.size(); i++) { ++ if (shortcutInfos[i].actionName == actionName) { ++ a = shortcutInfos[i].action; ++ defaultShortcut = shortcutInfos[i].defaultShortcut; ++ keyList = KGlobalAccel::self()->shortcut(shortcutInfos[i].action); ++ break; ++ } ++ } ++ ++ for (int i = 0; i < keyList.size(); i++) { ++ if (keyList[i] == QKeySequence(tr(oldKey.toUtf8().constData()))) { ++ keyList[i] = QKeySequence(tr(newKey.toUtf8().constData())); ++ } ++ } ++ ++ if (keyList.isEmpty() && !newKey.isEmpty()) { ++ keyList.push_back(QKeySequence(tr(newKey.toUtf8().constData()))); ++ } ++ ++ KGlobalAccel::self()->removeAllShortcuts(a); ++ ++ KGlobalAccel::self()->setDefaultShortcut(a, defaultShortcut); ++ KGlobalAccel::self()->setShortcut(a, keyList); ++ ++ if (!keyList.isEmpty()) { ++ TabBox::TabBox::self()->updateGlobalShortcut(a, keyList.first()); ++ } ++} ++ ++void DBusInterface::resetShortcut() ++{ ++ // workspace()->readShowShortcutsName(); ++ QStringList showShortcutInfos = workspace()->getShowShortcutInfos(); ++ QVector<Workspace::shortcutInfo> shortcutInfos = workspace()->getShortcutInfos(); ++ for (auto s : showShortcutInfos) { ++ for (int i = 0; i < shortcutInfos.size(); i++) { ++ if (shortcutInfos[i].actionName == s) { ++ KGlobalAccel::self()->removeAllShortcuts(shortcutInfos[i].action); ++ KGlobalAccel::self()->setDefaultShortcut(shortcutInfos[i].action, shortcutInfos[i].defaultShortcut); ++ KGlobalAccel::self()->setShortcut(shortcutInfos[i].action, shortcutInfos[i].defaultShortcut); ++ TabBox::TabBox::self()->updateGlobalShortcut(shortcutInfos[i].action, shortcutInfos[i].defaultShortcut.first()); ++ } ++ } ++ } ++} ++ ++void DBusInterface::blockShortcut(QString actionName, bool flag) ++{ ++ QVector<Workspace::shortcutInfo> shortcutInfos = workspace()->getShortcutInfos(); ++ for (auto info : shortcutInfos) { ++ if (info.actionName == actionName) { ++ if (flag) { ++ KGlobalAccel::self()->removeAllShortcuts(info.action); ++ } else { ++ KGlobalAccel::self()->setShortcut(info.action, info.defaultShortcut); ++ } ++ } ++ } ++} ++ + void DBusInterface::setTapButtonMap(quint32 map) + { + for (InputDevice *inputDevice : input()->devices()) { +diff --git a/src/dbusinterface.h b/src/dbusinterface.h +index b8e571c..9d9cdae 100644 +--- a/src/dbusinterface.h ++++ b/src/dbusinterface.h +@@ -99,6 +99,11 @@ public Q_SLOTS: // METHODS + bool haveFullScreenActiveWindow(); + void setTapButtonMap(quint32 map); + ++ QVariantList getShortcutInfos(); ++ void modifyShortcut(QString actionName, QString oldKey, QString newKey); ++ void resetShortcut(); ++ void blockShortcut(QString actionName, bool flag); ++ + private Q_SLOTS: + void becomeKWinService(const QString &service); + +diff --git a/src/input.cpp b/src/input.cpp +index 0f0d7b0..7d3014f 100644 +--- a/src/input.cpp ++++ b/src/input.cpp +@@ -3484,6 +3484,11 @@ void InputRedirection::registerShortcut(const QKeySequence &shortcut, QAction *a + kwinApp()->platform()->setupActionForGlobalAccel(action); + } + ++void InputRedirection::registerShortcut(const QList<QKeySequence> &shortcut, QAction *action) ++{ ++ kwinApp()->platform()->setupActionForGlobalAccel(action); ++} ++ + void InputRedirection::registerPointerShortcut(Qt::KeyboardModifiers modifiers, Qt::MouseButton pointerButtons, QAction *action) + { + m_shortcuts->registerPointerShortcut(action, modifiers, pointerButtons); +diff --git a/src/input.h b/src/input.h +index cc04526..e1a6017 100644 +--- a/src/input.h ++++ b/src/input.h +@@ -125,6 +125,7 @@ public: + Qt::KeyboardModifiers modifiersRelevantForGlobalShortcuts() const; + + void registerShortcut(const QKeySequence &shortcut, QAction *action); ++ void registerShortcut(const QList<QKeySequence> &shortcut, QAction *action); + /** + * @overload + * +@@ -135,6 +136,8 @@ public: + */ + template<typename T, typename Slot> + void registerShortcut(const QKeySequence &shortcut, QAction *action, T *receiver, Slot slot); ++ template <typename T, typename Slot> ++ void registerShortcut(const QList<QKeySequence> &shortcut, QAction *action, T *receiver, Slot slot); + void registerPointerShortcut(Qt::KeyboardModifiers modifiers, Qt::MouseButton pointerButtons, QAction *action); + void registerAxisShortcut(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis, QAction *action); + void registerTouchpadSwipeShortcut(SwipeDirection direction, QAction *action); +@@ -595,6 +598,12 @@ inline void InputRedirection::registerShortcut(const QKeySequence &shortcut, QAc + connect(action, &QAction::triggered, receiver, slot); + } + ++template <typename T, typename Slot> ++inline void InputRedirection::registerShortcut(const QList<QKeySequence> &shortcut, QAction *action, T *receiver, Slot slot) { ++ registerShortcut(shortcut, action); ++ connect(action, &QAction::triggered, receiver, slot); ++} ++ + } // namespace KWin + + Q_DECLARE_METATYPE(KWin::InputRedirection::KeyboardKeyState) +diff --git a/src/org.kde.KWin.xml b/src/org.kde.KWin.xml +index cedd673..16de10a 100644 +--- a/src/org.kde.KWin.xml ++++ b/src/org.kde.KWin.xml +@@ -78,5 +78,20 @@ + <method name="setTapButtonMap"> + <arg name="map" type="u" direction="in"/> + </method> ++ <method name="modifyShortcut"> ++ <arg name="actionName" type="s" direction="in"/> ++ <arg name="oldKey" type="s" direction="in"/> ++ <arg name="newKey" type="s" direction="in"/> ++ </method> ++ <method name="resetShortcut"> ++ </method> ++ <method name="getShortcutInfos"> ++ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantList"/> ++ <arg type="a{a{s}}" direction="out"/> ++ </method> ++ <method name="blockShortcut"> ++ <arg name="actionName" type="s" direction="in"/> ++ <arg name="flag" type="b" direction="in"/> ++ </method> + </interface> + </node> +diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp +index 082036f..2562bfd 100644 +--- a/src/tabbox/tabbox.cpp ++++ b/src/tabbox/tabbox.cpp +@@ -521,6 +521,7 @@ void TabBox::key(const char *actionName, Slot slot, const QKeySequence &shortcut + a->setText(i18n(actionName)); + KGlobalAccel::self()->setGlobalShortcut(a, QList<QKeySequence>() << shortcut); + input()->registerShortcut(shortcut, a, TabBox::self(), slot); ++ Workspace::self()->addShortcutInfos(actionName, i18n(actionName), a, QList<QKeySequence>() << shortcut); + auto cuts = KGlobalAccel::self()->shortcut(a); + globalShortcutChanged(a, cuts.isEmpty() ? QKeySequence() : cuts.first()); + } +@@ -559,6 +560,11 @@ void TabBox::initShortcuts() + connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &TabBox::globalShortcutChanged); + } + ++void TabBox::updateGlobalShortcut(QAction *action, const QKeySequence &seq) ++{ ++ globalShortcutChanged(action, seq); ++} ++ + void TabBox::globalShortcutChanged(QAction *action, const QKeySequence &seq) + { + if (qstrcmp(qPrintable(action->objectName()), s_windows) == 0) { +diff --git a/src/tabbox/tabbox.h b/src/tabbox/tabbox.h +index 889b9e9..51e0160 100644 +--- a/src/tabbox/tabbox.h ++++ b/src/tabbox/tabbox.h +@@ -275,6 +275,8 @@ public: + return m_showMode; + } + ++ void updateGlobalShortcut(QAction *action, const QKeySequence &seq); ++ + public Q_SLOTS: + /** + * Notify effects that the tab box is being shown, and only display the +diff --git a/src/useractions.cpp b/src/useractions.cpp +index 80ea685..9ac03ef 100644 +--- a/src/useractions.cpp ++++ b/src/useractions.cpp +@@ -47,6 +47,7 @@ + #include <QCheckBox> + #include <QPushButton> + #include <QtConcurrentRun> ++#include <QFile> + + #include <KGlobalAccel> + #include <KLocalizedString> +@@ -911,6 +912,7 @@ void Workspace::initShortcut(const QString &actionName, const QString &descripti + } + KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << shortcut); + KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << shortcut); ++ addShortcutInfos(actionName, description, a, QList<QKeySequence>() << shortcut); + input()->registerShortcut(shortcut, a, receiver, slot); + } + +@@ -1066,7 +1068,7 @@ void Workspace::initShortcuts() + } + // DEF(I18N_NOOP("Window to Next Screen"), Qt::META + Qt::SHIFT + Qt::Key_Right, slotWindowToNextScreen); + // DEF(I18N_NOOP("Window to Previous Screen"), Qt::META + Qt::SHIFT + Qt::Key_Left, slotWindowToPrevScreen); +- DEF(I18N_NOOP("Show Desktop"), Qt::META + Qt::Key_D, slotToggleShowDesktop); ++ DEF(I18N_NOOP("Show/Hide Desktop"), Qt::META + Qt::Key_D, slotToggleShowDesktop); + // DEF(I18N_NOOP("Always Show Desktop"), Qt::META + Qt::Key_H, slotAlwaysShowDesktop); + // DEF(I18N_NOOP("Always Restore Desktop"), Qt::META + Qt::Key_G, slotAlwaysRestoreDesktop); + +@@ -1161,6 +1163,21 @@ void Workspace::clientShortcutUpdated(AbstractClient *c) + } + } + ++void Workspace::readShowShortcutsName() ++{ ++ QFile file("/etc/xdg/kwinShowShortcut.list"); ++ if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { ++ return; ++ } ++ QString res = QString::fromUtf8(file.readAll()); ++ showShortcutsName = res.split("\n"); ++} ++ ++void Workspace::addShortcutInfos(QString actionName, QString description, QAction *action, QList<QKeySequence> shortcut) ++{ ++ shortcutInfos.append({actionName, description, action, shortcut}); ++} ++ + void Workspace::performWindowOperation(AbstractClient *c, Options::WindowOperation op) + { + if (!c) +diff --git a/src/virtualdesktops.cpp b/src/virtualdesktops.cpp +index 2398524..a5840c2 100644 +--- a/src/virtualdesktops.cpp ++++ b/src/virtualdesktops.cpp +@@ -8,6 +8,7 @@ + SPDX-License-Identifier: GPL-2.0-or-later + */ + #include "virtualdesktops.h" ++#include "workspace.h" + #include "input.h" + #include "wayland/plasmavirtualdesktop_interface.h" + // KDE +@@ -842,14 +843,10 @@ void VirtualDesktopManager::initShortcuts() + initSwitchToShortcuts(); + + const QString right = QStringLiteral("Switch One Desktop to the Right"); +- addAction(right, i18n(right.toStdString().c_str()), QKeySequence(Qt::CTRL + Qt::META + Qt::Key_Right), &VirtualDesktopManager::slotRight); +- const QString right1 = QStringLiteral("Switch One Desktop to the Right 1"); +- addAction(right1, i18n(right1.toStdString().c_str()), QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Right), &VirtualDesktopManager::slotRight); ++ addAction(right, i18n(right.toStdString().c_str()), QList<QKeySequence>() << QKeySequence(Qt::CTRL + Qt::META + Qt::Key_Right) << QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Right), &VirtualDesktopManager::slotRight); + + const QString left = QStringLiteral("Switch One Desktop to the Left"); +- addAction(left, i18n(left.toStdString().c_str()), QKeySequence(Qt::CTRL + Qt::META + Qt::Key_Left), &VirtualDesktopManager::slotLeft); +- const QString left1 = QStringLiteral("Switch One Desktop to the Left 1"); +- addAction(left1, i18n(left1.toStdString().c_str()), QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Left), &VirtualDesktopManager::slotLeft); ++ addAction(left, i18n(left.toStdString().c_str()), QList<QKeySequence>() << QKeySequence(Qt::CTRL + Qt::META + Qt::Key_Left) << QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Left), &VirtualDesktopManager::slotLeft); + + QAction *slotUpAction = addAction(QStringLiteral("Switch One Desktop Up"), i18n("Switch One Desktop Up"), &VirtualDesktopManager::slotUp); + KGlobalAccel::setGlobalShortcut(slotUpAction, QKeySequence(Qt::CTRL + Qt::META + Qt::Key_Up)); +@@ -885,6 +882,7 @@ QAction *VirtualDesktopManager::addAction(const QString &name, const KLocalizedS + a->setText(label.subs(value).toString()); + a->setData(value); + KGlobalAccel::setGlobalShortcut(a, key); ++ workspace()->addShortcutInfos(name.arg(value), label.subs(value).toString(), a, QList<QKeySequence>() << key); + input()->registerShortcut(key, a, this, slot); + return a; + } +@@ -897,6 +895,19 @@ QAction *VirtualDesktopManager::addAction(const QString &name, const QString &la + a->setText(label); + KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << key); + KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << key); ++ workspace()->addShortcutInfos(name, label, a, QList<QKeySequence>() << key); ++ input()->registerShortcut(key, a, this, slot); ++ return a; ++} ++ ++QAction *VirtualDesktopManager::addAction(const QString &name, const QString &label, const QList<QKeySequence> &key, void (VirtualDesktopManager::*slot)()) ++{ ++ QAction *a = new QAction(this); ++ a->setProperty("componentName", QStringLiteral(KWIN_NAME)); ++ a->setObjectName(name); ++ a->setText(label); ++ KGlobalAccel::setGlobalShortcut(a, key); ++ workspace()->addShortcutInfos(name, label, a, key); + input()->registerShortcut(key, a, this, slot); + return a; + } +diff --git a/src/virtualdesktops.h b/src/virtualdesktops.h +index 6c65a3b..fc2e315 100644 +--- a/src/virtualdesktops.h ++++ b/src/virtualdesktops.h +@@ -478,6 +478,8 @@ private: + + QAction *addAction(const QString &name, const QString &label, const QKeySequence &key, void (VirtualDesktopManager::*slot)()); + ++ QAction *addAction(const QString &name, const QString &label, const QList<QKeySequence> &key, void (VirtualDesktopManager::*slot)()); ++ + /** + * Creates an action and connects it to the @p slot in this Manager. + * Overloaded method for the case that no additional value needs to be passed to the action and +diff --git a/src/workspace.cpp b/src/workspace.cpp +index 9fe6aa9..127bab7 100644 +--- a/src/workspace.cpp ++++ b/src/workspace.cpp +@@ -202,6 +202,8 @@ Workspace::Workspace() + new DBusInterface(this); + Outline::create(this); + ++ readShowShortcutsName(); ++ + initShortcuts(); + + init(); +diff --git a/src/workspace.h b/src/workspace.h +index 4810045..b17714d 100644 +--- a/src/workspace.h ++++ b/src/workspace.h +@@ -20,6 +20,8 @@ + // Qt + #include <QTimer> + #include <QVector> ++#include <QAction> ++#include <QKeySequence> + // std + #include <functional> + #include <memory> +@@ -455,6 +457,21 @@ public: + return m_screenLockState; + } + ++ void addShortcutInfos(QString actionName, QString description, QAction *action, QList<QKeySequence> shortcut); ++ ++ void readShowShortcutsName(); ++ ++ struct shortcutInfo { ++ QString actionName; ++ QString description; ++ QAction *action; ++ QList<QKeySequence> defaultShortcut; ++ }; ++ ++ QVector<shortcutInfo> getShortcutInfos() {return shortcutInfos;} ++ ++ QStringList getShowShortcutInfos() {return showShortcutsName;} ++ + public Q_SLOTS: + void performWindowOperation(KWin::AbstractClient *c, Options::WindowOperation op); + // Keybindings +@@ -757,6 +774,9 @@ private: + + AbstractClient *m_keyMinClient = nullptr; + ++ QVector<shortcutInfo> shortcutInfos; ++ QStringList showShortcutsName; ++ + private: + friend bool performTransiencyCheck(); + friend Workspace *workspace(); diff -Nru kwin-5.24.4/debian/patches/0201-Add-new-rule-Unlimited-window-size.patch kwin-5.24.4/debian/patches/0201-Add-new-rule-Unlimited-window-size.patch --- kwin-5.24.4/debian/patches/0201-Add-new-rule-Unlimited-window-size.patch 1970-01-01 08:00:00.000000000 +0800 +++ kwin-5.24.4/debian/patches/0201-Add-new-rule-Unlimited-window-size.patch 2025-02-19 11:09:00.000000000 +0800 @@ -0,0 +1,246 @@ +From: zhangshoucheng <zhangshoucheng@kylinos.cn> +Date: Mon, 4 Nov 2024 10:17:10 +0800 +Subject: Add: new rule, Unlimited window size + +--- + data/kwinrulesrc | 8 ++++++++ + src/abstract_client.cpp | 14 ++++++++++++-- + src/abstract_client.h | 6 ++++++ + src/rules.cpp | 7 +++++++ + src/rules.h | 5 +++++ + src/rulesettings.kcfg | 11 +++++++++++ + src/x11client.cpp | 7 ++++--- + 7 files changed, 53 insertions(+), 5 deletions(-) + +diff --git a/data/kwinrulesrc b/data/kwinrulesrc +index b26f80b..039d409 100644 +--- a/data/kwinrulesrc ++++ b/data/kwinrulesrc +@@ -14,5 +14,13 @@ wmclass=ukui-notifications + wmclasscomplete=false + wmclassmatch=1 + ++[3] ++Description=unlimit window size ++unlimitarea=true ++unlimitarearule=2 ++wmclass=polkit-ukui-authentication-agent-1 ++wmclasscomplete=false ++wmclassmatch=1 ++ + [General] + count=3 +diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp +index c6c8b5f..f9a03fb 100644 +--- a/src/abstract_client.cpp ++++ b/src/abstract_client.cpp +@@ -150,6 +150,11 @@ void AbstractClient::setSkipPager(bool b) + Q_EMIT skipPagerChanged(); + } + ++void AbstractClient::setUnlimitWindowArea(bool b) ++{ ++ m_isUnlimitArea = b; ++} ++ + void AbstractClient::doSetSkipPager() + { + } +@@ -1391,8 +1396,13 @@ void AbstractClient::handleInteractiveMoveResize(int x, int y, int x_root, int y + fixWidth = qMin(size.width(), area.width()); + fixHeight = qMin(size.height(), area.height()); + // the new topleft and bottomright corners (after checking size constrains), if they'll be needed +- topleft = QPoint(moveResizeGeometry().right() - fixWidth + 1, moveResizeGeometry().bottom() - fixHeight + 1); +- bottomright = QPoint(moveResizeGeometry().left() + fixWidth - 1, moveResizeGeometry().top() + fixHeight - 1); ++ if (isUnlimitedWindowArea()) { ++ topleft = QPoint(moveResizeGeometry().right() - size.width() + 1, moveResizeGeometry().bottom() - size.height() + 1); ++ bottomright = QPoint(moveResizeGeometry().left() + size.width() - 1, moveResizeGeometry().top() + size.height() - 1); ++ } else { ++ topleft = QPoint(moveResizeGeometry().right() - fixWidth + 1, moveResizeGeometry().bottom() - fixHeight + 1); ++ bottomright = QPoint(moveResizeGeometry().left() + fixWidth - 1, moveResizeGeometry().top() + fixHeight - 1); ++ } + orig = moveResizeGeometry(); + + // if aspect ratios are specified, both dimensions may change. +diff --git a/src/abstract_client.h b/src/abstract_client.h +index 34731ba..edfbcfa 100644 +--- a/src/abstract_client.h ++++ b/src/abstract_client.h +@@ -379,6 +379,11 @@ public: + } + void setSkipPager(bool set); + ++ void setUnlimitWindowArea(bool b); ++ bool isUnlimitedWindowArea() { ++ return m_isUnlimitArea; ++ } ++ + const QIcon &icon() const + { + return m_icon; +@@ -1343,6 +1348,7 @@ private: + bool m_originalSkipTaskbar = false; + bool m_skipPager = false; + bool m_skipSwitcher = false; ++ bool m_isUnlimitArea = false; + QIcon m_icon; + bool m_diableActive = false; + bool m_active = false; +diff --git a/src/rules.cpp b/src/rules.cpp +index fd593b7..70d644f 100644 +--- a/src/rules.cpp ++++ b/src/rules.cpp +@@ -64,6 +64,7 @@ Rules::Rules() + , aboverule(UnusedSetRule) + , belowrule(UnusedSetRule) + , fullscreenrule(UnusedSetRule) ++ , unlimitarearule(UnusedSetRule) + , noborderrule(UnusedSetRule) + , decocolorrule(UnusedForceRule) + , blockcompositingrule(UnusedForceRule) +@@ -157,6 +158,7 @@ void Rules::readFromSettings(const RuleSettings *settings) + READ_SET_RULE(above); + READ_SET_RULE(below); + READ_SET_RULE(fullscreen); ++ READ_SET_RULE(unlimitarea); + READ_SET_RULE(noborder); + + READ_FORCE_RULE(decocolor, getDecoColor); +@@ -232,6 +234,7 @@ void Rules::write(RuleSettings *settings) const + WRITE_SET_RULE(above, Above, ); + WRITE_SET_RULE(below, Below, ); + WRITE_SET_RULE(fullscreen, Fullscreen, ); ++ WRITE_SET_RULE(unlimitarea, Unlimitarea, ); + WRITE_SET_RULE(noborder, Noborder, ); + auto colorToString = [](const QString &value) -> QString { + if (value.endsWith(QLatin1String(".colors"))) { +@@ -284,6 +287,7 @@ bool Rules::isEmpty() const + && aboverule == UnusedSetRule + && belowrule == UnusedSetRule + && fullscreenrule == UnusedSetRule ++ && unlimitarearule == UnusedSetRule + && noborderrule == UnusedSetRule + && decocolorrule == UnusedForceRule + && blockcompositingrule == UnusedForceRule +@@ -611,6 +615,7 @@ APPLY_RULE(skipswitcher, SkipSwitcher, bool) + APPLY_RULE(above, KeepAbove, bool) + APPLY_RULE(below, KeepBelow, bool) + APPLY_RULE(fullscreen, FullScreen, bool) ++APPLY_RULE(unlimitarea, UnlimitArea, bool) + APPLY_RULE(noborder, NoBorder, bool) + APPLY_FORCE_RULE(decocolor, DecoColor, QString) + APPLY_FORCE_RULE(blockcompositing, BlockCompositing, bool) +@@ -685,6 +690,7 @@ bool Rules::discardUsed(bool withdrawn) + DISCARD_USED_SET_RULE(above); + DISCARD_USED_SET_RULE(below); + DISCARD_USED_SET_RULE(fullscreen); ++ DISCARD_USED_SET_RULE(unlimitarea); + DISCARD_USED_SET_RULE(noborder); + DISCARD_USED_FORCE_RULE(decocolor); + DISCARD_USED_FORCE_RULE(blockcompositing); +@@ -821,6 +827,7 @@ CHECK_RULE(KeepAbove, bool) + CHECK_RULE(KeepBelow, bool) + CHECK_RULE(FullScreen, bool) + CHECK_RULE(NoBorder, bool) ++CHECK_RULE(UnlimitArea, bool) + CHECK_FORCE_RULE(DecoColor, QString) + CHECK_FORCE_RULE(BlockCompositing, bool) + CHECK_FORCE_RULE(FSP, int) +diff --git a/src/rules.h b/src/rules.h +index dbea8e4..241b8f3 100644 +--- a/src/rules.h ++++ b/src/rules.h +@@ -65,6 +65,7 @@ public: + bool checkKeepAbove(bool above, bool init = false) const; + bool checkKeepBelow(bool below, bool init = false) const; + bool checkFullScreen(bool fs, bool init = false) const; ++ bool checkUnlimitArea(bool ua, bool init = false) const; + bool checkNoBorder(bool noborder, bool init = false) const; + QString checkDecoColor(QString schemeFile) const; + bool checkBlockCompositing(bool block) const; +@@ -114,6 +115,7 @@ public: + Activity = 1 << 16, + Screen = 1 << 17, + DesktopFile = 1 << 18, ++ Unlimitarea = 1 << 19, + All = 0xffffffff + }; + Q_DECLARE_FLAGS(Types, Type) +@@ -175,6 +177,7 @@ public: + bool applyKeepAbove(bool &above, bool init) const; + bool applyKeepBelow(bool &below, bool init) const; + bool applyFullScreen(bool &fs, bool init) const; ++ bool applyUnlimitArea(bool &ua, bool init) const; + bool applyNoBorder(bool &noborder, bool init) const; + bool applyDecoColor(QString &schemeFile) const; + bool applyBlockCompositing(bool &block) const; +@@ -265,6 +268,8 @@ private: + SetRule belowrule; + bool fullscreen; + SetRule fullscreenrule; ++ bool unlimitarea; ++ SetRule unlimitarearule; + bool noborder; + SetRule noborderrule; + QString decocolor; +diff --git a/src/rulesettings.kcfg b/src/rulesettings.kcfg +index 78cd226..80406d6 100644 +--- a/src/rulesettings.kcfg ++++ b/src/rulesettings.kcfg +@@ -300,6 +300,17 @@ + <default code="true">Rules::UnusedSetRule</default> + </entry> + ++ <entry name="unlimitarea" type="Bool"> ++ <label>Unlimitarea</label> ++ <default>false</default> ++ </entry> ++ <entry name="unlimitarearule" type="Int"> ++ <label>Unlimitarea rule type</label> ++ <min code="true">Rules::UnusedSetRule</min> ++ <max code="true">static_cast<Rules::SetRule>(Rules::ForceTemporarily)</max> ++ <default code="true">Rules::UnusedSetRule</default> ++ </entry> ++ + <entry name="noborder" type="Bool"> + <label>No titlebar and frame</label> + <default>false</default> +diff --git a/src/x11client.cpp b/src/x11client.cpp +index 82d70b2..cfafaf3 100644 +--- a/src/x11client.cpp ++++ b/src/x11client.cpp +@@ -447,6 +447,7 @@ bool X11Client::manage(xcb_window_t w, bool isMapped) + setOriginalSkipTaskbar((info->state() & NET::SkipTaskbar) != 0); + setSkipPager((info->state() & NET::SkipPager) != 0); + setSkipSwitcher((info->state() & NET::SkipSwitcher) != 0); ++ setUnlimitWindowArea(rules()->checkUnlimitArea(false)); + readFirstInTabBox(firstInTabBoxCookie); + + setupCompositing(); +@@ -688,7 +689,7 @@ bool X11Client::manage(xcb_window_t w, bool isMapped) + + if (!session) { // has a better handling of this + setGeometryRestore(frameGeometry()); // Remember restore geometry +- if (isMaximizable() && (width() >= area.width() || height() >= area.height())) { ++ if (isMaximizable() && (width() >= area.width() || height() >= area.height()) && !isUnlimitedWindowArea()) { + // Window is too large for the screen, maximize in the + // directions necessary + const QSize ss = workspace()->clientArea(ScreenArea, this, area.center()).size(); +@@ -738,7 +739,7 @@ bool X11Client::manage(xcb_window_t w, bool isMapped) + } + } + +- if ((!isSpecialWindow() || isToolbar()) && isMovable() && !dontKeepInArea) ++ if ((!isSpecialWindow() || isToolbar()) && isMovable() && !dontKeepInArea && !isUnlimitedWindowArea()) + keepInArea(area, partial_keep_in_area); + + updateShape(); +@@ -3824,7 +3825,7 @@ void X11Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, + resize(requestedFrameSize); + QRect area = workspace()->clientArea(WorkArea, this); + if (!from_tool && (!isSpecialWindow() || isToolbar()) && !isFullScreen() +- && area.contains(origClientGeometry)) ++ && area.intersects(origClientGeometry) && !isUnlimitedWindowArea()) + keepInArea(area); + + // this is part of the kicker-xinerama-hack... it should be diff -Nru kwin-5.24.4/debian/patches/0202-update-changlog-4-5.24.4-ok10-1118.patch kwin-5.24.4/debian/patches/0202-update-changlog-4-5.24.4-ok10-1118.patch --- kwin-5.24.4/debian/patches/0202-update-changlog-4-5.24.4-ok10-1118.patch 1970-01-01 08:00:00.000000000 +0800 +++ kwin-5.24.4/debian/patches/0202-update-changlog-4-5.24.4-ok10-1118.patch 2025-02-19 11:09:00.000000000 +0800 @@ -0,0 +1,21 @@ +From: Jie Liu <liujie01@kylinos.cn> +Date: Mon, 18 Nov 2024 16:10:53 +0800 +Subject: update changlog: 4:5.24.4-ok10~1118 + +--- + src/x11client.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/x11client.cpp b/src/x11client.cpp +index cfafaf3..a0d1c15 100644 +--- a/src/x11client.cpp ++++ b/src/x11client.cpp +@@ -3985,7 +3985,7 @@ bool X11Client::isResizable() const + } + if (isFullScreen()) + return false; +- if (isSpecialWindow() || isSplash() || isToolbar()) ++ if ((isSpecialWindow() && !isDock()) || isSplash() || isToolbar()) + return false; + if (rules()->checkSize(QSize()).isValid()) // forced size + return false; diff -Nru kwin-5.24.4/debian/patches/0203-support-for-ukui-shell-v4-protocols.patch kwin-5.24.4/debian/patches/0203-support-for-ukui-shell-v4-protocols.patch --- kwin-5.24.4/debian/patches/0203-support-for-ukui-shell-v4-protocols.patch 1970-01-01 08:00:00.000000000 +0800 +++ kwin-5.24.4/debian/patches/0203-support-for-ukui-shell-v4-protocols.patch 2025-02-19 11:09:00.000000000 +0800 @@ -0,0 +1,133 @@ +From: Jie Liu <liujie01@kylinos.cn> +Date: Tue, 7 Jan 2025 14:19:00 +0800 +Subject: support for ukui-shell v4 protocols + +--- + src/wayland/protocols/ukui-shell.xml | 15 ++++++++++++--- + src/wayland/ukuishell_interface.cpp | 16 +++++++++++----- + src/wayland/ukuishell_interface.h | 1 + + src/xdgshellclient.cpp | 4 ++++ + 4 files changed, 28 insertions(+), 8 deletions(-) + +diff --git a/src/wayland/protocols/ukui-shell.xml b/src/wayland/protocols/ukui-shell.xml +index 3c37745..203e75e 100644 +--- a/src/wayland/protocols/ukui-shell.xml ++++ b/src/wayland/protocols/ukui-shell.xml +@@ -8,7 +8,7 @@ + ]]> + </copyright> + +- <interface name="ukui_shell" version="3"> ++ <interface name="ukui_shell" version="4"> + <description summary="create ukui shell windows and helpers"> + This interface is used by kylin powered Wayland shells to communicate with the compositor and + can only be bound one time. +@@ -38,7 +38,7 @@ + + <event name="current_output" since="2"> + <description summary="send the output name under cursor"> +- Emitted after bind ukui_shell or recieve get_current_output request. ++ Emitted after bind ukui_shell or receive get_current_output request. + </description> + <arg name="output_name" type="string" summary="name of current output"/> + <arg name="seat_name" type="string" summary="seat name of cursor under output"/> +@@ -53,7 +53,7 @@ + + </interface> + +- <interface name="ukui_surface" version="3"> ++ <interface name="ukui_surface" version="4"> + <description summary="metadata interface"> + An interface that may be implemented by a wl_surface, for implementations that provide the + shell user interface. +@@ -158,6 +158,7 @@ + <entry name="logout" value="12"/> + <entry name="screenlocknotification" value="13"/> + <entry name="switcher" value="14"/> ++ <entry name="authentication" value="15"/> + </enum> + + <request name="set_role"> +@@ -222,5 +223,13 @@ + <arg name="y" type="int" summary="the vertical position of the window" /> + </event> + ++ <request name="activate" since = "4"> ++ <description summary="set the surface active state"> ++ This request makes the created surface to be activated. ++ There is no guarantee the surface will be actually activated, and behaviour ++ may be compositor-dependentption. ++ </description> ++ </request> ++ + </interface> + </protocol> +diff --git a/src/wayland/ukuishell_interface.cpp b/src/wayland/ukuishell_interface.cpp +index ecab6ad..a91873c 100644 +--- a/src/wayland/ukuishell_interface.cpp ++++ b/src/wayland/ukuishell_interface.cpp +@@ -73,9 +73,10 @@ protected: + void ukui_surface_set_panel_takes_focus(Resource *resource, uint32_t takes_focus) override; + void ukui_surface_grab_keyboard(Resource *resource, struct ::wl_resource *seat) override; + void ukui_surface_set_icon(Resource *resource, const QString &icon_name) override; ++ void ukui_surface_activate(Resource *resource) override; + }; + +-static const int s_version = 3; ++static const int s_version = 4; + static QList<UkuiSurfaceInterface *> s_surfaces; + + /********************************* +@@ -128,10 +129,10 @@ void UkuiShellInterfacePrivate::ukui_shell_create_surface(QtWaylandServer::ukui_ + return; + } + +- if (UkuiSurfaceInterface::get(surface)) { +- wl_resource_post_error(resource->handle, 0, "ukui_surface already exists"); +- return; +- } ++ // if (UkuiSurfaceInterface::get(surface)) { ++ // wl_resource_post_error(resource->handle, 0, "ukui_surface already exists"); ++ // return; ++ // } + + wl_resource *ukuiSurfaceResource = wl_resource_create(resource->client(), &ukui_surface_interface, resource->version(), id); + +@@ -430,4 +431,9 @@ void UkuiSurfaceInterfacePrivate::ukui_surface_set_icon(Resource *resource, cons + Q_EMIT q->iconNameChanged(); + } + ++void UkuiSurfaceInterfacePrivate::ukui_surface_activate(Resource *resource) ++{ ++ Q_EMIT q->activatedRequested(); ++} ++ + } // namespace KWaylandServer +\ No newline at end of file +diff --git a/src/wayland/ukuishell_interface.h b/src/wayland/ukuishell_interface.h +index 8e29eec..7702874 100644 +--- a/src/wayland/ukuishell_interface.h ++++ b/src/wayland/ukuishell_interface.h +@@ -167,6 +167,7 @@ Q_SIGNALS: + void panelTakesFocusChanged(); + void panelHideChanged(); + void iconNameChanged(); ++ void activatedRequested(); + + private: + QScopedPointer<UkuiSurfaceInterfacePrivate> d; +diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp +index b43c440..47beda5 100644 +--- a/src/xdgshellclient.cpp ++++ b/src/xdgshellclient.cpp +@@ -756,6 +756,10 @@ void XdgSurfaceClient::installUkuiSurface(UkuiSurfaceInterface *ukuiSurface) + connect(this, &XdgSurfaceClient::frameGeometryChanged, this, [this, ukuiSurface] { + ukuiSurface->sendPosition(frameGeometry().topLeft()); + }); ++ ++ connect(ukuiSurface, &UkuiSurfaceInterface::activatedRequested, this, [this] { ++ workspace()->activateClient(this); ++ }); + } + + void XdgSurfaceClient::setupPlasmaShellIntegration() diff -Nru kwin-5.24.4/debian/patches/0204-update-changelog-4-5.24.4-ok11-0219.patch kwin-5.24.4/debian/patches/0204-update-changelog-4-5.24.4-ok11-0219.patch --- kwin-5.24.4/debian/patches/0204-update-changelog-4-5.24.4-ok11-0219.patch 1970-01-01 08:00:00.000000000 +0800 +++ kwin-5.24.4/debian/patches/0204-update-changelog-4-5.24.4-ok11-0219.patch 2025-02-19 11:09:00.000000000 +0800 @@ -0,0 +1,196 @@ +From: Jie Liu <liujie01@kylinos.cn> +Date: Wed, 19 Feb 2025 11:09:29 +0800 +Subject: update changelog: 4:5.24.4-ok11~0219 + +--- + src/useractions.cpp | 56 ++++++++++++++++++++++++++++++++++++++--------------- + src/useractions.h | 24 +++++++++++++++++------ + 2 files changed, 58 insertions(+), 22 deletions(-) + +diff --git a/src/useractions.cpp b/src/useractions.cpp +index 9ac03ef..fac6345 100644 +--- a/src/useractions.cpp ++++ b/src/useractions.cpp +@@ -45,14 +45,14 @@ + + #include <QAction> + #include <QCheckBox> ++#include <QFile> ++#include <QMouseEvent> + #include <QPushButton> + #include <QtConcurrentRun> +-#include <QFile> + + #include <KGlobalAccel> + #include <KLocalizedString> + #include <QAction> +-#include <QMenu> + #include <QRegularExpression> + #include <kauthorized.h> + #include <kconfig.h> +@@ -65,6 +65,30 @@ + namespace KWin + { + ++void CustomMenu::mousePressEvent(QMouseEvent *event) ++{ ++ if (event->button() != Qt::LeftButton) { ++ event->accept(); ++ if (!rect().contains(event->pos())) { ++ close(); ++ } ++ } else { ++ QMenu::mousePressEvent(event); ++ } ++} ++ ++void CustomMenu::mouseReleaseEvent(QMouseEvent *event) ++{ ++ if (event->button() != Qt::LeftButton) { ++ event->accept(); ++ if (!rect().contains(event->pos())) { ++ close(); ++ } ++ } else { ++ QMenu::mouseReleaseEvent(event); ++ } ++} ++ + UserActionsMenu::UserActionsMenu(QObject *parent) + : QObject(parent) + , m_menu(nullptr) +@@ -217,11 +241,11 @@ void UserActionsMenu::init() + if (m_menu) { + return; + } +- m_menu = new QMenu; +- connect(m_menu, &QMenu::aboutToShow, this, &UserActionsMenu::menuAboutToShow); +- connect(m_menu, &QMenu::triggered, this, &UserActionsMenu::slotWindowOperation, Qt::QueuedConnection); ++ m_menu = new CustomMenu; ++ connect(m_menu, &CustomMenu::aboutToShow, this, &UserActionsMenu::menuAboutToShow); ++ connect(m_menu, &CustomMenu::triggered, this, &UserActionsMenu::slotWindowOperation, Qt::QueuedConnection); + +- QMenu *advancedMenu = new QMenu(m_menu); ++ CustomMenu *advancedMenu = new CustomMenu(m_menu); + + auto setShortcut = [](QAction *action, const QString &actionName) { + const auto shortcuts = KGlobalAccel::self()->shortcut(Workspace::self()->findChild<QAction *>(actionName)); +@@ -390,7 +414,7 @@ void UserActionsMenu::menuAboutToShow() + // ask scripts whether they want to add entries for the given Client + QList<QAction *> scriptActions = Scripting::self()->actionsForUserActionMenu(m_client.data(), m_scriptsMenu); + if (!scriptActions.isEmpty()) { +- m_scriptsMenu = new QMenu(m_menu); ++ m_scriptsMenu = new CustomMenu(m_menu); + m_scriptsMenu->addActions(scriptActions); + + QAction *action = m_scriptsMenu->menuAction(); +@@ -429,8 +453,8 @@ void UserActionsMenu::initDesktopPopup() + return; + } + +- m_multipleDesktopsMenu = new QMenu(m_menu); +- connect(m_multipleDesktopsMenu, &QMenu::aboutToShow, this, &UserActionsMenu::multipleDesktopsPopupAboutToShow); ++ m_multipleDesktopsMenu = new CustomMenu(m_menu); ++ connect(m_multipleDesktopsMenu, &CustomMenu::aboutToShow, this, &UserActionsMenu::multipleDesktopsPopupAboutToShow); + + QAction *action = m_multipleDesktopsMenu->menuAction(); + // set it as the first item +@@ -442,8 +466,8 @@ void UserActionsMenu::initDesktopPopup() + if (m_desktopMenu) + return; + +- m_desktopMenu = new QMenu(m_menu); +- connect(m_desktopMenu, &QMenu::aboutToShow, this, &UserActionsMenu::desktopPopupAboutToShow); ++ m_desktopMenu = new CustomMenu(m_menu); ++ connect(m_desktopMenu, &CustomMenu::aboutToShow, this, &UserActionsMenu::desktopPopupAboutToShow); + + QAction *action = m_desktopMenu->menuAction(); + // set it as the first item +@@ -459,8 +483,8 @@ void UserActionsMenu::initScreenPopup() + return; + } + +- m_screenMenu = new QMenu(m_menu); +- connect(m_screenMenu, &QMenu::aboutToShow, this, &UserActionsMenu::screenPopupAboutToShow); ++ m_screenMenu = new CustomMenu(m_menu); ++ connect(m_screenMenu, &CustomMenu::aboutToShow, this, &UserActionsMenu::screenPopupAboutToShow); + + QAction *action = m_screenMenu->menuAction(); + // set it as the first item after desktop +@@ -474,9 +498,9 @@ void UserActionsMenu::initActivityPopup() + if (m_activityMenu) + return; + +- m_activityMenu = new QMenu(m_menu); +- connect(m_activityMenu, &QMenu::triggered, this, &UserActionsMenu::slotToggleOnActivity); +- connect(m_activityMenu, &QMenu::aboutToShow, this, &UserActionsMenu::activityPopupAboutToShow); ++ m_activityMenu = new CustomMenu(m_menu); ++ connect(m_activityMenu, &CustomMenu::triggered, this, &UserActionsMenu::slotToggleOnActivity); ++ connect(m_activityMenu, &CustomMenu::aboutToShow, this, &UserActionsMenu::activityPopupAboutToShow); + + QAction *action = m_activityMenu->menuAction(); + // set it as the first item +diff --git a/src/useractions.h b/src/useractions.h +index 97d54a3..f16d94b 100644 +--- a/src/useractions.h ++++ b/src/useractions.h +@@ -14,6 +14,7 @@ + + // Qt + #include <QDialog> ++#include <QMenu> + #include <QObject> + #include <QPointer> + +@@ -24,6 +25,17 @@ namespace KWin + { + class AbstractClient; + ++class KWIN_EXPORT CustomMenu : public QMenu ++{ ++ Q_OBJECT ++public: ++ using QMenu::QMenu; ++ ++protected: ++ void mousePressEvent(QMouseEvent *event) override; ++ void mouseReleaseEvent(QMouseEvent *event) override; ++}; ++ + /** + * @brief Menu shown for a Client. + * +@@ -170,27 +182,27 @@ private: + /** + * The actual main context menu which is show when the UserActionsMenu is invoked. + */ +- QMenu *m_menu; ++ CustomMenu *m_menu; + /** + * The move to desktop sub menu. + */ +- QMenu *m_desktopMenu; ++ CustomMenu *m_desktopMenu; + /** + * The move to desktop sub menu, with the Wayland protocol. + */ +- QMenu *m_multipleDesktopsMenu; ++ CustomMenu *m_multipleDesktopsMenu; + /** + * The move to screen sub menu. + */ +- QMenu *m_screenMenu; ++ CustomMenu *m_screenMenu; + /** + * The activities sub menu. + */ +- QMenu *m_activityMenu; ++ CustomMenu *m_activityMenu; + /** + * Menu for further entries added by scripts. + */ +- QMenu *m_scriptsMenu; ++ CustomMenu *m_scriptsMenu; + QAction *m_resizeOperation; + QAction *m_moveOperation; + QAction *m_maximizeOperation; diff -Nru kwin-5.24.4/debian/patches/series kwin-5.24.4/debian/patches/series --- kwin-5.24.4/debian/patches/series 2024-09-20 16:59:37.000000000 +0800 +++ kwin-5.24.4/debian/patches/series 2025-02-19 11:09:00.000000000 +0800 @@ -197,3 +197,8 @@ 0197-Translated-using-Weblate-Uyghur.patch 0198-.patch 0199-update-debian-changelog.patch +0200-Add-get-modify-block-reset-shortcut-interface.patch +0201-Add-new-rule-Unlimited-window-size.patch +0202-update-changlog-4-5.24.4-ok10-1118.patch +0203-support-for-ukui-shell-v4-protocols.patch +0204-update-changelog-4-5.24.4-ok11-0219.patch