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
|
|
@ -2359,6 +2359,18 @@ impl ConfigProxyHandler {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_seat_focus_floats(&self, seat: Seat) -> Result<(), CphError> {
|
||||
let seat = self.get_seat(seat)?;
|
||||
seat.focus_floats();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_seat_toggle_focus_float_tiled(&self, seat: Seat) -> Result<(), CphError> {
|
||||
let seat = self.get_seat(seat)?;
|
||||
seat.toggle_focus_float_tiled();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_set_middle_click_paste_enabled(&self, enabled: bool) {
|
||||
self.state.set_primary_selection_enabled(enabled);
|
||||
}
|
||||
|
|
@ -3310,6 +3322,13 @@ impl ConfigProxyHandler {
|
|||
ClientMessage::SeatFocusTiles { seat } => {
|
||||
self.handle_seat_focus_tiles(seat).wrn("seat_focus_tiles")?
|
||||
}
|
||||
ClientMessage::SeatFocusFloats { seat } => {
|
||||
self.handle_seat_focus_floats(seat).wrn("seat_focus_floats")?
|
||||
}
|
||||
ClientMessage::SeatToggleFocusFloatTiled { seat } => {
|
||||
self.handle_seat_toggle_focus_float_tiled(seat)
|
||||
.wrn("seat_toggle_focus_float_tiled")?
|
||||
}
|
||||
ClientMessage::SetMiddleClickPasteEnabled { enabled } => {
|
||||
self.handle_set_middle_click_paste_enabled(enabled)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue