Skip to content

Commit

Permalink
Improve documentation for CompositorHandler::frame
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldg authored and wash2 committed Oct 20, 2023
1 parent 3564663 commit 05e3f7f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ pub trait CompositorHandler: Sized {

/// A frame callback has been completed.
///
/// This function will be called after sending a [`WlSurface::frame`](wl_surface::WlSurface::frame) request
/// and committing the surface.
/// Frame callbacks are used to avoid updating surfaces that are not currently visible. If a
/// frame callback is requested prior to committing a surface, the client should avoid drawing
/// to that surface until the callback completes. See the
/// [`WlSurface::frame`](wl_surface::WlSurface::frame) request for more details.
///
/// This function will be called if you request a frame callback by passing the surface itself
/// as the userdata (`surface.frame(&queue, &surface)`); you can also implement [`Dispatch`]
/// for other values to more easily dispatch rendering for specific surface types.
fn frame(
&mut self,
conn: &Connection,
Expand Down

0 comments on commit 05e3f7f

Please sign in to comment.