mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-18 05:34:42 -04:00
Use scene-graph for damage tracking
References: https://github.com/swaywm/wlroots/pull/3117
This commit is contained in:
parent
128fa90ea1
commit
d46e8a82dd
13 changed files with 11 additions and 299 deletions
14
seat.c
14
seat.c
|
|
@ -587,15 +587,6 @@ handle_cursor_motion(struct wl_listener *listener, void *data)
|
|||
wlr_idle_notify_activity(seat->server->idle, seat->seat);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_icon_damage(struct cg_drag_icon *drag_icon)
|
||||
{
|
||||
struct cg_output *output;
|
||||
wl_list_for_each (output, &drag_icon->seat->server->outputs, link) {
|
||||
output_damage_surface(output, drag_icon->wlr_drag_icon->surface, drag_icon->lx, drag_icon->ly, true);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drag_icon_update_position(struct cg_drag_icon *drag_icon)
|
||||
{
|
||||
|
|
@ -603,8 +594,6 @@ drag_icon_update_position(struct cg_drag_icon *drag_icon)
|
|||
struct cg_seat *seat = drag_icon->seat;
|
||||
struct wlr_touch_point *point;
|
||||
|
||||
drag_icon_damage(drag_icon);
|
||||
|
||||
switch (wlr_icon->drag->grab_type) {
|
||||
case WLR_DRAG_GRAB_KEYBOARD:
|
||||
return;
|
||||
|
|
@ -622,8 +611,6 @@ drag_icon_update_position(struct cg_drag_icon *drag_icon)
|
|||
break;
|
||||
}
|
||||
|
||||
drag_icon_damage(drag_icon);
|
||||
|
||||
wlr_scene_node_set_position(drag_icon->scene_node, drag_icon->lx, drag_icon->ly);
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +619,6 @@ handle_drag_icon_destroy(struct wl_listener *listener, void *data)
|
|||
{
|
||||
struct cg_drag_icon *drag_icon = wl_container_of(listener, drag_icon, destroy);
|
||||
|
||||
drag_icon_damage(drag_icon);
|
||||
wl_list_remove(&drag_icon->link);
|
||||
wl_list_remove(&drag_icon->destroy.link);
|
||||
wlr_scene_node_destroy(drag_icon->scene_node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue