diff --git a/include/desktop/view.h b/include/desktop/view.h index ad4acbb..832c146 100644 --- a/include/desktop/view.h +++ b/include/desktop/view.h @@ -49,8 +49,8 @@ struct kiwmi_view { struct wl_listener request_move; struct wl_listener request_resize; - double x; - double y; + int x; + int y; bool mapped; bool hidden; diff --git a/kiwmi/desktop/output.c b/kiwmi/desktop/output.c index 4f6814c..9d6d9cb 100644 --- a/kiwmi/desktop/output.c +++ b/kiwmi/desktop/output.c @@ -39,8 +39,8 @@ render_layer_surface(struct wlr_surface *surface, int x, int y, void *data) return; } - double ox = rdata->output_lx + x + geom->x; - double oy = rdata->output_ly + y + geom->y; + int ox = rdata->output_lx + x + geom->x; + int oy = rdata->output_ly + y + geom->y; struct wlr_box box = { .x = ox * output->scale, @@ -84,8 +84,8 @@ render_surface(struct wlr_surface *surface, int sx, int sy, void *data) return; } - double ox = rdata->output_lx + sx + view->x - view->geom.x; - double oy = rdata->output_ly + sy + view->y - view->geom.y; + int ox = rdata->output_lx + sx + view->x - view->geom.x; + int oy = rdata->output_ly + sy + view->y - view->geom.y; struct wlr_box box = { .x = ox * output->scale, diff --git a/kiwmi/input/cursor.c b/kiwmi/input/cursor.c index 5754941..d2b4ede 100644 --- a/kiwmi/input/cursor.c +++ b/kiwmi/input/cursor.c @@ -42,8 +42,8 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time) } case KIWMI_CURSOR_RESIZE: { struct kiwmi_view *view = cursor->grabbed.view; - double dx = cursor->cursor->x - cursor->grabbed.orig_x; - double dy = cursor->cursor->y - cursor->grabbed.orig_y; + int dx = cursor->cursor->x - cursor->grabbed.orig_x; + int dy = cursor->cursor->y - cursor->grabbed.orig_y; struct wlr_box new_geom = { .x = view->x, diff --git a/kiwmi/luak/kiwmi_view.c b/kiwmi/luak/kiwmi_view.c index 12cf1e7..c154dc6 100644 --- a/kiwmi/luak/kiwmi_view.c +++ b/kiwmi/luak/kiwmi_view.c @@ -191,8 +191,8 @@ l_kiwmi_view_pos(lua_State *L) struct kiwmi_view *view = *(struct kiwmi_view **)luaL_checkudata(L, 1, "kiwmi_view"); - lua_pushnumber(L, view->x); - lua_pushnumber(L, view->y); + lua_pushinteger(L, view->x); + lua_pushinteger(L, view->y); return 2; }