diff --git a/view.h b/view.h index 8324ca2..5a7ecd4 100644 --- a/view.h +++ b/view.h @@ -36,8 +36,6 @@ struct cg_view { struct cg_view_impl { char *(*get_title)(const struct cg_view *view); - void (*get_geometry)(const struct cg_view *view, int *width_out, - int *height_out); bool (*is_primary)(const struct cg_view *view); void (*activate)(struct cg_view *view, bool activate); void (*close)(struct cg_view *view); diff --git a/xdg_shell.c b/xdg_shell.c index 514ce97..5a85982 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -183,17 +183,6 @@ get_title(const struct cg_view *view) { return xdg_shell_view->xdg_surface->toplevel->title; } -static void -get_geometry(const struct cg_view *view, int *width_out, int *height_out) { - const struct cg_xdg_shell_view *xdg_shell_view = - xdg_shell_view_from_const_view(view); - struct wlr_box geom; - - wlr_xdg_surface_get_geometry(xdg_shell_view->xdg_surface, &geom); - *width_out = geom.width; - *height_out = geom.height; -} - static bool is_primary(const struct cg_view *view) { const struct cg_xdg_shell_view *xdg_shell_view = @@ -324,7 +313,6 @@ handle_xdg_shell_surface_destroy(struct wl_listener *listener, void *_data) { static const struct cg_view_impl xdg_shell_view_impl = { .get_title = get_title, - .get_geometry = get_geometry, .is_primary = is_primary, .activate = activate, .close = close, diff --git a/xwayland.c b/xwayland.c index e5f505b..b790527 100644 --- a/xwayland.c +++ b/xwayland.c @@ -48,14 +48,6 @@ get_title(const struct cg_view *view) { return xwayland_view->xwayland_surface->title; } -static void -get_geometry(const struct cg_view *view, int *width_out, int *height_out) { - const struct cg_xwayland_view *xwayland_view = - xwayland_view_from_const_view(view); - *width_out = xwayland_view->xwayland_surface->width; - *height_out = xwayland_view->xwayland_surface->height; -} - static bool is_primary(const struct cg_view *view) { const struct cg_xwayland_view *xwayland_view = @@ -210,7 +202,6 @@ handle_xwayland_surface_destroy(struct wl_listener *listener, void *_data) { static const struct cg_view_impl xwayland_view_impl = { .get_title = get_title, - .get_geometry = get_geometry, .is_primary = is_primary, .activate = activate, .close = close,