1
0
Fork 0
forked from wry/wry

all: add support for hy3 like tiling

This commit is contained in:
kossLAN 2026-04-10 13:16:35 -04:00
parent a41dbae899
commit cea4187fc0
No known key found for this signature in database
21 changed files with 1237 additions and 48 deletions

View file

@ -83,7 +83,7 @@ use {
rect::Rect,
state::{DeviceHandlerData, State},
tree::{
ContainerNode, ContainerSplit, Direction, FoundNode, Node, NodeId, NodeLayer,
ContainerNode, ContainerSplit, ChangeGroupAction, Direction, FoundNode, Node, NodeId, NodeLayer,
NodeLayerLink, NodeLocation, OutputNode, StackedNode, ToplevelNode, WorkspaceNode,
generic_node_visitor, toplevel_create_split, toplevel_parent_container,
toplevel_set_floating, toplevel_set_workspace,
@ -745,6 +745,40 @@ impl WlSeatGlobal {
toplevel_create_split(&self.state, tl, axis);
}
pub fn toggle_tab(&self) {
if let Some(c) = self.kb_parent_container() {
c.change_group(ChangeGroupAction::ToggleTab);
}
}
pub fn make_group(&self, axis: ContainerSplit, ephemeral: bool) {
if let Some(c) = self.kb_parent_container() {
c.make_group(axis, ephemeral);
}
}
pub fn change_group_opposite(&self) {
if let Some(c) = self.kb_parent_container() {
c.change_group(ChangeGroupAction::Opposite);
}
}
pub fn equalize(&self, recursive: bool) {
if let Some(c) = self.kb_parent_container() {
if recursive {
c.equalize_recursive();
} else {
c.equalize();
}
}
}
pub fn move_tab(&self, right: bool) {
if let Some(c) = self.kb_parent_container() {
c.move_tab(right);
}
}
pub fn focus_parent(self: &Rc<Self>) {
if let Some(tl) = self.keyboard_node.get().node_toplevel()
&& let Some(parent) = tl.tl_data().parent.get()