config: make ui dragging configurable
This commit is contained in:
parent
1dd20fb87b
commit
d8ee1ac19c
19 changed files with 255 additions and 12 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
|
|
@ -517,6 +517,12 @@ pub enum ClientMessage<'a> {
|
|||
device: DrmDevice,
|
||||
margin: Duration,
|
||||
},
|
||||
SetUiDragEnabled {
|
||||
enabled: bool,
|
||||
},
|
||||
SetUiDragThreshold {
|
||||
threshold: i32,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -234,3 +234,17 @@ pub fn set_idle(timeout: Option<Duration>) {
|
|||
pub fn set_explicit_sync_enabled(enabled: bool) {
|
||||
get!().set_explicit_sync_enabled(enabled);
|
||||
}
|
||||
|
||||
/// Enables or disables dragging of tiles and workspaces.
|
||||
///
|
||||
/// The default is `true`.
|
||||
pub fn set_ui_drag_enabled(enabled: bool) {
|
||||
get!().set_ui_drag_enabled(enabled);
|
||||
}
|
||||
|
||||
/// Sets the distance at which ui dragging starts.
|
||||
///
|
||||
/// The default is `10`.
|
||||
pub fn set_ui_drag_threshold(threshold: i32) {
|
||||
get!().set_ui_drag_threshold(threshold);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue