mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-02 07:15:47 -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
17
xwayland.c
17
xwayland.c
|
|
@ -103,24 +103,12 @@ handle_xwayland_surface_request_fullscreen(struct wl_listener *listener, void *d
|
|||
wlr_xwayland_surface_set_fullscreen(xwayland_view->xwayland_surface, xwayland_surface->fullscreen);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_xwayland_surface_commit(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct cg_xwayland_view *xwayland_view = wl_container_of(listener, xwayland_view, commit);
|
||||
struct cg_view *view = &xwayland_view->view;
|
||||
view_damage_part(view);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_xwayland_surface_unmap(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct cg_xwayland_view *xwayland_view = wl_container_of(listener, xwayland_view, unmap);
|
||||
struct cg_view *view = &xwayland_view->view;
|
||||
|
||||
view_damage_whole(view);
|
||||
|
||||
wl_list_remove(&xwayland_view->commit.link);
|
||||
|
||||
view_unmap(view);
|
||||
}
|
||||
|
||||
|
|
@ -135,12 +123,7 @@ handle_xwayland_surface_map(struct wl_listener *listener, void *data)
|
|||
view->ly = xwayland_view->xwayland_surface->y;
|
||||
}
|
||||
|
||||
xwayland_view->commit.notify = handle_xwayland_surface_commit;
|
||||
wl_signal_add(&xwayland_view->xwayland_surface->surface->events.commit, &xwayland_view->commit);
|
||||
|
||||
view_map(view, xwayland_view->xwayland_surface->surface);
|
||||
|
||||
view_damage_whole(view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue