add toggle focus between floating and tiled layers
Adds focus_floats(), toggle_focus_float_tiled(), and their IPC bindings so users can bind a key to swap focus between the floating and tiled layers.
This commit is contained in:
parent
23ad546a39
commit
d353779c10
8 changed files with 82 additions and 0 deletions
|
|
@ -399,6 +399,14 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::SeatFocusTiles { seat });
|
||||
}
|
||||
|
||||
pub fn seat_focus_floats(&self, seat: Seat) {
|
||||
self.send(&ClientMessage::SeatFocusFloats { seat });
|
||||
}
|
||||
|
||||
pub fn seat_toggle_focus_float_tiled(&self, seat: Seat) {
|
||||
self.send(&ClientMessage::SeatToggleFocusFloatTiled { seat });
|
||||
}
|
||||
|
||||
pub fn seat_focus(&self, seat: Seat, direction: Direction) {
|
||||
self.send(&ClientMessage::SeatFocus { seat, direction });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -747,6 +747,12 @@ pub enum ClientMessage<'a> {
|
|||
SeatFocusTiles {
|
||||
seat: Seat,
|
||||
},
|
||||
SeatFocusFloats {
|
||||
seat: Seat,
|
||||
},
|
||||
SeatToggleFocusFloatTiled {
|
||||
seat: Seat,
|
||||
},
|
||||
SetMiddleClickPasteEnabled {
|
||||
enabled: bool,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -321,6 +321,19 @@ impl Seat {
|
|||
get!().seat_focus_tiles(self)
|
||||
}
|
||||
|
||||
/// Moves the keyboard focus to the topmost floating window.
|
||||
pub fn focus_floats(self) {
|
||||
get!().seat_focus_floats(self)
|
||||
}
|
||||
|
||||
/// Toggles keyboard focus between the floating and tiled layers.
|
||||
///
|
||||
/// If focus is on the tiled or fullscreen layer, focus moves to the topmost float.
|
||||
/// If focus is on the floating layer, focus moves to the tiled layer.
|
||||
pub fn toggle_focus_float_tiled(self) {
|
||||
get!().seat_toggle_focus_float_tiled(self)
|
||||
}
|
||||
|
||||
/// Moves the keyboard focus of the seat in the specified direction.
|
||||
pub fn focus(self, direction: Direction) {
|
||||
get!().seat_focus(self, direction)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue