! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfconf logind inhibit keys logic reverted
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2014-08-27 21:46:01 CEST
Hi,

it seems that the logic for handling logind inhibitions is completely backward.

The keys are named logind-handle-<foo> (and default to TRUE) which seems to indicate that *logind* does the job, not xfce4-power-manager.

But when actually adding inhibitors, the code (http://git.xfce.org/xfce/xfce4-power-manager/tree/src/xfpm-manager.c#n502) actually does the opposite: if the key is true, then xfpm considers that it has to do the job, and adds a dbus inhibitor.

That's completely confusing. Either the key names have to be changed, or the logic.
Comment 1 Yves-Alexis Perez editbugs 2014-08-27 22:08:48 CEST
Created attachment 5614 
invert the logind xfconf keys logic

This patch should fix the issue, I guess. It sets the default keys to FALSE, and then only add the inhibits if the current keys are FALSE.
Comment 2 Yves-Alexis Perez editbugs 2014-08-27 22:25:55 CEST
Created attachment 5615 
invert the logind xfconf keys logic

New version which also updates the variable names for more clarity.
Comment 3 Yves-Alexis Perez editbugs 2014-09-01 07:23:44 CEST
Ping?
Comment 4 Eric Koegel editbugs 2014-09-01 19:27:12 CEST
Simon and Sean were working on this so I'll let them take the lead :)
Comment 5 Sean Davis editbugs 2014-09-03 12:58:27 CEST
(In reply to Yves-Alexis Perez from comment #2)
> Created attachment 5615 
> invert the logind xfconf keys logic
> 
> New version which also updates the variable names for more clarity.

This patch seems to make sense of it all. Please apply it going forward.
Comment 6 Simon Steinbeiss editbugs 2014-09-03 15:44:47 CEST
Thanks, pushed the fix to master.
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=03193df6cad651841e8d9960335b4a3bf13afdad

Bug #11113

Reported by:
Yves-Alexis Perez
Reported on: 2014-08-27
Last modified on: 2014-09-03

People

Assignee:
Ali Abdallah
CC List:
3 users

Version

Version:
Unspecified

Attachments

invert the logind xfconf keys logic (3.00 KB, patch)
2014-08-27 22:08 CEST , Yves-Alexis Perez
no flags
invert the logind xfconf keys logic (3.76 KB, patch)
2014-08-27 22:25 CEST , Yves-Alexis Perez
no flags

Additional information