mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Add ToggleAlwaysOnTop action
This commit is contained in:
parent
cfca377ca2
commit
6b4d9b9383
8 changed files with 44 additions and 1 deletions
19
src/view.c
19
src/view.c
|
|
@ -281,6 +281,25 @@ view_toggle_decorations(struct view *view)
|
|||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
is_always_on_top(struct view *view)
|
||||
{
|
||||
return view->scene_tree->node.parent ==
|
||||
&view->server->view_tree_always_on_top->node;
|
||||
}
|
||||
|
||||
void
|
||||
view_toggle_always_on_top(struct view *view)
|
||||
{
|
||||
if (is_always_on_top(view)) {
|
||||
wlr_scene_node_reparent(&view->scene_tree->node,
|
||||
&view->server->view_tree->node);
|
||||
} else {
|
||||
wlr_scene_node_reparent(&view->scene_tree->node,
|
||||
&view->server->view_tree_always_on_top->node);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_set_decorations(struct view *view, bool decorations)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue