mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-08 08:21:12 -04:00
Replace view_wlr_surface_at impl with scene-graph
This commit is contained in:
parent
17b48b6823
commit
4fc4f88efe
4 changed files with 1 additions and 17 deletions
2
view.c
2
view.c
|
|
@ -300,5 +300,5 @@ view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface)
|
||||||
struct wlr_surface *
|
struct wlr_surface *
|
||||||
view_wlr_surface_at(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y)
|
view_wlr_surface_at(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y)
|
||||||
{
|
{
|
||||||
return view->impl->wlr_surface_at(view, sx, sy, sub_x, sub_y);
|
return wlr_scene_node_surface_at(&view->scene_surface->node, sx, sy, sub_x, sub_y);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
view.h
1
view.h
|
|
@ -45,7 +45,6 @@ struct cg_view_impl {
|
||||||
void (*activate)(struct cg_view *view, bool activate);
|
void (*activate)(struct cg_view *view, bool activate);
|
||||||
void (*maximize)(struct cg_view *view, int output_width, int output_height);
|
void (*maximize)(struct cg_view *view, int output_width, int output_height);
|
||||||
void (*destroy)(struct cg_view *view);
|
void (*destroy)(struct cg_view *view);
|
||||||
struct wlr_surface *(*wlr_surface_at)(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cg_view_child {
|
struct cg_view_child {
|
||||||
|
|
|
||||||
|
|
@ -226,13 +226,6 @@ destroy(struct cg_view *view)
|
||||||
free(xdg_shell_view);
|
free(xdg_shell_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct wlr_surface *
|
|
||||||
wlr_surface_at(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y)
|
|
||||||
{
|
|
||||||
struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view);
|
|
||||||
return wlr_xdg_surface_surface_at(xdg_shell_view->xdg_surface, sx, sy, sub_x, sub_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_shell_surface_request_fullscreen(struct wl_listener *listener, void *data)
|
handle_xdg_shell_surface_request_fullscreen(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
|
|
@ -300,7 +293,6 @@ static const struct cg_view_impl xdg_shell_view_impl = {
|
||||||
.activate = activate,
|
.activate = activate,
|
||||||
.maximize = maximize,
|
.maximize = maximize,
|
||||||
.destroy = destroy,
|
.destroy = destroy,
|
||||||
.wlr_surface_at = wlr_surface_at,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -96,12 +96,6 @@ destroy(struct cg_view *view)
|
||||||
free(xwayland_view);
|
free(xwayland_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct wlr_surface *
|
|
||||||
wlr_surface_at(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y)
|
|
||||||
{
|
|
||||||
return wlr_surface_surface_at(view->wlr_surface, sx, sy, sub_x, sub_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xwayland_surface_request_fullscreen(struct wl_listener *listener, void *data)
|
handle_xwayland_surface_request_fullscreen(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
|
|
@ -173,7 +167,6 @@ static const struct cg_view_impl xwayland_view_impl = {
|
||||||
.activate = activate,
|
.activate = activate,
|
||||||
.maximize = maximize,
|
.maximize = maximize,
|
||||||
.destroy = destroy,
|
.destroy = destroy,
|
||||||
.wlr_surface_at = wlr_surface_at,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue