]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: view_move() s/double/int/ for x and y
authorJohan Malm <jgm323@gmail.com>
Wed, 17 Aug 2022 20:41:49 +0000 (21:41 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 18 Aug 2022 18:50:25 +0000 (19:50 +0100)
include/labwc.h
src/view.c
src/xdg.c
src/xwayland.c

index cf62f60f7dcb63dc7e4fc7cd0e8bdfb896e8eada..49144e9408da6ddd6106e49ba485dc9d3685b2ce 100644 (file)
@@ -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 */
index 82b47db399a57ca77cba193122c121b85df71481..e50a18bf15d14b4ac5aa89cf088896df8dd3c694 100644 (file)
@@ -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);
index f2b9b6b84be8dfefb42d5d5df24cf9373ac48735..c52c2084d254131595fcc4c45eb6e5ca8aa5b33d 100644 (file)
--- 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;
index beb21ec042103bf48da96f909bbfd92a2f30898a..41f51c78f583b7085a67af121e427b6d8bdcad7e 100644 (file)
@@ -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);