Web: monitor API improvements (#3847)

- Improved the documentation to point users into the right direction from all kinds of methods and types.
- De-duplicated some code and added more comments.
- Implement an ID system to correctly and efficiently implement `Eq`, `Hash`, `Ord`, `PartialEq` and `PartialOrd`.
- Fixed screen locking support being cached thread local, ergo calling from a different thread would require to make the check again, not fulfilling its purpose as a fast-path at all.
This commit is contained in:
daxpedda 2024-08-04 16:49:19 +02:00 committed by GitHub
parent 42ba0a74e0
commit 586255ac0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 296 additions and 173 deletions

View file

@ -652,7 +652,7 @@ impl ActiveEventLoop {
}
pub(crate) fn request_detailed_monitor_permission(&self) -> MonitorPermissionFuture {
self.runner.monitor().request_detailed_monitor_permission(self.runner.weak())
self.runner.monitor().request_detailed_monitor_permission()
}
pub(crate) fn has_detailed_monitor_permission(&self) -> bool {