diff --git a/debian/changelog b/debian/changelog index 1ade2b6..70d62ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,9 @@ lxqt-panel (0.12.0-8ubuntu1) UNRELEASED; urgency=medium - Avoid infinite recursion when no icon is available. + avoid-infinite-recursion-icons.patch + Upstream commit b9b4133. + - Add Move and Resize items in the task-button context menu. + + add-move-resize-items.patch + + Upstream commit b69fe72. -- Simon Quigley Mon, 05 Feb 2018 19:00:18 -0600 diff --git a/debian/patches/add-move-resize-items.patch b/debian/patches/add-move-resize-items.patch new file mode 100644 index 0000000..e5b72f2 --- /dev/null +++ b/debian/patches/add-move-resize-items.patch @@ -0,0 +1,78 @@ +Description: Add Move and Resize items in the task-button context menu +Author: Tsu Jan +Origin: backport +Bug: https://github.com/lxde/lxqt/issues/1434 +Applied-Upstream: commit:b69fe72 +Last-Update: 2018-02-05 +--- a/plugin-taskbar/lxqttaskbutton.cpp ++++ b/plugin-taskbar/lxqttaskbutton.cpp +@@ -464,6 +464,42 @@ void LXQtTaskButton::moveApplicationToDe + /************************************************ + + ************************************************/ ++void LXQtTaskButton::moveApplication() ++{ ++ KWindowInfo info(mWindow, NET::WMDesktop); ++ if (!info.isOnCurrentDesktop()) ++ KWindowSystem::setCurrentDesktop(info.desktop()); ++ if (isMinimized()) ++ KWindowSystem::unminimizeWindow(mWindow); ++ KWindowSystem::forceActiveWindow(mWindow); ++ const QRect& g = KWindowInfo(mWindow, NET::WMGeometry).geometry(); ++ int X = g.center().x(); ++ int Y = g.center().y(); ++ QCursor::setPos(X, Y); ++ NETRootInfo(QX11Info::connection(), NET::WMMoveResize).moveResizeRequest(mWindow, X, Y, NET::Move); ++} ++ ++/************************************************ ++ ++ ************************************************/ ++void LXQtTaskButton::resizeApplication() ++{ ++ KWindowInfo info(mWindow, NET::WMDesktop); ++ if (!info.isOnCurrentDesktop()) ++ KWindowSystem::setCurrentDesktop(info.desktop()); ++ if (isMinimized()) ++ KWindowSystem::unminimizeWindow(mWindow); ++ KWindowSystem::forceActiveWindow(mWindow); ++ const QRect& g = KWindowInfo(mWindow, NET::WMGeometry).geometry(); ++ int X = g.bottomRight().x(); ++ int Y = g.bottomRight().y(); ++ QCursor::setPos(X, Y); ++ NETRootInfo(QX11Info::connection(), NET::WMMoveResize).moveResizeRequest(mWindow, X, Y, NET::BottomRight); ++} ++ ++/************************************************ ++ ++ ************************************************/ + void LXQtTaskButton::contextMenuEvent(QContextMenuEvent* event) + { + if (event->modifiers().testFlag(Qt::ControlModifier)) +@@ -532,6 +568,15 @@ void LXQtTaskButton::contextMenuEvent(QC + connect(a, SIGNAL(triggered(bool)), this, SLOT(moveApplicationToDesktop())); + } + ++ /********** Move/Resize **********/ ++ menu->addSeparator(); ++ a = menu->addAction(tr("&Move")); ++ a->setEnabled(info.actionSupported(NET::ActionMove) && !(state & NET::Max) && !(state & NET::FullScreen)); ++ connect(a, &QAction::triggered, this, &LXQtTaskButton::moveApplication); ++ a = menu->addAction(tr("Resi&ze")); ++ a->setEnabled(info.actionSupported(NET::ActionResize) && !(state & NET::Max) && !(state & NET::FullScreen)); ++ connect(a, &QAction::triggered, this, &LXQtTaskButton::resizeApplication); ++ + /********** State menu **********/ + menu->addSeparator(); + +--- a/plugin-taskbar/lxqttaskbutton.h ++++ b/plugin-taskbar/lxqttaskbutton.h +@@ -95,6 +95,8 @@ public slots: + void unShadeApplication(); + void closeApplication(); + void moveApplicationToDesktop(); ++ void moveApplication(); ++ void resizeApplication(); + void setApplicationLayer(); + + void setOrigin(Qt::Corner); diff --git a/debian/patches/series b/debian/patches/series index dd32148..2e33b97 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,4 @@ fix-wrongly-positioned-popups.patch use-specific-panel-icon.patch fix-memory-leaks.patch avoid-infinite-recursion-icons.patch +add-move-resize-items.patch