Automatically enable presentation mode when a window is fullscreen and not a locker
Submitted by Steve Dodier-Lazaro
Assigned to Steve Dodier-Lazaro
Description
Current situation:
Xfpm proposes a boolean setting for presentation mode and implements the fd.o power manager interface. Some legacy applications like video games, and web browsers, fail to inhibit the presentation mode because they don't call DBus.
Observations:
We should more often than not inhibit presentation mode when content is full-screen or when a video is playing, since these are situations like presentations / people watching a movie.
It's probably harder to just fix the browsers, as my experience with XDG / UI bugs on Firefox is that they just rot in a corner for years, or get implemented for GNOME only. Firefox Linux probably has even less manpower than us :-)
Proposed solution:
We implement a method to force presentation mode on when windows are fullscreen, and an Xfconf key to disable that for the grumpy ones among us who dislike the feature.
Proposed topic of discussion on top of that:
Can we get the names of the apps that use the Inhibit API currently? If so, I'd like for the solution to this bug to allow Xfpm to give users the name of the app forcing presentation mode on (to help handle bugs).
Proposed architecture:
- xfwm4 detects when the active window is fullscreen, and maintains a xfconf key with this window's ID / window title
- xfpm gets a new UI setting and Xfconf key to enable situational / automatic presentation mode
- When the xfconf key for the fullscreen window is not null / empty, and when xfpm is on "automatic presentation mode", it prevents screen dimming
- When xfpm prevents screen dimming because of fullscreen windows or because of the DBus interface, it displays in the panel plugin which window is blocking inhibition
I'm assigning myself to this bug but comments / confirmation that this would work / criticism are all welcome. Targeting 4.16.
Originally reported on Reddit: https://www.reddit.com/r/xfce/comments/4mi1cy/tipbash_toogle_presentation_mode_onoff_if_a/
Version: git