1
0
Fork 0
forked from wry/wry

config: allow disabling explicit-sync

This commit is contained in:
Julian Orth 2024-03-26 15:24:07 +01:00
parent aaf73d6fdc
commit aa296a6aea
12 changed files with 58 additions and 2 deletions

View file

@ -810,6 +810,10 @@ impl Client {
self.send(&ClientMessage::SetIdle { timeout })
}
pub fn set_explicit_sync_enabled(&self, enabled: bool) {
self.send(&ClientMessage::SetExplicitSyncEnabled { enabled })
}
pub fn set_seat(&self, device: InputDevice, seat: Seat) {
self.send(&ClientMessage::SetSeat { device, seat })
}

View file

@ -428,6 +428,9 @@ pub enum ClientMessage<'a> {
workspace: WorkspaceSource,
connector: Connector,
},
SetExplicitSyncEnabled {
enabled: bool,
},
}
#[derive(Serialize, Deserialize, Debug)]

View file

@ -222,3 +222,12 @@ pub fn workspaces() -> Vec<Workspace> {
pub fn set_idle(timeout: Option<Duration>) {
get!().set_idle(timeout.unwrap_or_default())
}
/// Enables or disables explicit sync.
///
/// Calling this after the compositor has started has no effect.
///
/// The default is `true`.
pub fn set_explicit_sync_enabled(enabled: bool) {
get!().set_explicit_sync_enabled(enabled);
}