Use view->scene_tree as toplevel for view + some legwork:

desktop.c move_to_front() calls wlr_scene_node_raise_to_top
desktop.c, ssd/include.h add LAB_SSD_{OSD, MENU, LAYER_SURFACE} enums
desktop.c desktop_surface_and_view_at() -> desktop_node_and_view_at()
cursor.c reenable cursor_rebase()
cursor.c reenable button click on layer surface
This commit is contained in:
Consolatis 2022-02-18 00:07:37 +01:00 committed by Johan Malm
parent 688abf7db1
commit 7ea733761b
7 changed files with 126 additions and 64 deletions

View file

@ -31,7 +31,7 @@ view_move(struct view *view, double x, double y)
view->impl->move(view, x, y);
}
view_discover_output(view);
wlr_scene_node_set_position(view->scene_node, view->x, view->y);
wlr_scene_node_set_position(&view->scene_tree->node, view->x, view->y);
}
void
@ -45,7 +45,7 @@ view_move_resize(struct view *view, struct wlr_box geo)
}
ssd_update_title(view);
view_discover_output(view);
wlr_scene_node_set_position(view->scene_node, view->x, view->y);
wlr_scene_node_set_position(&view->scene_tree->node, view->x, view->y);
}
#define MIN_VIEW_WIDTH (100)
@ -147,7 +147,7 @@ view_center(struct view *view)
if (view_compute_centered_position(view, view->w, view->h, &x, &y)) {
view_move(view, x, y);
}
wlr_scene_node_set_position(view->scene_node, view->x, view->y);
wlr_scene_node_set_position(&view->scene_tree->node, view->x, view->y);
}
static void
@ -223,7 +223,7 @@ view_maximize(struct view *view, bool maximize)
if (view->fullscreen) {
return;
}
wlr_scene_node_set_position(view->scene_node, view->x, view->y);
wlr_scene_node_set_position(&view->scene_tree->node, view->x, view->y);
if (view->impl->maximize) {
view->impl->maximize(view, maximize);
}