From 52d1e32b59a2bc3e5222ff2aa1102dbe910c4127 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Wed, 17 Aug 2022 21:41:49 +0100 Subject: [PATCH] view: view_move() s/double/int/ for x and y --- include/labwc.h | 6 +++--- src/view.c | 2 +- src/xdg.c | 2 +- src/xwayland.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/labwc.h b/include/labwc.h index cf62f60f..49144e94 100644 --- a/include/labwc.h +++ b/include/labwc.h @@ -272,7 +272,7 @@ struct view_impl { void (*close)(struct view *view); const char *(*get_string_prop)(struct view *view, const char *prop); void (*map)(struct view *view); - void (*move)(struct view *view, double x, double y); + void (*move)(struct view *view, int x, int y); void (*set_activated)(struct view *view, bool activated); void (*set_fullscreen)(struct view *view, bool fullscreen); void (*unmap)(struct view *view); @@ -326,7 +326,7 @@ struct view { struct view_pending_move_resize { bool update_x, update_y; - double x, y; + int x, y; uint32_t width, height; uint32_t configure_serial; } pending_move_resize; @@ -418,7 +418,7 @@ void view_close(struct view *view); * For move only, use view_move() */ void view_move_resize(struct view *view, struct wlr_box geo); -void view_move(struct view *view, double x, double y); +void view_move(struct view *view, int x, int y); void view_moved(struct view *view); void view_minimize(struct view *view, bool minimized); /* view_wlr_output - return the output that a view is mostly on */ diff --git a/src/view.c b/src/view.c index 82b47db3..e50a18bf 100644 --- a/src/view.c +++ b/src/view.c @@ -119,7 +119,7 @@ view_close(struct view *view) } void -view_move(struct view *view, double x, double y) +view_move(struct view *view, int x, int y) { if (view->impl->move) { view->impl->move(view, x, y); diff --git a/src/xdg.c b/src/xdg.c index f2b9b6b8..c52c2084 100644 --- a/src/xdg.c +++ b/src/xdg.c @@ -186,7 +186,7 @@ xdg_toplevel_view_configure(struct view *view, struct wlr_box geo) } static void -xdg_toplevel_view_move(struct view *view, double x, double y) +xdg_toplevel_view_move(struct view *view, int x, int y) { view->x = x; view->y = y; diff --git a/src/xwayland.c b/src/xwayland.c index beb21ec0..41f51c78 100644 --- a/src/xwayland.c +++ b/src/xwayland.c @@ -204,7 +204,7 @@ handle_set_class(struct wl_listener *listener, void *data) } static void -move(struct view *view, double x, double y) +move(struct view *view, int x, int y) { assert(view->xwayland_surface); -- 2.52.0