aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-07-12 09:08:49 -0400
committerGitHub <noreply@github.com>2017-07-12 09:08:49 -0400
commit13ed84e8865c02b808444202e6e347d870c5d0e9 (patch)
tree790e8df3d1e91f63fb719611032a05f42b54b53e /sway/commands
parentdf17a268b92aef2ff0fbcc14d7a2457cbb0968b1 (diff)
parentc29e5bbde84260763eaece5b47c219fd1fff7883 (diff)
downloadsway-13ed84e8865c02b808444202e6e347d870c5d0e9.tar.xz
Merge pull request #1272 from ascent12/pointer-fix
Use WLC v2 pointer interface
Diffstat (limited to 'sway/commands')
-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) {
wlc_view_get_visible_geometry(view->handle, &g);
const struct wlc_size *size = wlc_output_get_resolution(output->handle);
- struct wlc_point origin;
- wlc_pointer_get_position(&origin);
+ double x_pos, y_pos;
+ wlc_pointer_get_position_v2(&x_pos, &y_pos);
- int32_t x = origin.x - g.size.w / 2;
- int32_t y = origin.y - g.size.h / 2;
+ int32_t x = x_pos - g.size.w / 2;
+ int32_t y = y_pos - g.size.h / 2;
uint32_t w = size->w - g.size.w;
uint32_t h = size->h - g.size.h;