#1058614 xfce4-power-manager: not suspending when switching to battery if lid is already closed

Package:
xfce4-power-manager
Source:
xfce4-power-manager
Description:
power manager for Xfce desktop
Submitter:
Avner Shapiro
Date:
2023-12-13 15:36:03 UTC
Severity:
normal
Tags:
#1058614#5
Date:
2023-12-13 15:31:58 UTC
From:
To:
Dear Maintainer,

my settings include:
- lid action on battery: suspend
- lid action on ac: nothing
my scenario is:
- close lid
- disconnect external power supply
expected behavior (this is systemd default behavior with similar conf):
- system should suspend
actual behavior:
- system does nothing

note: when switching the steps in the scenario - first disconnecting and
only then closing the lid - system suspends as expected.

attached a patch that solves the problem, though seems to be a little
bit hackish.