Compare commits

..

4 Commits

10 changed files with 799 additions and 129 deletions

46
debian/changelog vendored
View File

@ -1,46 +1,12 @@
lxqt-panel (2.2.2-0ubuntu1) questing; urgency=medium
lxqt-panel (1.4.0-0ubuntu2~ppa22.04.1) jammy; urgency=medium
* New upstream release.
- Update build dependencies.
* Update copyright file.
* Bump Standards-Version to 4.7.2, no changes needed.
[ Aaron Rainbolt ]
* Go back to using KWindowSystem.
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Wed, 30 Jul 2025 14:49:50 -0500
[ Simon Quigley ]
* Backport to Jammy.
lxqt-panel (2.1.4-0ubuntu3) plucky; urgency=medium
* Update Standards-Version to 4.7.1, no changes needed.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 21 Feb 2025 16:33:31 -0600
lxqt-panel (2.1.4-0ubuntu2) plucky; urgency=medium
* Remove runtime dependency on lxmenu-data.
-- Simon Quigley <tsimonq2@ubuntu.com> Tue, 18 Feb 2025 14:57:47 -0600
lxqt-panel (2.1.4-0ubuntu1) plucky; urgency=medium
* New upstream release.
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 11 Jan 2025 16:48:49 -0600
lxqt-panel (2.1.0-0ubuntu1) plucky; urgency=medium
* New upstream release.
- Bump build dependencies.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 15 Nov 2024 15:32:51 -0600
lxqt-panel (2.0.1-0ubuntu1) oracular; urgency=medium
* New upstream release.
* Update copyright file.
* Bump Standards-Version to 4.7.0, no changes necessary.
* Dropped trim-custom-commands-prevent-crash.patch, applied upstream.
* Adjust build dependencies.
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 15 Aug 2024 16:25:54 -0500
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 22 Dec 2023 16:42:32 -0600
lxqt-panel (1.4.0-0ubuntu2) noble; urgency=medium

37
debian/control vendored
View File

@ -1,27 +1,27 @@
Source: lxqt-panel
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
XSBC-Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
Uploaders: Alf Gaida <agaida@siduction.org>,
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
Andrew Lee (李健秋) <ajqlee@debian.org>
Section: x11
Priority: optional
Build-Depends: debhelper-compat (= 13),
layer-shell-qt,
libasound2-dev,
libdbusmenu-lxqt0-dev (>= 0.2.0),
libdbusmenu-qt5-dev,
libglib2.0-dev,
libicu-dev,
libkf6solid-dev (>= 6.0.0),
libkf6windowsystem-dev (>= 6.0.0),
liblayershellqtinterface-dev,
liblxqt-globalkeys-ui2-dev (>= 2.2.0),
liblxqt-globalkeys2-dev (>= 2.2.0),
liblxqt2-dev (>= 2.2.0),
libkf5solid-dev,
libkf5windowsystem-dev,
liblxqt-globalkeys-ui1-dev (>= 1.4.0),
liblxqt-globalkeys1-dev (>= 1.4.0),
liblxqt1-dev (>= 1.4.0),
libpulse-dev,
libqt5svg5-dev,
libqt5x11extras5-dev,
libsensors-dev [!hurd-any],
libstatgrab-dev [linux-any],
libsysstat-qt6-1-dev (>= 1.1.0),
libsysstat-qt5-0-dev (>= 0.4.5),
libx11-dev,
libxcb-composite0-dev,
libxcb-damage0-dev,
@ -30,27 +30,24 @@ Build-Depends: debhelper-compat (= 13),
libxcb-shm0-dev,
libxcb-util-dev,
libxcb-xkb-dev,
libxcomposite-dev,
libxdamage-dev,
libxkbcommon-dev,
libxkbcommon-x11-dev,
libxrender-dev,
libxtst-dev,
lxqt-menu-data (>= 2.1.0),
qt6-base-private-dev (>= 6.6.0),
qt6-svg-dev (>= 6.6.0),
qt6-wayland-dev (>= 6.6.0),
qt6-wayland-private-dev (>= 6.6.0)
Standards-Version: 4.7.2
lxqt-menu-data (>= 1.4.0)
Standards-Version: 4.6.2
Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-panel-packaging
Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-panel-packaging.git
Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-panel
Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-panel.git
XS-Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-panel
XS-Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-panel.git
Homepage: https://github.com/lxqt/lxqt-panel
Rules-Requires-Root: no
Package: lxqt-panel
Architecture: any
Depends: layer-shell-qt, lxqt-policykit, ${misc:Depends}, ${shlibs:Depends}
Depends: lxmenu-data, lxqt-policykit, ${misc:Depends}, ${shlibs:Depends}
Recommends: lxqt-about,
lxqt-config,
lxqt-notificationd,
@ -70,7 +67,7 @@ Package: lxqt-panel-l10n
Architecture: all
Multi-Arch: foreign
Section: localization
Depends: qt6-translations-l10n, ${misc:Depends}
Depends: qttranslations5-l10n, ${misc:Depends}
Description: Language package for lxqt-panel
The l10n files for lxqt-panel.
.

6
debian/copyright vendored
View File

@ -4,7 +4,7 @@ Source: https://github.com/lxqt/lxqt-panel
Files: *
Copyright: 2010-2013 Razor team
2012-2025 LXQt team
2012-2023 LXQt team
License: LGPL-2.1+
Files: panel/lxqtpanelapplication_p.h
@ -20,8 +20,8 @@ Copyright: 2014-2019 Alf Gaida <agaida@siduction.org>
2018 Walter Lapchynski <wxl@ubuntu.com>
2020-2021 Raman Sarda <theloudspeaker@lubuntu.me>
2021 apt-ghetto <apt-ghetto@protonmail.com>
2018-2025 Simon Quigley <tsimonq2@ubuntu.com>
2023-2025 Aaron Rainbolt <arraybolt3@gmail.com>
2018-2023 Simon Quigley <tsimonq2@ubuntu.com>
2023 Aaron Rainbolt <arraybolt3@gmail.com>
License: LGPL-2.1+
License: LGPL-2.1+

View File

@ -2,7 +2,6 @@ etc/xdg
usr/bin/lxqt-panel
usr/include/lxqt
usr/lib/*/lxqt-panel
usr/share/applications/
usr/share/lxqt/lxqt-panel
usr/share/lxqt/panel.conf
usr/share/lxqt/panel/qeyes-types/

View File

@ -1,9 +0,0 @@
# This is expected
lxqt-panel: desktop-entry-missing-required-key Name [usr/share/applications/lxqt-panel.desktop]
lxqt-panel: desktop-entry-limited-to-environments [usr/share/applications/lxqt-panel.desktop]
# Not likely to be fixed soon
lxqt-panel: spelling-error-in-binary managment management [usr/bin/lxqt-panel]
# False positive
lxqt-panel: hardening-no-fortify-functions [usr/lib/x86_64-linux-gnu/lxqt-panel/backend/libwmbackend_kwin_wayland.so]

View File

@ -0,0 +1,651 @@
Description: Revert switch to KX11Extras
Jammy still uses KWindowSystem, so we need to revert the port away from
KWindowSystem to make things compatible again.
Author: Aaron Rainbolt <arraybolt3@gmail.com>
Origin: vendor
Last-Update: 2023-11-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(REQUIRED_QT_VERSION "5.15.0")
-set(KF5_MINIMUM_VERSION "5.101.0")
+set(KF5_MINIMUM_VERSION "5.36.0")
set(LXQT_GLOBALKEYS_MINIMUM_VERSION "1.4.0")
set(LXQT_MINIMUM_VERSION "1.4.0")
--- a/panel/lxqtpanel.cpp
+++ b/panel/lxqtpanel.cpp
@@ -50,7 +50,6 @@
#include <XdgDirs>
#include <KWindowSystem/KWindowSystem>
-#include <KWindowSystem/KX11Extras>
#include <KWindowSystem/NETWM>
// Turn on this to show the time required to load each plugin during startup
@@ -242,18 +241,18 @@ LXQtPanel::LXQtPanel(const QString &conf
QTimer::singleShot(PANEL_HIDE_FIRST_TIME, this, SLOT(hidePanel()));
}
- connect(KX11Extras::self(), &KX11Extras::windowAdded, this, [this] {
+ connect(KWindowSystem::self(), &KWindowSystem::windowAdded, this, [this] {
if (mHidable && mHideOnOverlap && !mHidden)
{
mShowDelayTimer.stop();
hidePanel();
}
});
- connect(KX11Extras::self(), &KX11Extras::windowRemoved, this, [this] {
+ connect(KWindowSystem::self(), &KWindowSystem::windowRemoved, this, [this] {
if (mHidable && mHideOnOverlap && mHidden && !isPanelOverlapped())
mShowDelayTimer.start();
});
- connect(KX11Extras::self(), &KX11Extras::currentDesktopChanged, this, [this] {
+ connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, [this] {
if (mHidable && mHideOnOverlap)
{
if (!mHidden)
@@ -265,8 +264,8 @@ LXQtPanel::LXQtPanel(const QString &conf
mShowDelayTimer.start();
}
});
- connect(KX11Extras::self(),
- static_cast<void (KX11Extras::*)(WId, NET::Properties, NET::Properties2)>(&KX11Extras::windowChanged),
+ connect(KWindowSystem::self(),
+ static_cast<void (KWindowSystem::*)(WId, NET::Properties, NET::Properties2)>(&KWindowSystem::windowChanged),
this, [this] (WId /* id */, NET::Properties prop, NET::Properties2) {
if (mHidable && mHideOnOverlap
// when a window is moved, resized, shaded, or minimized
@@ -419,7 +418,7 @@ LXQtPanel::~LXQtPanel()
void LXQtPanel::show()
{
QWidget::show();
- KX11Extras::setOnDesktop(effectiveWinId(), NET::OnAllDesktops);
+ KWindowSystem::setOnDesktop(effectiveWinId(), NET::OnAllDesktops);
}
@@ -676,7 +675,7 @@ void LXQtPanel::updateWmStrut()
switch (mPosition)
{
case LXQtPanel::PositionTop:
- KX11Extras::setExtendedStrut(wid,
+ KWindowSystem::setExtendedStrut(wid,
/* Left */ 0, 0, 0,
/* Right */ 0, 0, 0,
/* Top */ rect.top() + getReserveDimension(), rect.left(), rect.right(),
@@ -685,7 +684,7 @@ void LXQtPanel::updateWmStrut()
break;
case LXQtPanel::PositionBottom:
- KX11Extras::setExtendedStrut(wid,
+ KWindowSystem::setExtendedStrut(wid,
/* Left */ 0, 0, 0,
/* Right */ 0, 0, 0,
/* Top */ 0, 0, 0,
@@ -694,7 +693,7 @@ void LXQtPanel::updateWmStrut()
break;
case LXQtPanel::PositionLeft:
- KX11Extras::setExtendedStrut(wid,
+ KWindowSystem::setExtendedStrut(wid,
/* Left */ rect.left() + getReserveDimension(), rect.top(), rect.bottom(),
/* Right */ 0, 0, 0,
/* Top */ 0, 0, 0,
@@ -704,7 +703,7 @@ void LXQtPanel::updateWmStrut()
break;
case LXQtPanel::PositionRight:
- KX11Extras::setExtendedStrut(wid,
+ KWindowSystem::setExtendedStrut(wid,
/* Left */ 0, 0, 0,
/* Right */ wholeScreen.right() - rect.right() + getReserveDimension(), rect.top(), rect.bottom(),
/* Top */ 0, 0, 0,
@@ -714,7 +713,7 @@ void LXQtPanel::updateWmStrut()
}
} else
{
- KX11Extras::setExtendedStrut(wid,
+ KWindowSystem::setExtendedStrut(wid,
/* Left */ 0, 0, 0,
/* Right */ 0, 0, 0,
/* Top */ 0, 0, 0,
@@ -826,8 +825,8 @@ void LXQtPanel::showConfigDialog()
mConfigDialog->activateWindow();
WId wid = mConfigDialog->windowHandle()->winId();
- KX11Extras::activateWindow(wid);
- KX11Extras::setOnDesktop(wid, KX11Extras::currentDesktop());
+ KWindowSystem::activateWindow(wid);
+ KWindowSystem::setOnDesktop(wid, KWindowSystem::currentDesktop());
}
@@ -846,8 +845,8 @@ void LXQtPanel::showAddPluginDialog()
mConfigDialog->activateWindow();
WId wid = mConfigDialog->windowHandle()->winId();
- KX11Extras::activateWindow(wid);
- KX11Extras::setOnDesktop(wid, KX11Extras::currentDesktop());
+ KWindowSystem::activateWindow(wid);
+ KWindowSystem::setOnDesktop(wid, KWindowSystem::currentDesktop());
}
@@ -1130,7 +1129,7 @@ bool LXQtPanel::event(QEvent *event)
KWindowSystem::setType(effectiveWinId(), NET::Dock);
updateWmStrut(); // reserve screen space for the panel
- KX11Extras::setOnAllDesktops(effectiveWinId(), true);
+ KWindowSystem::setOnAllDesktops(effectiveWinId(), true);
break;
}
case QEvent::DragEnter:
@@ -1414,7 +1413,7 @@ bool LXQtPanel::isPanelOverlapped() cons
ignoreList |= NET::TopMenuMask;
ignoreList |= NET::NotificationMask;
- const auto wIds = KX11Extras::stackingOrder();
+ const auto wIds = KWindowSystem::stackingOrder();
for (auto const wId : wIds)
{
KWindowInfo info(wId, NET::WMWindowType | NET::WMState | NET::WMFrameExtents | NET::WMDesktop);
--- a/panel/plugin.cpp
+++ b/panel/plugin.cpp
@@ -31,7 +31,7 @@
#include "pluginsettings_p.h"
#include "lxqtpanel.h"
-#include <KWindowSystem/KX11Extras>
+#include <KWindowSystem>
#include <QDebug>
#include <QProcessEnvironment>
@@ -523,8 +523,8 @@ void Plugin::showConfigureDialog()
mConfigDialog->activateWindow();
WId wid = mConfigDialog->windowHandle()->winId();
- KX11Extras::activateWindow(wid);
- KX11Extras::setOnDesktop(wid, KX11Extras::currentDesktop());
+ KWindowSystem::activateWindow(wid);
+ KWindowSystem::setOnDesktop(wid, KWindowSystem::currentDesktop());
}
--- a/plugin-desktopswitch/desktopswitch.cpp
+++ b/plugin-desktopswitch/desktopswitch.cpp
@@ -33,7 +33,6 @@
#include <lxqt-globalkeys.h>
#include <LXQt/GridLayout>
#include <KWindowSystem/KWindowSystem>
-#include <KWindowSystem/KX11Extras>
#include <QX11Info>
#include <cmath>
@@ -47,7 +46,7 @@ DesktopSwitch::DesktopSwitch(const ILXQt
QObject(),
ILXQtPanelPlugin(startupInfo),
m_pSignalMapper(new QSignalMapper(this)),
- m_desktopCount(KX11Extras::numberOfDesktops()),
+ m_desktopCount(KWindowSystem::numberOfDesktops()),
mRows(-1),
mShowOnlyActive(false),
mDesktops(new NETRootInfo(QX11Info::connection(), NET::NumberOfDesktops | NET::CurrentDesktop | NET::DesktopNames, NET::WM2DesktopLayout)),
@@ -63,16 +62,16 @@ DesktopSwitch::DesktopSwitch(const ILXQt
settingsChanged();
- onCurrentDesktopChanged(KX11Extras::currentDesktop());
+ onCurrentDesktopChanged(KWindowSystem::currentDesktop());
QTimer::singleShot(0, this, SLOT(registerShortcuts()));
connect(m_buttons, &QButtonGroup::idClicked, this, &DesktopSwitch::setDesktop);
- connect(KX11Extras::self(), &KX11Extras::numberOfDesktopsChanged, this, &DesktopSwitch::onNumberOfDesktopsChanged);
- connect(KX11Extras::self(), &KX11Extras::currentDesktopChanged, this, &DesktopSwitch::onCurrentDesktopChanged);
- connect(KX11Extras::self(), &KX11Extras::desktopNamesChanged, this, &DesktopSwitch::onDesktopNamesChanged);
+ connect(KWindowSystem::self(), &KWindowSystem::numberOfDesktopsChanged, this, &DesktopSwitch::onNumberOfDesktopsChanged);
+ connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, &DesktopSwitch::onCurrentDesktopChanged);
+ connect(KWindowSystem::self(), &KWindowSystem::desktopNamesChanged, this, &DesktopSwitch::onDesktopNamesChanged);
- connect(KX11Extras::self(), static_cast<void (KX11Extras::*)(WId, NET::Properties, NET::Properties2)>(&KX11Extras::windowChanged),
+ connect(KWindowSystem::self(), static_cast<void (KWindowSystem::*)(WId, NET::Properties, NET::Properties2)>(&KWindowSystem::windowChanged),
this, &DesktopSwitch::onWindowChanged);
}
@@ -137,7 +136,7 @@ void DesktopSwitch::refresh()
const QList<QAbstractButton*> btns = m_buttons->buttons();
int i = 0;
- const int current_desktop = KX11Extras::currentDesktop();
+ const int current_desktop = KWindowSystem::currentDesktop();
const int current_cnt = btns.count();
const int border = qMin(btns.count(), m_desktopCount);
//update existing buttons
@@ -145,9 +144,9 @@ void DesktopSwitch::refresh()
{
DesktopSwitchButton * button = qobject_cast<DesktopSwitchButton*>(btns[i]);
button->update(i, mLabelType,
- KX11Extras::desktopName(i + 1).isEmpty() ?
+ KWindowSystem::desktopName(i + 1).isEmpty() ?
tr("Desktop %1").arg(i + 1) :
- KX11Extras::desktopName(i + 1));
+ KWindowSystem::desktopName(i + 1));
button->setVisible(!mShowOnlyActive || i + 1 == current_desktop);
}
@@ -156,9 +155,9 @@ void DesktopSwitch::refresh()
for ( ; i < m_desktopCount; ++i)
{
b = new DesktopSwitchButton(&mWidget, i, mLabelType,
- KX11Extras::desktopName(i+1).isEmpty() ?
+ KWindowSystem::desktopName(i+1).isEmpty() ?
tr("Desktop %1").arg(i+1) :
- KX11Extras::desktopName(i+1));
+ KWindowSystem::desktopName(i+1));
mWidget.layout()->addWidget(b);
m_buttons->addButton(b, i);
b->setVisible(!mShowOnlyActive || i + 1 == current_desktop);
@@ -215,7 +214,7 @@ DesktopSwitch::~DesktopSwitch() = defaul
void DesktopSwitch::setDesktop(int desktop)
{
- KX11Extras::setCurrentDesktop(desktop + 1);
+ KWindowSystem::setCurrentDesktop(desktop + 1);
}
void DesktopSwitch::onNumberOfDesktopsChanged(int count)
@@ -330,9 +329,9 @@ void DesktopSwitchWidget::wheelEvent(QWh
if(abs(m_mouseWheelThresholdCounter) < 100)
return;
- int max = KX11Extras::numberOfDesktops();
+ int max = KWindowSystem::numberOfDesktops();
int delta = rotationSteps < 0 ? 1 : -1;
- int current = KX11Extras::currentDesktop() + delta;
+ int current = KWindowSystem::currentDesktop() + delta;
if (current > max){
current = 1;
@@ -341,5 +340,5 @@ void DesktopSwitchWidget::wheelEvent(QWh
current = max;
m_mouseWheelThresholdCounter = 0;
- KX11Extras::setCurrentDesktop(current);
+ KWindowSystem::setCurrentDesktop(current);
}
--- a/plugin-desktopswitch/desktopswitchconfiguration.cpp
+++ b/plugin-desktopswitch/desktopswitchconfiguration.cpp
@@ -26,7 +26,7 @@
#include "desktopswitchconfiguration.h"
#include "ui_desktopswitchconfiguration.h"
-#include <KWindowSystem/KX11Extras>
+#include <KWindowSystem>
#include <QTimer>
DesktopSwitchConfiguration::DesktopSwitchConfiguration(PluginSettings *settings, QWidget *parent) :
@@ -64,17 +64,17 @@ void DesktopSwitchConfiguration::loadSet
void DesktopSwitchConfiguration::loadDesktopsNames()
{
- int n = KX11Extras::numberOfDesktops();
+ int n = KWindowSystem::numberOfDesktops();
for (int i = 1; i <= n; i++)
{
- QLineEdit *edit = new QLineEdit(KX11Extras::desktopName(i), this);
+ QLineEdit *edit = new QLineEdit(KWindowSystem::desktopName(i), this);
((QFormLayout *) ui->namesGroupBox->layout())->addRow(tr("Desktop %1:").arg(i), edit);
// C++11 rocks!
QTimer *timer = new QTimer(this);
timer->setInterval(400);
timer->setSingleShot(true);
- connect(timer, &QTimer::timeout, this, [=] { KX11Extras::setDesktopName(i, edit->text()); });
+ connect(timer, &QTimer::timeout, this, [=] { KWindowSystem::setDesktopName(i, edit->text()); });
connect(edit, &QLineEdit::textEdited, this, [=] { timer->start(); });
}
}
--- a/plugin-kbindicator/src/kbdkeeper.cpp
+++ b/plugin-kbindicator/src/kbdkeeper.cpp
@@ -25,7 +25,7 @@
* END_COMMON_COPYRIGHT_HEADER */
#include <QDebug>
-#include <KWindowSystem/KX11Extras>
+#include <KWindowSystem/KWindowSystem>
#include <KWindowSystem/KWindowInfo>
#include <KWindowSystem/netwm_def.h>
#include "kbdkeeper.h"
@@ -91,7 +91,7 @@ WinKbdKeeper::~WinKbdKeeper() = default;
void WinKbdKeeper::layoutChanged(uint group)
{
- WId win = KX11Extras::activeWindow();
+ WId win = KWindowSystem::activeWindow();
if (m_active == win){
m_mapping[win] = group;
@@ -108,7 +108,7 @@ void WinKbdKeeper::layoutChanged(uint gr
void WinKbdKeeper::checkState()
{
- WId win = KX11Extras::activeWindow();
+ WId win = KWindowSystem::activeWindow();
if (!m_mapping.contains(win))
m_mapping.insert(win, 0);
@@ -120,7 +120,7 @@ void WinKbdKeeper::checkState()
void WinKbdKeeper::switchToGroup(uint group)
{
- WId win = KX11Extras::activeWindow();
+ WId win = KWindowSystem::activeWindow();
m_mapping[win] = group;
m_layout.lockGroup(group);
m_info.setCurrentGroup(group);
@@ -138,7 +138,7 @@ AppKbdKeeper::~AppKbdKeeper() = default;
void AppKbdKeeper::layoutChanged(uint group)
{
- KWindowInfo info = KWindowInfo(KX11Extras::activeWindow(), NET::Properties(), NET::WM2WindowClass);
+ KWindowInfo info = KWindowInfo(KWindowSystem::activeWindow(), NET::Properties(), NET::WM2WindowClass);
QString app = QString::fromUtf8(info.windowClassName());
if (m_active == app){
@@ -157,7 +157,7 @@ void AppKbdKeeper::layoutChanged(uint gr
void AppKbdKeeper::checkState()
{
- KWindowInfo info = KWindowInfo(KX11Extras::activeWindow(), NET::Properties(), NET::WM2WindowClass);
+ KWindowInfo info = KWindowInfo(KWindowSystem::activeWindow(), NET::Properties(), NET::WM2WindowClass);
QString app = QString::fromUtf8(info.windowClassName());
if (!m_mapping.contains(app))
@@ -172,7 +172,7 @@ void AppKbdKeeper::checkState()
void AppKbdKeeper::switchToGroup(uint group)
{
- KWindowInfo info = KWindowInfo(KX11Extras::activeWindow(), NET::Properties(), NET::WM2WindowClass);
+ KWindowInfo info = KWindowInfo(KWindowSystem::activeWindow(), NET::Properties(), NET::WM2WindowClass);
QString app = QString::fromUtf8(info.windowClassName());
m_mapping[app] = group;
--- a/plugin-taskbar/lxqttaskbar.cpp
+++ b/plugin-taskbar/lxqttaskbar.cpp
@@ -93,10 +93,10 @@ LXQtTaskBar::LXQtTaskBar(ILXQtPanelPlugi
connect(mSignalMapper, &QSignalMapper::mappedInt, this, &LXQtTaskBar::activateTask);
QTimer::singleShot(0, this, &LXQtTaskBar::registerShortcuts);
- connect(KX11Extras::self(), static_cast<void (KX11Extras::*)(WId, NET::Properties, NET::Properties2)>(&KX11Extras::windowChanged)
+ connect(KWindowSystem::self(), static_cast<void (KWindowSystem::*)(WId, NET::Properties, NET::Properties2)>(&KWindowSystem::windowChanged)
, this, &LXQtTaskBar::onWindowChanged);
- connect(KX11Extras::self(), &KX11Extras::windowAdded, this, &LXQtTaskBar::onWindowAdded);
- connect(KX11Extras::self(), &KX11Extras::windowRemoved, this, &LXQtTaskBar::onWindowRemoved);
+ connect(KWindowSystem::self(), &KWindowSystem::windowAdded, this, &LXQtTaskBar::onWindowAdded);
+ connect(KWindowSystem::self(), &KWindowSystem::windowRemoved, this, &LXQtTaskBar::onWindowRemoved);
}
/************************************************
@@ -356,7 +356,7 @@ void LXQtTaskBar::refreshTaskList()
{
QList<WId> new_list;
// Just add new windows to groups, deleting is up to the groups
- const auto wnds = KX11Extras::stackingOrder();
+ const auto wnds = KWindowSystem::stackingOrder();
for (auto const wnd: wnds)
{
if (acceptWindow(wnd))
--- a/plugin-taskbar/lxqttaskbar.h
+++ b/plugin-taskbar/lxqttaskbar.h
@@ -43,7 +43,7 @@
#include <QMap>
#include <lxqt-globalkeys.h>
#include "../panel/ilxqtpanel.h"
-#include <KWindowSystem/KX11Extras>
+#include <KWindowSystem/KWindowSystem>
#include <KWindowSystem/KWindowInfo>
#include <KWindowSystem/NETWM>
--- a/plugin-taskbar/lxqttaskbarconfiguration.cpp
+++ b/plugin-taskbar/lxqttaskbarconfiguration.cpp
@@ -29,7 +29,7 @@
#include "lxqttaskbarconfiguration.h"
#include "ui_lxqttaskbarconfiguration.h"
-#include <KWindowSystem/KX11Extras>
+#include <KWindowSystem/KWindowSystem>
LXQtTaskbarConfiguration::LXQtTaskbarConfiguration(PluginSettings *settings, QWidget *parent):
LXQtPanelPluginConfigDialog(settings, parent),
@@ -54,9 +54,9 @@ LXQtTaskbarConfiguration::LXQtTaskbarCon
ui->showDesktopNumCB->addItem(tr("Current"), 0);
//Note: in KWindowSystem desktops are numbered from 1..N
- const int desk_cnt = KX11Extras::numberOfDesktops();
+ const int desk_cnt = KWindowSystem::numberOfDesktops();
for (int i = 1; desk_cnt >= i; ++i)
- ui->showDesktopNumCB->addItem(QString(QStringLiteral("%1 - %2")).arg(i).arg(KX11Extras::desktopName(i)), i);
+ ui->showDesktopNumCB->addItem(QString(QStringLiteral("%1 - %2")).arg(i).arg(KWindowSystem::desktopName(i)), i);
loadSettings();
ui->ungroupedNextToExistingCB->setEnabled(!(ui->groupingGB->isChecked()));
--- a/plugin-taskbar/lxqttaskbutton.cpp
+++ b/plugin-taskbar/lxqttaskbutton.cpp
@@ -54,7 +54,7 @@
#include "lxqttaskgroup.h"
#include "lxqttaskbar.h"
-#include <KWindowSystem/KX11Extras>
+#include <KWindowSystem/KWindowSystem>
// Necessary for closeApplication()
#include <KWindowSystem/NETWM>
#include <QX11Info>
@@ -151,7 +151,7 @@ void LXQtTaskButton::updateIcon()
if (ico.isNull())
{
int devicePixels = mIconSize * devicePixelRatioF();
- ico = KX11Extras::icon(mWindow, devicePixels, devicePixels);
+ ico = KWindowSystem::icon(mWindow, devicePixels, devicePixels);
}
setIcon(ico.isNull() ? XdgIcon::defaultApplicationIcon() : ico);
}
@@ -415,7 +415,7 @@ bool LXQtTaskButton::isApplicationHidden
************************************************/
bool LXQtTaskButton::isApplicationActive() const
{
- return KX11Extras::activeWindow() == mWindow;
+ return KWindowSystem::activeWindow() == mWindow;
}
/************************************************
@@ -426,16 +426,15 @@ void LXQtTaskButton::raiseApplication()
KWindowInfo info(mWindow, NET::WMDesktop | NET::WMState | NET::XAWMState);
if (parentTaskBar()->raiseOnCurrentDesktop() && info.isMinimized())
{
- KX11Extras::setOnDesktop(mWindow, KX11Extras::currentDesktop());
+ KWindowSystem::setOnDesktop(mWindow, KWindowSystem::currentDesktop());
}
else
{
int winDesktop = info.desktop();
- if (KX11Extras::currentDesktop() != winDesktop)
- KX11Extras::setCurrentDesktop(winDesktop);
+ if (KWindowSystem::currentDesktop() != winDesktop)
+ KWindowSystem::setCurrentDesktop(winDesktop);
}
- // bypass focus stealing prevention
- KX11Extras::forceActiveWindow(mWindow);
+ KWindowSystem::activateWindow(mWindow);
setUrgencyHint(false);
}
@@ -445,7 +444,7 @@ void LXQtTaskButton::raiseApplication()
************************************************/
void LXQtTaskButton::minimizeApplication()
{
- KX11Extras::minimizeWindow(mWindow);
+ KWindowSystem::minimizeWindow(mWindow);
}
/************************************************
@@ -557,7 +556,7 @@ void LXQtTaskButton::moveApplicationToDe
if (!ok)
return;
- KX11Extras::setOnDesktop(mWindow, desk);
+ KWindowSystem::setOnDesktop(mWindow, desk);
}
/************************************************
@@ -565,7 +564,7 @@ void LXQtTaskButton::moveApplicationToDe
************************************************/
void LXQtTaskButton::moveApplicationToPrevNextDesktop(bool next)
{
- int deskNum = KX11Extras::numberOfDesktops();
+ int deskNum = KWindowSystem::numberOfDesktops();
if (deskNum <= 1)
return;
int targetDesk = KWindowInfo(mWindow, NET::WMDesktop).desktop() + (next ? 1 : -1);
@@ -575,7 +574,7 @@ void LXQtTaskButton::moveApplicationToPr
else if (targetDesk < 1)
targetDesk = deskNum;
- KX11Extras::setOnDesktop(mWindow, targetDesk);
+ KWindowSystem::setOnDesktop(mWindow, targetDesk);
}
/************************************************
@@ -585,10 +584,10 @@ void LXQtTaskButton::moveApplicationToPr
{
KWindowInfo info(mWindow, NET::WMDesktop);
if (!info.isOnCurrentDesktop())
- KX11Extras::setCurrentDesktop(info.desktop());
+ KWindowSystem::setCurrentDesktop(info.desktop());
if (isMinimized())
- KX11Extras::unminimizeWindow(mWindow);
- KX11Extras::forceActiveWindow(mWindow);
+ KWindowSystem::unminimizeWindow(mWindow);
+ KWindowSystem::forceActiveWindow(mWindow);
const QRect& windowGeometry = KWindowInfo(mWindow, NET::WMFrameExtents).frameGeometry();
QList<QScreen *> screens = QGuiApplication::screens();
if (screens.size() > 1){
@@ -628,10 +627,10 @@ void LXQtTaskButton::moveApplication()
{
KWindowInfo info(mWindow, NET::WMDesktop);
if (!info.isOnCurrentDesktop())
- KX11Extras::setCurrentDesktop(info.desktop());
+ KWindowSystem::setCurrentDesktop(info.desktop());
if (isMinimized())
- KX11Extras::unminimizeWindow(mWindow);
- KX11Extras::forceActiveWindow(mWindow);
+ KWindowSystem::unminimizeWindow(mWindow);
+ KWindowSystem::forceActiveWindow(mWindow);
const QRect& g = KWindowInfo(mWindow, NET::WMGeometry).geometry();
int X = g.center().x();
int Y = g.center().y();
@@ -646,10 +645,10 @@ void LXQtTaskButton::resizeApplication()
{
KWindowInfo info(mWindow, NET::WMDesktop);
if (!info.isOnCurrentDesktop())
- KX11Extras::setCurrentDesktop(info.desktop());
+ KWindowSystem::setCurrentDesktop(info.desktop());
if (isMinimized())
- KX11Extras::unminimizeWindow(mWindow);
- KX11Extras::forceActiveWindow(mWindow);
+ KWindowSystem::unminimizeWindow(mWindow);
+ KWindowSystem::forceActiveWindow(mWindow);
const QRect& g = KWindowInfo(mWindow, NET::WMGeometry).geometry();
int X = g.bottomRight().x();
int Y = g.bottomRight().y();
@@ -701,7 +700,7 @@ void LXQtTaskButton::contextMenuEvent(QC
*/
/********** Desktop menu **********/
- int deskNum = KX11Extras::numberOfDesktops();
+ int deskNum = KWindowSystem::numberOfDesktops();
if (deskNum > 1)
{
int winDesk = KWindowInfo(mWindow, NET::WMDesktop).desktop();
@@ -715,7 +714,7 @@ void LXQtTaskButton::contextMenuEvent(QC
for (int i = 1; i <= deskNum; ++i)
{
- auto deskName = KX11Extras::desktopName(i).trimmed();
+ auto deskName = KWindowSystem::desktopName(i).trimmed();
if (deskName.isEmpty())
a = deskMenu->addAction(tr("Desktop &%1").arg(i));
else
@@ -726,7 +725,7 @@ void LXQtTaskButton::contextMenuEvent(QC
connect(a, &QAction::triggered, this, &LXQtTaskButton::moveApplicationToDesktop);
}
- int curDesk = KX11Extras::currentDesktop();
+ int curDesk = KWindowSystem::currentDesktop();
a = menu->addAction(tr("&To Current Desktop"));
a->setData(curDesk);
a->setEnabled(curDesk != winDesk);
@@ -832,6 +831,9 @@ void LXQtTaskButton::setUrgencyHint(bool
if (mUrgencyHint == set)
return;
+ if (!set)
+ KWindowSystem::demandAttention(mWindow, false);
+
mUrgencyHint = set;
setProperty("urgent", set);
style()->unpolish(this);
--- a/plugin-taskbar/lxqttaskgroup.cpp
+++ b/plugin-taskbar/lxqttaskgroup.cpp
@@ -38,8 +38,8 @@
#include <QStringBuilder>
#include <QMenu>
#include <XdgIcon>
-#include <KWindowSystem/KX11Extras>
#include <QX11Info>
+#include <KF5/KWindowSystem/KWindowSystem>
#include <functional>
/************************************************
@@ -58,8 +58,8 @@ LXQtTaskGroup::LXQtTaskGroup(const QStri
setText(groupName);
connect(this, &LXQtTaskGroup::clicked, this, &LXQtTaskGroup::onClicked);
- connect(KX11Extras::self(), &KX11Extras::currentDesktopChanged, this, &LXQtTaskGroup::onDesktopChanged);
- connect(KX11Extras::self(), &KX11Extras::activeWindowChanged, this, &LXQtTaskGroup::onActiveWindowChanged);
+ connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, &LXQtTaskGroup::onDesktopChanged);
+ connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this, &LXQtTaskGroup::onActiveWindowChanged);
connect(parent, &LXQtTaskBar::buttonRotationRefreshed, this, &LXQtTaskGroup::setAutoRotation);
connect(parent, &LXQtTaskBar::refreshIconGeometry, this, &LXQtTaskGroup::refreshIconsGeometry);
connect(parent, &LXQtTaskBar::buttonStyleRefreshed, this, &LXQtTaskGroup::setToolButtonsStyle);
@@ -97,7 +97,7 @@ void LXQtTaskGroup::contextMenuEvent(QCo
void LXQtTaskGroup::closeGroup()
{
for (LXQtTaskButton *button : qAsConst(mButtonHash) )
- if (button->isOnDesktop(KX11Extras::currentDesktop()))
+ if (button->isOnDesktop(KWindowSystem::currentDesktop()))
button->closeApplication();
}
@@ -305,7 +305,7 @@ void LXQtTaskGroup::onClicked(bool)
{
if (visibleButtonsCount() > 1)
{
- setChecked(mButtonHash.contains(KX11Extras::activeWindow()));
+ setChecked(mButtonHash.contains(KWindowSystem::activeWindow()));
setPopupVisible(true);
}
}
@@ -384,7 +384,7 @@ void LXQtTaskGroup::refreshVisibility()
const int showDesktop = taskbar->showDesktopNum();
for(LXQtTaskButton * btn : qAsConst(mButtonHash))
{
- bool visible = taskbar->isShowOnlyOneDesktopTasks() ? btn->isOnDesktop(0 == showDesktop ? KX11Extras::currentDesktop() : showDesktop) : true;
+ bool visible = taskbar->isShowOnlyOneDesktopTasks() ? btn->isOnDesktop(0 == showDesktop ? KWindowSystem::currentDesktop() : showDesktop) : true;
visible &= taskbar->isShowOnlyCurrentScreenTasks() ? btn->isOnCurrentScreen() : true;
visible &= taskbar->isShowOnlyMinimizedTasks() ? btn->isMinimized() : true;
btn->setVisible(visible);

2
debian/patches/series vendored Normal file
View File

@ -0,0 +1,2 @@
0001-revert-to-kwindowsystem.patch
trim-custom-commands-prevent-crash.patch

View File

@ -0,0 +1,69 @@
Description: LXQtCustomCommand: trim command to remove spaces
This fixes crash when command is made of only whitespace characters.
It's not detected as empty and upon argument split, it tries to access
first element of an empty list.
.
Also trim when saving settings in LXQtCustomCommandConfiguration
so placeholder text shows up on next run
Author: Filippo Gentile <42845724+gfgit@users.noreply.github.com>
Origin: upstream, https://github.com/lxqt/lxqt-panel/pull/1964
Applied-Upstream: bd637abafc9e8e9c7727a89e5d86e0f07f213c23
Last-Update: 2023-12-22
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/plugin-customcommand/lxqtcustomcommand.cpp
+++ b/plugin-customcommand/lxqtcustomcommand.cpp
@@ -109,7 +109,7 @@ void LXQtCustomCommand::settingsChanged(
mAutoRotate = settings()->value(QStringLiteral("autoRotate"), true).toBool();
mFont = settings()->value(QStringLiteral("font"), QString()).toString(); // the default font should be empty
- mCommand = settings()->value(QStringLiteral("command"), QStringLiteral("echo Configure...")).toString();
+ mCommand = settings()->value(QStringLiteral("command"), QStringLiteral("echo Configure...")).toString().trimmed();
mRunWithBash = settings()->value(QStringLiteral("runWithBash"), true).toBool();
mOutputImage = settings()->value(QStringLiteral("outputImage"), false).toBool();
mRepeat = settings()->value(QStringLiteral("repeat"), true).toBool();
@@ -118,9 +118,9 @@ void LXQtCustomCommand::settingsChanged(
mIcon = settings()->value(QStringLiteral("icon"), QString()).toString();
mText = settings()->value(QStringLiteral("text"), QStringLiteral("%1")).toString();
mMaxWidth = settings()->value(QStringLiteral("maxWidth"), 200).toInt();
- mClick = settings()->value(QStringLiteral("click"), QString()).toString();
- mWheelUp = settings()->value(QStringLiteral("wheelUp"), QString()).toString();
- mWheelDown = settings()->value(QStringLiteral("wheelDown"), QString()).toString();
+ mClick = settings()->value(QStringLiteral("click"), QString()).toString().trimmed();
+ mWheelUp = settings()->value(QStringLiteral("wheelUp"), QString()).toString().trimmed();
+ mWheelDown = settings()->value(QStringLiteral("wheelDown"), QString()).toString().trimmed();
if (oldFont != mFont) {
QFont newFont;
--- a/plugin-customcommand/lxqtcustomcommandconfiguration.cpp
+++ b/plugin-customcommand/lxqtcustomcommandconfiguration.cpp
@@ -108,7 +108,7 @@ void LXQtCustomCommandConfiguration::fon
void LXQtCustomCommandConfiguration::commandPlainTextEditChanged()
{
if (!mLockSettingChanges)
- settings().setValue(QStringLiteral("command"), ui->commandPlainTextEdit->toPlainText());
+ settings().setValue(QStringLiteral("command"), ui->commandPlainTextEdit->toPlainText().trimmed());
}
void LXQtCustomCommandConfiguration::runWithBashCheckBoxChanged(bool runWithBash)
@@ -163,17 +163,17 @@ void LXQtCustomCommandConfiguration::max
void LXQtCustomCommandConfiguration::clickLineEditChanged(QString click)
{
if (!mLockSettingChanges)
- settings().setValue(QStringLiteral("click"), click);
+ settings().setValue(QStringLiteral("click"), click.trimmed());
}
void LXQtCustomCommandConfiguration::wheelUpLineEditChanged(QString wheelUp)
{
if (!mLockSettingChanges)
- settings().setValue(QStringLiteral("wheelUp"), wheelUp);
+ settings().setValue(QStringLiteral("wheelUp"), wheelUp.trimmed());
}
void LXQtCustomCommandConfiguration::wheelDownLineEditChanged(QString wheelDown)
{
if (!mLockSettingChanges)
- settings().setValue(QStringLiteral("wheelDown"), wheelDown);
+ settings().setValue(QStringLiteral("wheelDown"), wheelDown.trimmed());
}

View File

@ -1,5 +0,0 @@
# Expected to be verylong
lxqt-panel source: very-long-line-length-in-source-file * > 512 [*.ts:*]
lxqt-panel source: very-long-line-length-in-source-file * > 512 [CHANGELOG:*]
lxqt-panel source: very-long-line-length-in-source-file * > 512 [plugin-colorpicker/colorpicker.cpp:52]
lxqt-panel source: very-long-line-length-in-source-file * > 512 [*.ui:*]