aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index a38687c1..00b57103 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -161,11 +161,11 @@ struct cmd_results *cmd_move(int argc, char **argv) {
161 wlc_view_get_visible_geometry(view->handle, &g); 161 wlc_view_get_visible_geometry(view->handle, &g);
162 const struct wlc_size *size = wlc_output_get_resolution(output->handle); 162 const struct wlc_size *size = wlc_output_get_resolution(output->handle);
163 163
164 struct wlc_point origin; 164 double x_pos, y_pos;
165 wlc_pointer_get_position(&origin); 165 wlc_pointer_get_position_v2(&x_pos, &y_pos);
166 166
167 int32_t x = origin.x - g.size.w / 2; 167 int32_t x = x_pos - g.size.w / 2;
168 int32_t y = origin.y - g.size.h / 2; 168 int32_t y = y_pos - g.size.h / 2;
169 169
170 uint32_t w = size->w - g.size.w; 170 uint32_t w = size->w - g.size.w;
171 uint32_t h = size->h - g.size.h; 171 uint32_t h = size->h - g.size.h;