diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-07-12 16:39:14 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-07-12 16:39:14 +1200 |
commit | c29e5bbde84260763eaece5b47c219fd1fff7883 (patch) | |
tree | 790e8df3d1e91f63fb719611032a05f42b54b53e /sway/commands | |
parent | Merge pull request #1271 from johalun/master-securityconf-freebsd (diff) | |
download | sway-c29e5bbde84260763eaece5b47c219fd1fff7883.tar.gz sway-c29e5bbde84260763eaece5b47c219fd1fff7883.tar.zst sway-c29e5bbde84260763eaece5b47c219fd1fff7883.zip |
Use WLC v2 pointer interface
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/move.c | 8 |
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; |