@@ -226,19 +226,26 @@ pub trait EventLoopExtWeb {
226226 /// [`ControlFlow::WaitUntil`]: crate::event_loop::ControlFlow::WaitUntil
227227 fn wait_until_strategy ( & self ) -> WaitUntilStrategy ;
228228
229- /// Returns if the users device has multiple screens.
229+ /// Returns if the users device has multiple screens. Useful to check before prompting the user
230+ /// with [`EventLoopExtWeb::request_detailed_monitor_permission()`].
230231 ///
231232 /// Browsers might always return [`false`] to reduce fingerprinting.
232233 fn has_multiple_screens ( & self ) -> Result < bool , NotSupportedError > ;
233234
234235 /// Prompts the user for permission to query detailed information about available monitors. The
235236 /// returned [`MonitorPermissionFuture`] can be dropped without aborting the request.
236237 ///
238+ /// Check [`EventLoopExtWeb::has_multiple_screens()`] before unnecessarily prompting the user
239+ /// for such permissions.
240+ ///
237241 /// [`MonitorHandle`]s don't automatically make use of this after permission is granted. New
238242 /// [`MonitorHandle`]s have to be created instead.
239243 fn request_detailed_monitor_permission ( & self ) -> MonitorPermissionFuture ;
240244
241245 /// Returns whether the user has given permission to access detailed monitor information.
246+ ///
247+ /// [`MonitorHandle`]s don't automatically make use of detailed monitor information after
248+ /// permission is granted. New [`MonitorHandle`]s have to be created instead.
242249 fn has_detailed_monitor_permission ( & self ) -> HasMonitorPermissionFuture ;
243250}
244251
@@ -314,22 +321,26 @@ pub trait ActiveEventLoopExtWeb {
314321 /// [`CursorGrabMode::Locked`]: crate::window::CursorGrabMode::Locked
315322 fn is_cursor_lock_raw ( & self ) -> bool ;
316323
317- /// Returns if the users device has multiple screens.
324+ /// Returns if the users device has multiple screens. Useful to check before prompting the user
325+ /// with [`EventLoopExtWeb::request_detailed_monitor_permission()`].
318326 ///
319327 /// Browsers might always return [`false`] to reduce fingerprinting.
320328 fn has_multiple_screens ( & self ) -> Result < bool , NotSupportedError > ;
321329
322330 /// Prompts the user for permission to query detailed information about available monitors. The
323331 /// returned [`MonitorPermissionFuture`] can be dropped without aborting the request.
324332 ///
333+ /// Check [`EventLoopExtWeb::has_multiple_screens()`] before unnecessarily prompting the user
334+ /// for such permissions.
335+ ///
325336 /// [`MonitorHandle`]s don't automatically make use of this after permission is granted. New
326337 /// [`MonitorHandle`]s have to be created instead.
327338 fn request_detailed_monitor_permission ( & self ) -> MonitorPermissionFuture ;
328339
329340 /// Returns whether the user has given permission to access detailed monitor information.
330341 ///
331- /// [`MonitorHandle`]s don't automatically make use of this after permission is granted. New
332- /// [`MonitorHandle`]s have to be created instead.
342+ /// [`MonitorHandle`]s don't automatically make use of detailed monitor information after
343+ /// permission is granted. New [`MonitorHandle`]s have to be created instead.
333344 fn has_detailed_monitor_permission ( & self ) -> bool ;
334345}
335346
@@ -608,7 +619,9 @@ pub trait MonitorHandleExtWeb {
608619 /// Will fail if a locking call is in progress.
609620 fn unlock ( & self ) -> Result < ( ) , OrientationLockError > ;
610621
611- /// Returns whether this [`MonitorHandle`] was created using detailed monitor permissions.
622+ /// Returns whether this [`MonitorHandle`] was created using detailed monitor permissions. If
623+ /// [`false`] will always represent the current monitor the browser window is in instead of a
624+ /// specific monitor.
612625 ///
613626 /// See [`ActiveEventLoop::request_detailed_monitor_permission()`].
614627 fn is_detailed ( & self ) -> bool ;
0 commit comments