Compare commits
40 Commits
ubuntu/gro
...
ubuntu/plu
Author | SHA1 | Date | |
---|---|---|---|
bde7f42127 | |||
c67bc6f5cb | |||
b6ae6f489c | |||
23d9b31362 | |||
|
2055e287ba | ||
|
baf98df0e0 | ||
|
37bf2b91f3 | ||
|
c99c3fec0d | ||
|
d0a41a3683 | ||
|
e2d1b8be25 | ||
|
8b201d80e3 | ||
|
8b15c826fd | ||
235a550c36 | |||
928e094586 | |||
dd5c5e0199 | |||
e281b2507f | |||
5a6a3e97c9 | |||
55f23453c6 | |||
5409596e89 | |||
e3b40ebf98 | |||
06c44daa1b | |||
7c2c8e8386 | |||
1ee36eab58 | |||
56bcc84401 | |||
b9cb6b9902 | |||
1b0426f686 | |||
945833658f | |||
1133ed1990 | |||
f1549e6d75 | |||
bca604492d | |||
bf8a5dc047 | |||
13232669cd | |||
db847b4f69 | |||
981de0ac69 | |||
01c1ad4499 | |||
df5ce062af | |||
ce904c89b7 | |||
0afe853ef3 | |||
|
81851edb79 | ||
|
5929b137ba |
102
debian/changelog
vendored
102
debian/changelog
vendored
@ -1,3 +1,104 @@
|
|||||||
|
lxqt-powermanagement (2.1.0-0ubuntu1) plucky; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Bump build dependencies.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 15 Nov 2024 15:33:02 -0600
|
||||||
|
|
||||||
|
lxqt-powermanagement (2.0.0-0ubuntu1) oracular; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Fix DPMS-related patch.
|
||||||
|
* Update copyright file.
|
||||||
|
* Adjusted build dependencies.
|
||||||
|
* Fix battery notification patch.
|
||||||
|
* Bump Standards-Version to 4.7.0, no changes necessary.
|
||||||
|
|
||||||
|
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 15 Aug 2024 16:29:08 -0500
|
||||||
|
|
||||||
|
lxqt-powermanagement (1.4.0-0ubuntu2) noble; urgency=medium
|
||||||
|
|
||||||
|
* Patched out DPMS-related code (it was causing constant crashes)
|
||||||
|
* Renamed the "Repository-Browser" field to "Repository-Browse" in upstream
|
||||||
|
metadata.
|
||||||
|
|
||||||
|
-- Aaron Rainbolt <arraybolt3@gmail.com> Tue, 14 Nov 2023 19:00:33 -0600
|
||||||
|
|
||||||
|
lxqt-powermanagement (1.4.0-0ubuntu1) noble; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Bump build dependencies.
|
||||||
|
* Show a notification when the battery is present, not absent.
|
||||||
|
* Wraaaaaaaaaaaaaaaaaaaaap.
|
||||||
|
* Add some missing build dependencies.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Mon, 13 Nov 2023 11:48:51 -0600
|
||||||
|
|
||||||
|
lxqt-powermanagement (1.3.0-0ubuntu1) mantic; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Bump build dependencies.
|
||||||
|
* Remove redundant hardening rule.
|
||||||
|
* Bump Standards-Version to 4.6.2, no changes needed.
|
||||||
|
* I guess we don't require root to build, do we?
|
||||||
|
* Update copyright years.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 11 Aug 2023 12:50:06 -0500
|
||||||
|
|
||||||
|
lxqt-powermanagement (1.2.0-0ubuntu1) lunar; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Fix the watch file, for real this time.
|
||||||
|
* Bump build dependencies in debian/control.
|
||||||
|
* Bump Standards-version to 4.6.1, no changes needed.
|
||||||
|
* Lubuntuify the package slightly, to make debhelper happy.
|
||||||
|
* Add some missing brackets in the Lintian overrides.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 21:55:31 -0600
|
||||||
|
|
||||||
|
lxqt-powermanagement (1.1.0-0ubuntu1) kinetic; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Bumped build dependencies.
|
||||||
|
* Drop old Breaks/Replaces since we're past the LTS. Update the
|
||||||
|
runtime dependencies too.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Thu, 02 Jun 2022 12:43:41 -0500
|
||||||
|
|
||||||
|
lxqt-powermanagement (0.17.1-0ubuntu1) impish; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release 0.17.1
|
||||||
|
* Update debian/control
|
||||||
|
- Bump Standards-Version to 4.5.1
|
||||||
|
- Use liblxqt0-dev 0.17.0
|
||||||
|
- Use libglobalkeys0-dev 0.17.0
|
||||||
|
- Use libglobalkeys-ui0-dev 0.17.0
|
||||||
|
- Extend lxqt-powermanagement-l10n package description
|
||||||
|
* Rename tag for lintian override
|
||||||
|
* Update debian/copyright
|
||||||
|
|
||||||
|
-- apt-ghetto <apt-ghetto@protonmail.com> Fri, 13 Aug 2021 15:31:53 +0200
|
||||||
|
|
||||||
|
lxqt-powermanagement (0.16.0-1ubuntu1) hirsute; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version. Merge from debian unstable.
|
||||||
|
* Bump debhelper-compat requirement to 13.
|
||||||
|
* Update dependencies.
|
||||||
|
|
||||||
|
-- Raman Sarda <theloudspeaker@disroot.org> Mon, 22 Feb 2021 02:55:40 +0530
|
||||||
|
|
||||||
|
lxqt-powermanagement (0.16.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Alf Gaida ]
|
||||||
|
* Switched to gbp
|
||||||
|
* Bumped Standards-Version to 4.4.0, no changes needed
|
||||||
|
|
||||||
|
[ Andrew Lee (李健秋) ]
|
||||||
|
* New upstream release.
|
||||||
|
* debian/control: update build-deps.
|
||||||
|
|
||||||
|
-- Andrew Lee (李健秋) <ajqlee@debian.org> Wed, 06 Jan 2021 17:58:35 +0800
|
||||||
|
|
||||||
lxqt-powermanagement (0.15.0-0ubuntu1) groovy; urgency=medium
|
lxqt-powermanagement (0.15.0-0ubuntu1) groovy; urgency=medium
|
||||||
|
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
@ -229,4 +330,3 @@ lxqt-powermanagement (0.9.0+20150807-1) unstable; urgency=medium
|
|||||||
* Merging upstream version 0.9.0+20150807.
|
* Merging upstream version 0.9.0+20150807.
|
||||||
|
|
||||||
-- Andrew Lee (李健秋) <ajqlee@debian.org> Sun, 16 Aug 2015 19:19:12 +0800
|
-- Andrew Lee (李健秋) <ajqlee@debian.org> Sun, 16 Aug 2015 19:19:12 +0800
|
||||||
|
|
||||||
|
42
debian/control
vendored
42
debian/control
vendored
@ -1,33 +1,35 @@
|
|||||||
Source: lxqt-powermanagement
|
Source: lxqt-powermanagement
|
||||||
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||||
XSBC-Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
||||||
Uploaders: Alf Gaida <agaida@siduction.org>,
|
Uploaders: Alf Gaida <agaida@siduction.org>,
|
||||||
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
|
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
|
||||||
Andrew Lee (李健秋) <ajqlee@debian.org>
|
Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||||
Section: x11
|
Section: x11
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper-compat (= 12),
|
Build-Depends: debhelper-compat (= 13),
|
||||||
libkf5idletime-dev,
|
libkf6idletime-dev,
|
||||||
libkf5solid-dev,
|
libkf6solid-dev,
|
||||||
libkf5windowsystem-dev,
|
libkf6windowsystem-dev,
|
||||||
liblxqt0-dev (>= 0.15.0),
|
liblxqt-globalkeys-ui2-dev (>= 2.1.0),
|
||||||
libqt5svg5-dev,
|
liblxqt-globalkeys2-dev (>= 2.1.0),
|
||||||
libqt5x11extras5-dev,
|
liblxqt2-dev (>= 2.1.0),
|
||||||
libx11-dev,
|
libx11-dev,
|
||||||
qtbase5-private-dev
|
libxcb-dpms0-dev,
|
||||||
Standards-Version: 4.5.0
|
libxcb-screensaver0-dev,
|
||||||
Vcs-Browser: https://phab.lubuntu.me/source/lxqt-policykit/
|
qt6-base-private-dev (>= 6.6.0),
|
||||||
Vcs-Git: https://phab.lubuntu.me/source/lxqt-policykit.git
|
qt6-svg-dev (>= 6.6.0)
|
||||||
XS-Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-powermanagement
|
Standards-Version: 4.7.0
|
||||||
XS-Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-powermanagement.git
|
Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-powermanagement-packaging
|
||||||
|
Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-powermanagement-packaging.git
|
||||||
|
Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-powermanagement
|
||||||
|
Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-powermanagement.git
|
||||||
|
Rules-Requires-Root: no
|
||||||
Homepage: https://github.com/lxqt/lxqt-powermanagement
|
Homepage: https://github.com/lxqt/lxqt-powermanagement
|
||||||
|
|
||||||
Package: lxqt-powermanagement
|
Package: lxqt-powermanagement
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: lxqt-policykit, upower, ${misc:Depends}, ${shlibs:Depends}
|
Depends: lxqt-policykit, upower, ${misc:Depends}, ${shlibs:Depends}
|
||||||
Recommends: lxqt-powermanagement-l10n, lxqt-qtplugin, lxqt-session
|
Recommends: lxqt-powermanagement-l10n, lxqt-qtplugin, lxqt-session
|
||||||
Breaks: lxqt-common (<< 0.12.0)
|
|
||||||
Replaces: lxqt-common (<< 0.12.0)
|
|
||||||
Description: power management module for LXQt
|
Description: power management module for LXQt
|
||||||
The Power management module for LXQt.
|
The Power management module for LXQt.
|
||||||
.
|
.
|
||||||
@ -37,8 +39,8 @@ Package: lxqt-powermanagement-l10n
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Multi-Arch: foreign
|
Multi-Arch: foreign
|
||||||
Section: localization
|
Section: localization
|
||||||
Depends: qttranslations5-l10n, ${misc:Depends}
|
Depends: qt6-translations-l10n, ${misc:Depends}
|
||||||
Breaks: lxqt-powermanagement (<< 0.11.0)
|
|
||||||
Replaces: lxqt-powermanagement (<< 0.11.0)
|
|
||||||
Description: Language package for lxqt-powermanagement
|
Description: Language package for lxqt-powermanagement
|
||||||
This package contains the l10n files needed by lxqt-powermangement.
|
The l10n files for lxqt-powermanagement
|
||||||
|
.
|
||||||
|
This package contains the l10n files needed by lxqt-powermanagement.
|
||||||
|
24
debian/copyright
vendored
24
debian/copyright
vendored
@ -3,12 +3,30 @@ Upstream-Name: lxqt-powermanagement
|
|||||||
Source: https://github.com/lxqt/lxqt-powermanagement
|
Source: https://github.com/lxqt/lxqt-powermanagement
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2013-2019 LXQt team
|
Copyright: 2013-2024, LXQt team
|
||||||
|
2011-2012, Razor team
|
||||||
|
License: LGPL-2.1+
|
||||||
|
|
||||||
|
Files: config/helpers.h
|
||||||
|
src/batteryinfodialog.cpp
|
||||||
|
src/batteryinfodialog.h
|
||||||
|
src/iconproducer.cpp
|
||||||
|
src/iconproducer.h
|
||||||
|
src/powermanagementd.h
|
||||||
|
src/watcher.h
|
||||||
|
Copyright: 2014-2015, Christian Surlykke <christian@surlykke.dk>
|
||||||
|
2014-2015, Paulo Lieuthier
|
||||||
|
License: LGPL-2.1+
|
||||||
|
|
||||||
|
Files: src/idlenesswatcher.cpp
|
||||||
|
src/idlenesswatcher.h
|
||||||
|
Copyright: 2013, Alec Moskvin <alecm@gmx.com>
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
|
|
||||||
Files: debian/*
|
Files: debian/*
|
||||||
Copyright: 2014-2019 Alf Gaida <agaida@siduction.org>
|
Copyright: 2021-2024, Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||||
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
|
2014-2019, Alf Gaida <agaida@siduction.org>
|
||||||
|
2015, Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
|
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
|
6
debian/gbp.conf
vendored
Normal file
6
debian/gbp.conf
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
debian-branch = debian/sid
|
||||||
|
upstream-branch = upstream/latest
|
||||||
|
pristine-tar = True
|
||||||
|
compression = xz
|
||||||
|
|
6
debian/lintian-overrides
vendored
6
debian/lintian-overrides
vendored
@ -1,6 +1,6 @@
|
|||||||
# there will be no manpages in a foreseable future
|
# there will be no manpages in a foreseable future
|
||||||
lxqt-powermanagement: binary-without-manpage usr/bin/lxqt-config-powermanagement
|
lxqt-powermanagement: no-manual-page [usr/bin/lxqt-config-powermanagement]
|
||||||
lxqt-powermanagement: binary-without-manpage usr/bin/lxqt-powermanagement
|
lxqt-powermanagement: no-manual-page [usr/bin/lxqt-powermanagement]
|
||||||
|
|
||||||
# category LXQt in not yet in freedesktop specs - no bug
|
# category LXQt in not yet in freedesktop specs - no bug
|
||||||
lxqt-powermanagement: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-powermanagement.desktop
|
lxqt-powermanagement: desktop-entry-invalid-category LXQt [usr/share/applications/lxqt-config-powermanagement.desktop]
|
||||||
|
4
debian/lxqt-powermanagement.lintian-overrides
vendored
Normal file
4
debian/lxqt-powermanagement.lintian-overrides
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# This is expected
|
||||||
|
lxqt-powermanagement: desktop-entry-lacks-keywords-entry [usr/share/applications/lxqt-config-powermanagement.desktop]
|
||||||
|
lxqt-powermanagement: desktop-entry-invalid-category LXQt [usr/share/applications/lxqt-config-powermanagement.desktop]
|
||||||
|
lxqt-powermanagement: no-manual-page *
|
114
debian/patches/battery-ux.patch
vendored
Normal file
114
debian/patches/battery-ux.patch
vendored
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
Description: Show a notification when the battery is present, not absent
|
||||||
|
In virtual machines especially, it is odd to see a message about the battery not being present. This commit moves that message to only display when there is a battery present.
|
||||||
|
Author: Simon Quigley <tsimonq2@lubuntu.me>
|
||||||
|
Origin: upstream
|
||||||
|
Forwarded: https://github.com/lxqt/lxqt-powermanagement/pull/382
|
||||||
|
Last-Update: 2023-10-03
|
||||||
|
---
|
||||||
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
|
--- a/src/batterywatcher.cpp
|
||||||
|
+++ b/src/batterywatcher.cpp
|
||||||
|
@@ -43,13 +43,6 @@ BatteryWatcher::BatteryWatcher(QObject *
|
||||||
|
{
|
||||||
|
const QList<Solid::Device> devices = Solid::Device::listFromType(Solid::DeviceInterface::Battery, QString());
|
||||||
|
|
||||||
|
- if (devices.isEmpty())
|
||||||
|
- {
|
||||||
|
- LXQt::Notification::notify(tr("No battery!"),
|
||||||
|
- tr("LXQt could not find data about any battery - monitoring disabled"),
|
||||||
|
- QSL("lxqt-powermanagement"));
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
for (Solid::Device device : devices)
|
||||||
|
{
|
||||||
|
Solid::Battery *battery = device.as<Solid::Battery>();
|
||||||
|
@@ -57,11 +50,24 @@ BatteryWatcher::BatteryWatcher(QObject *
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
mBatteries << battery;
|
||||||
|
connect(battery, &Solid::Battery::energyChanged, this, &BatteryWatcher::batteryChanged);
|
||||||
|
connect(battery, &Solid::Battery::chargeStateChanged, this, &BatteryWatcher::batteryChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ bool discharging;
|
||||||
|
+ double chargeLevel;
|
||||||
|
+ chargeLevelAndStatus(discharging, chargeLevel);
|
||||||
|
+
|
||||||
|
+ if (!devices.isEmpty()) {
|
||||||
|
+ QString status = discharging ? QStringLiteral("Discharging") : QStringLiteral("Charging");
|
||||||
|
+ QString message = tr("%1 (%2%)").arg(status).arg(chargeLevel);
|
||||||
|
+ LXQt::Notification::notify(tr("Battery Present"),
|
||||||
|
+ message,
|
||||||
|
+ QSL("lxqt-powermanagement"));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
mBatteryInfoDialog = new BatteryInfoDialog(mBatteries);
|
||||||
|
|
||||||
|
connect(&mSettings, &PowerManagementSettings::settingsChanged, this, &BatteryWatcher::settingsChanged);
|
||||||
|
@@ -85,19 +91,10 @@ void BatteryWatcher::batteryChanged()
|
||||||
|
static QTime actionTime;
|
||||||
|
static LXQt::Notification *notification = nullptr;
|
||||||
|
|
||||||
|
- double totalEnergyFull = 0;
|
||||||
|
- double totalEnergyNow = 0;
|
||||||
|
- bool discharging = true;
|
||||||
|
+ bool discharging;
|
||||||
|
double chargeLevel;
|
||||||
|
|
||||||
|
- for (const Solid::Battery *battery : std::as_const(mBatteries))
|
||||||
|
- {
|
||||||
|
- totalEnergyFull += battery->energyFull();
|
||||||
|
- totalEnergyNow += battery->energy();
|
||||||
|
- discharging &= (battery->chargeState() == Solid::Battery::Discharging);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- chargeLevel = 100 * totalEnergyNow / totalEnergyFull;
|
||||||
|
+ chargeLevelAndStatus(discharging, chargeLevel);
|
||||||
|
|
||||||
|
qDebug() << "BatteryChanged"
|
||||||
|
<< "discharging:" << discharging
|
||||||
|
@@ -160,6 +157,31 @@ void BatteryWatcher::batteryChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+void BatteryWatcher::chargeLevelAndStatus(bool &discharging, double &chargeLevel)
|
||||||
|
+{
|
||||||
|
+ double totalEnergyFull = 0;
|
||||||
|
+ double totalEnergyNow = 0;
|
||||||
|
+ bool batteries = false;
|
||||||
|
+ discharging = true;
|
||||||
|
+
|
||||||
|
+ for (const Solid::Battery *battery : std::as_const(mBatteries))
|
||||||
|
+ {
|
||||||
|
+ batteries = true;
|
||||||
|
+
|
||||||
|
+ totalEnergyFull += battery->energyFull();
|
||||||
|
+ totalEnergyNow += battery->energy();
|
||||||
|
+ discharging &= (battery->chargeState() == Solid::Battery::Discharging);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!batteries) {
|
||||||
|
+ discharging = false;
|
||||||
|
+ chargeLevel = 0;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ chargeLevel = 100 * totalEnergyNow / totalEnergyFull;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void BatteryWatcher::settingsChanged()
|
||||||
|
{
|
||||||
|
if (!mSettings.isShowIcon())
|
||||||
|
--- a/src/batterywatcher.h
|
||||||
|
+++ b/src/batterywatcher.h
|
||||||
|
@@ -51,6 +51,8 @@ private slots:
|
||||||
|
void setPause(TrayIcon::PAUSE duration);
|
||||||
|
|
||||||
|
private:
|
||||||
|
+ void chargeLevelAndStatus(bool &discharging, double &chargeLevel);
|
||||||
|
+
|
||||||
|
QList<Solid::Battery*> mBatteries;
|
||||||
|
QList<TrayIcon*> mTrayIcons;
|
||||||
|
QTimer mPauseTimer;
|
115
debian/patches/revert-dpms-changes.patch
vendored
Normal file
115
debian/patches/revert-dpms-changes.patch
vendored
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
Description: Remove DPMS-related and screensaver-suspending-related code
|
||||||
|
lxqt-powermanagement added some code that allows the power manager to mess
|
||||||
|
with DPMS stuff. However it appears that DPMS is oftentimes not available in
|
||||||
|
Lubuntu, making lxqt-powermanagement crash over and over until it finally
|
||||||
|
gets disabled by LXQt until the next login. Some screensaver-related stuff
|
||||||
|
was also thrown in which seems unrelated but is in with a function that
|
||||||
|
sets DPMS timeouts. This patch removes all of that code, fixing the crashes.
|
||||||
|
Author: Aaron Rainbolt
|
||||||
|
Origin: ubuntu
|
||||||
|
Last-Update: 2024-06-26
|
||||||
|
---
|
||||||
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
|
|
||||||
|
--- lxqt-powermanagement-2.0.0.orig/CMakeLists.txt
|
||||||
|
+++ lxqt-powermanagement-2.0.0/CMakeLists.txt
|
||||||
|
@@ -29,7 +29,6 @@ find_package(KF6IdleTime ${KF6_MINIMUM_V
|
||||||
|
find_package(KF6Solid ${KF6_MINIMUM_VERSION} REQUIRED)
|
||||||
|
find_package(lxqt ${LXQT_MINIMUM_VERSION} REQUIRED)
|
||||||
|
find_package(lxqt-globalkeys-ui ${LXQT_GLOBALKEYS_MINIMUM_VERSION} REQUIRED)
|
||||||
|
-find_package(XCB REQUIRED COMPONENTS xcb-dpms xcb-screensaver)
|
||||||
|
|
||||||
|
message(STATUS "Building with Qt${Qt6Core_VERSION}")
|
||||||
|
|
||||||
|
--- lxqt-powermanagement-2.0.0.orig/src/idlenesswatcher.cpp
|
||||||
|
+++ lxqt-powermanagement-2.0.0/src/idlenesswatcher.cpp
|
||||||
|
@@ -35,8 +35,6 @@
|
||||||
|
#include <QDebug>
|
||||||
|
#include <LXQt/lxqtnotification.h>
|
||||||
|
#include <QObject>
|
||||||
|
-#include <xcb/dpms.h>
|
||||||
|
-#include <xcb/screensaver.h>
|
||||||
|
|
||||||
|
IdlenessWatcher::IdlenessWatcher(QObject* parent):
|
||||||
|
Watcher(parent)
|
||||||
|
@@ -70,47 +68,14 @@ IdlenessWatcher::IdlenessWatcher(QObject
|
||||||
|
|
||||||
|
connect(&mPSettings, &LXQt::Settings::settingsChanged, this, &IdlenessWatcher::onSettingsChanged);
|
||||||
|
|
||||||
|
- // retrieve DPMS timeouts
|
||||||
|
- mDpmsStandby = mDpmsSuspend = mDpmsOff = 0;
|
||||||
|
- if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
||||||
|
- if (auto x11NativeInterface = qGuiApp->nativeInterface<QNativeInterface::QX11Application>()) {
|
||||||
|
- xcb_connection_t* c = x11NativeInterface->connection();
|
||||||
|
- xcb_dpms_get_timeouts_cookie_t cookie = xcb_dpms_get_timeouts(c);
|
||||||
|
- xcb_dpms_get_timeouts_reply_t* reply = xcb_dpms_get_timeouts_reply(c, cookie, nullptr);
|
||||||
|
- if (reply) {
|
||||||
|
- mDpmsStandby = reply->standby_timeout;
|
||||||
|
- mDpmsSuspend = reply->suspend_timeout;
|
||||||
|
- mDpmsOff = reply->off_timeout;
|
||||||
|
- free(reply);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
IdlenessWatcher::~IdlenessWatcher()
|
||||||
|
{
|
||||||
|
- setDpmsTimeouts(true);
|
||||||
|
KIdleTime::instance()->removeAllIdleTimeouts();
|
||||||
|
}
|
||||||
|
|
||||||
|
-void IdlenessWatcher::setDpmsTimeouts(bool restore) {
|
||||||
|
- if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
||||||
|
- if (auto x11NativeInterface = qGuiApp->nativeInterface<QNativeInterface::QX11Application>()) {
|
||||||
|
- xcb_connection_t* c = x11NativeInterface->connection();
|
||||||
|
- if (restore) {
|
||||||
|
- xcb_dpms_set_timeouts(c, mDpmsStandby, mDpmsSuspend, mDpmsOff);
|
||||||
|
- xcb_screensaver_suspend(c, 0); // WARNING: This is not documented but works.
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- xcb_dpms_set_timeouts(c, 0, 0, 0);
|
||||||
|
- xcb_screensaver_suspend(c, XCB_SCREENSAVER_SUSPEND);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void IdlenessWatcher::setup()
|
||||||
|
{
|
||||||
|
if(mPSettings.isIdlenessWatcherEnabled()) {
|
||||||
|
@@ -144,13 +109,6 @@ void IdlenessWatcher::setup()
|
||||||
|
milliseconds = 1000;
|
||||||
|
mIdleBacklightWatcher = KIdleTime::instance()->addIdleTimeout(milliseconds);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- // override DPMS settings
|
||||||
|
- setDpmsTimeouts(false);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- // restore DPMS settings
|
||||||
|
- setDpmsTimeouts(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- lxqt-powermanagement-2.0.0.orig/src/idlenesswatcher.h
|
||||||
|
+++ lxqt-powermanagement-2.0.0/src/idlenesswatcher.h
|
||||||
|
@@ -45,8 +45,6 @@ private Q_SLOTS:
|
||||||
|
void onSettingsChanged();
|
||||||
|
|
||||||
|
private:
|
||||||
|
- void setDpmsTimeouts(bool restore);
|
||||||
|
-
|
||||||
|
PowerManagementSettings mPSettings;
|
||||||
|
int mIdleACWatcher;
|
||||||
|
int mIdleBatteryWatcher;
|
||||||
|
@@ -54,7 +52,6 @@ private:
|
||||||
|
LXQt::Backlight *mBacklight;
|
||||||
|
int mBacklightActualValue;
|
||||||
|
bool mDischarging;
|
||||||
|
- quint16 mDpmsStandby, mDpmsSuspend, mDpmsOff;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // IDLENESSWATCHER_H
|
2
debian/patches/series
vendored
Normal file
2
debian/patches/series
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
battery-ux.patch
|
||||||
|
revert-dpms-changes.patch
|
1
debian/rules
vendored
1
debian/rules
vendored
@ -2,7 +2,6 @@
|
|||||||
# export DH_VERBOSE=1
|
# export DH_VERBOSE=1
|
||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
%:
|
%:
|
||||||
|
2
debian/source/lintian-overrides
vendored
Normal file
2
debian/source/lintian-overrides
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# We won't be forwarding this patch upstream
|
||||||
|
lxqt-powermanagement source: patch-not-forwarded-upstream [debian/patches/revert-dpms-changes.patch]
|
3
debian/upstream/metadata
vendored
3
debian/upstream/metadata
vendored
@ -3,5 +3,4 @@ Bug-Database: https://github.com/lxqt/lxqt-powermanagement/issues
|
|||||||
Bug-Submit: https://github.com/lxqt/lxqt-powermanagement/issues/new
|
Bug-Submit: https://github.com/lxqt/lxqt-powermanagement/issues/new
|
||||||
Changelog: https://github.com/lxqt/lxqt-powermanagement/blob/master/CHANGELOG
|
Changelog: https://github.com/lxqt/lxqt-powermanagement/blob/master/CHANGELOG
|
||||||
Repository: https://github.com/lxqt/lxqt-powermanagement
|
Repository: https://github.com/lxqt/lxqt-powermanagement
|
||||||
Repository-Browser: https://github.com/lxqt/lxqt-powermanagement
|
Repository-Browse: https://github.com/lxqt/lxqt-powermanagement
|
||||||
|
|
||||||
|
6
debian/watch
vendored
6
debian/watch
vendored
@ -1,3 +1,5 @@
|
|||||||
version=4
|
version=4
|
||||||
opts="pgpsigurlmangle=s/$/.asc/" \
|
opts="searchmode=plain, \
|
||||||
https://github.com/lxqt/lxqt-powermanagement/releases .*/lxqt-powermanagement-([\d\.]+).tar.xz
|
pgpsigurlmangle=s/$/.asc/, \
|
||||||
|
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
|
||||||
|
https://api.github.com/repos/lxqt/@PACKAGE@/releases https:\/\/github.com\/lxqt\/@PACKAGE@\/releases\/download\/@ANY_VERSION@\/@PACKAGE@-@ANY_VERSION@.tar.xz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user