Skip to content

inhibit/dbus: fix service and path

Andrew Sun requested to merge apsun/vlc:apsun-master-patch-75043 into master

According to https://web.archive.org/web/20080828095706/https://people.freedesktop.org/~hughsient/temp/power-management-spec-0.2.html the correct service name does not include .Inhibit and the path includes /Inhibit.

This essentially reverts beec9e78

More context: the "Disable screensaver" setting is broken on the Xfce desktop environment. After some investigation, it seems that VLC doesn't detect the xfce4-power-manager inhibit dbus service (https://github.com/xfce-mirror/xfce4-power-manager/blob/bf35d61fb32d6ed1b3d482666f79a2e382fd4f1c/src/xfpm-inhibit.c) due to a mismatch in the service name and path.

This changes VLC's behavior to be in line with Chrome (https://github.com/chromium/chromium/blob/228354d4ca00cff99ab7fb6dcea87f9b59d80fd8/services/device/wake_lock/power_save_blocker/power_save_blocker_linux.cc#L53-L58) and Firefox (https://github.com/mozilla/gecko-dev/blob/3067ba33c2202459aae52b7a0f7218a71fe5f7c3/widget/gtk/WakeLockListener.cpp#L34-L36).

Tested to work with Xfce 4.18.

Merge request reports