Skip to content

power-manager: Show sleep warning conditional to chassis type

Undef requested to merge Jarrah/gnome-settings-daemon:master into master

Currently, GNOME settings daemon displays a notification warning the user before the sleeping the device. This is generally a very useful feature. However, with the adoption of new platforms in GNOME like phones and tablets, this can be a problem. In such devices, the desired behavior is to sleep as soon as possible and by default. Therefore, having a notification pop-up (which can potentially trigger some other haptic feedback like a LED) just because the device is doing what it is supposed to do (go to sleep) can be problematic.

Discussion in the previous MR indicated that using the system's chassis type was a preferred option for deciding this behaviour. This commit builds upon the work by Pablo Correa Gomez in !285 (closed) to provide the same outcome using the chassis type value.

Closes #656 (closed)


  • Work around g_dbus_proxy_get_cached_property() returning NULL for properties that haven't changed since the proxy was created (chassis type never changes).
  • Remove debug code.
  • Hopefully remove manual property read.
Edited by Undef

Merge request reports