diff --git a/include/desktop/view.h b/include/desktop/view.h index 04e1025..f1c334f 100644 --- a/include/desktop/view.h +++ b/include/desktop/view.h @@ -76,8 +76,6 @@ struct kiwmi_view_impl { wlr_surface_iterator_func_t callback, void *user_data); pid_t (*get_pid)(struct kiwmi_view *view); - void ( - *get_size)(struct kiwmi_view *view, uint32_t *width, uint32_t *height); void (*set_activated)(struct kiwmi_view *view, bool activated); void (*set_size)(struct kiwmi_view *view, uint32_t width, uint32_t height); const char *( diff --git a/kiwmi/desktop/view.c b/kiwmi/desktop/view.c index 75e6439..261e3ab 100644 --- a/kiwmi/desktop/view.c +++ b/kiwmi/desktop/view.c @@ -47,9 +47,8 @@ view_get_pid(struct kiwmi_view *view) void view_get_size(struct kiwmi_view *view, uint32_t *width, uint32_t *height) { - if (view->impl->get_size) { - view->impl->get_size(view, width, height); - } + *width = view->geom.width; + *height = view->geom.height; } const char * diff --git a/kiwmi/desktop/xdg_shell.c b/kiwmi/desktop/xdg_shell.c index d24ab50..7d87785 100644 --- a/kiwmi/desktop/xdg_shell.c +++ b/kiwmi/desktop/xdg_shell.c @@ -382,19 +382,6 @@ xdg_shell_view_get_pid(struct kiwmi_view *view) return pid; } -static void -xdg_shell_view_get_size( - struct kiwmi_view *view, - uint32_t *width, - uint32_t *height) -{ - struct wlr_box geom; - wlr_xdg_surface_get_geometry(view->xdg_surface, &geom); - - *width = geom.width; - *height = geom.height; -} - static const char * xdg_shell_view_get_string_prop( struct kiwmi_view *view, @@ -446,7 +433,6 @@ static const struct kiwmi_view_impl xdg_shell_view_impl = { .close = xdg_shell_view_close, .for_each_mapped_surface = xdg_shell_view_for_each_mapped_surface, .get_pid = xdg_shell_view_get_pid, - .get_size = xdg_shell_view_get_size, .get_string_prop = xdg_shell_view_get_string_prop, .set_activated = xdg_shell_view_set_activated, .set_size = xdg_shell_view_set_size,