Bug 180039 - [GTK] Prefer using GApplication for suspend inhibitors, if available
Summary: [GTK] Prefer using GApplication for suspend inhibitors, if available
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-27 08:45 PST by Michael Catanzaro
Modified: 2017-11-27 09:43 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-11-27 08:45:32 PST
If there is a default GApplication, then we should use the GApplication suspend inhibitor API, so that it automatically works inside flatpak.

Currently WebKit is using the org.freedesktop.ScreenSaver D-Bus API, which is blocked by default. It would be better if applications were not required to magically know that they need to whitelist this.
Comment 1 Carlos Garcia Campos 2017-11-27 08:48:11 PST
Aren't we going to replace that with an impl in PAL anyway?
Comment 2 Michael Catanzaro 2017-11-27 09:42:38 PST
Yes. The problem I just realized is that, while this will work right now, for WebKitWebViewBase, the only place that takes a sleep inhibitor currently, it conflicts with the task in bug #178485, which would expose inhibitors to the web process and which would inhibit suspend on video playback.

We might need to use the flatpak portal D-Bus API directly.
Comment 3 Michael Catanzaro 2017-11-27 09:43:02 PST
(The conflict is because the GtkApplication would not be available in the web process.)