config: allow configuring the pointer-revert-key
This commit is contained in:
parent
7b62909bb4
commit
599f0a8ae5
12 changed files with 98 additions and 4 deletions
|
|
@ -1736,6 +1736,10 @@ impl ConfigClient {
|
|||
self.window_match_handlers.borrow_mut().remove(&matcher);
|
||||
}
|
||||
|
||||
pub fn set_pointer_revert_key(&self, seat: Seat, key: KeySym) {
|
||||
self.send(&ClientMessage::SetPointerRevertKey { seat, key });
|
||||
}
|
||||
|
||||
fn handle_msg(&self, msg: &[u8]) {
|
||||
self.handle_msg2(msg);
|
||||
self.dispatch_futures();
|
||||
|
|
|
|||
|
|
@ -706,6 +706,10 @@ pub enum ClientMessage<'a> {
|
|||
matcher: WindowMatcher,
|
||||
tile_state: TileState,
|
||||
},
|
||||
SetPointerRevertKey {
|
||||
seat: Seat,
|
||||
key: KeySym,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use {
|
|||
_private::{DEFAULT_SEAT_NAME, ipc::WorkspaceSource},
|
||||
Axis, Direction, ModifiedKeySym, Workspace,
|
||||
input::{acceleration::AccelProfile, capability::Capability},
|
||||
keyboard::{Keymap, mods::Modifiers},
|
||||
keyboard::{Keymap, mods::Modifiers, syms::KeySym},
|
||||
video::Connector,
|
||||
window::Window,
|
||||
},
|
||||
|
|
@ -493,6 +493,16 @@ impl Seat {
|
|||
pub fn focus_window(self, window: Window) {
|
||||
get!().focus_window(self, window)
|
||||
}
|
||||
|
||||
/// Sets the key that can be used to revert the pointer to the default state.
|
||||
///
|
||||
/// Pressing this key cancels any grabs, drags, selections, etc.
|
||||
///
|
||||
/// The default is `SYM_Escape`. Setting this to `SYM_NoSymbol` effectively disables
|
||||
/// this functionality.
|
||||
pub fn set_pointer_revert_key(self, sym: KeySym) {
|
||||
get!().set_pointer_revert_key(self, sym);
|
||||
}
|
||||
}
|
||||
|
||||
/// A focus-follows-mouse mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue