obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

libobs/util: Improve inhibit functions on Linux

Open tytan652 opened this issue 1 year ago • 0 comments

Description

Avoid creating the screensaver inhibitor thread when another method has been applied.

Make inhibition unavailable in a Flatpak if portal is not available.

Motivation and Context

  1. If the Portal or the D-Bus method is in place, adding the xdg-screensaver thread is overkill. It should be just a fallback.
  2. Flatpak only support the Portal method, so spamming xdg-screensaver will do nothing

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Tweak (non-breaking change to improve existing functionality)
  • Performance enhancement (non-breaking change which improves efficiency)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [ ] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

tytan652 avatar May 29 '24 20:05 tytan652