mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
parent
f0eb115bda
commit
e981cb8a1c
10 changed files with 271 additions and 28 deletions
13
xwayland.c
13
xwayland.c
|
|
@ -107,12 +107,22 @@ wlr_surface_at(struct cg_view *view, double sx, double sy, double *sub_x, double
|
|||
return wlr_surface_surface_at(view->wlr_surface, sx, sy, sub_x, sub_y);
|
||||
}
|
||||
|
||||
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_surface(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;
|
||||
|
||||
wl_list_remove(&xwayland_view->commit.link);
|
||||
|
||||
view_unmap(view);
|
||||
}
|
||||
|
||||
|
|
@ -127,6 +137,9 @@ handle_xwayland_surface_map(struct wl_listener *listener, void *data)
|
|||
view->y = 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);
|
||||
|
||||
xwayland_view->ever_been_mapped = true;
|
||||
view_map(view, xwayland_view->xwayland_surface->surface);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue