1
0
Fork 0
forked from wry/wry

config: make ui dragging configurable

This commit is contained in:
Julian Orth 2024-10-01 11:18:25 +02:00
parent 1dd20fb87b
commit d8ee1ac19c
19 changed files with 255 additions and 12 deletions

View file

@ -748,6 +748,14 @@ impl Client {
self.send(&ClientMessage::SetFlipMargin { device, margin });
}
pub fn set_ui_drag_enabled(&self, enabled: bool) {
self.send(&ClientMessage::SetUiDragEnabled { enabled });
}
pub fn set_ui_drag_threshold(&self, threshold: i32) {
self.send(&ClientMessage::SetUiDragThreshold { threshold });
}
pub fn connector_connected(&self, connector: Connector) -> bool {
let res = self.send_with_response(&ClientMessage::ConnectorConnected { connector });
get_response!(res, false, ConnectorConnected { connected });

View file

@ -517,6 +517,12 @@ pub enum ClientMessage<'a> {
device: DrmDevice,
margin: Duration,
},
SetUiDragEnabled {
enabled: bool,
},
SetUiDragThreshold {
threshold: i32,
},
}
#[derive(Serialize, Deserialize, Debug)]