diff --git a/kiwmi/input/cursor.c b/kiwmi/input/cursor.c index 5f253da..9e7c3cc 100644 --- a/kiwmi/input/cursor.c +++ b/kiwmi/input/cursor.c @@ -47,14 +47,14 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time) int dy = cursor->cursor->y - cursor->grabbed.orig_y; struct wlr_box new_geom = { - .x = view->x, - .y = view->y, + .x = cursor->grabbed.orig_geom.x, + .y = cursor->grabbed.orig_geom.y, .width = cursor->grabbed.orig_geom.width, .height = cursor->grabbed.orig_geom.height, }; if (cursor->grabbed.resize_edges & WLR_EDGE_TOP) { - new_geom.y = cursor->grabbed.orig_y + dy; + new_geom.y += dy; new_geom.height -= dy; if (new_geom.height < 1) { new_geom.y += new_geom.height; @@ -64,7 +64,7 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time) } if (cursor->grabbed.resize_edges & WLR_EDGE_LEFT) { - new_geom.x = cursor->grabbed.orig_geom.x + dx; + new_geom.x += dx; new_geom.width -= dx; if (new_geom.width < 1) { new_geom.x += new_geom.width;