diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-01 19:59:36 +1000 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-05-01 07:46:57 -0400 |
commit | 83952c52019ceee95e9293398bdc5f723db773eb (patch) | |
tree | 5e922911c47af879ccb86c62f6ab2c472f9e5d61 /sway | |
parent | Allow clicking view decorations to focus view (diff) | |
download | sway-83952c52019ceee95e9293398bdc5f723db773eb.tar.gz sway-83952c52019ceee95e9293398bdc5f723db773eb.tar.zst sway-83952c52019ceee95e9293398bdc5f723db773eb.zip |
Restore view_update_position()
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 4903b3a4..05a9b277 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -353,6 +353,19 @@ void view_unmap(struct sway_view *view) { | |||
353 | } | 353 | } |
354 | } | 354 | } |
355 | 355 | ||
356 | void view_update_position(struct sway_view *view, double ox, double oy) { | ||
357 | if (view->swayc->x == ox && view->swayc->y == oy) { | ||
358 | return; | ||
359 | } | ||
360 | |||
361 | // TODO: Only allow this if the view is floating (this function will only be | ||
362 | // called in response to wayland clients wanting to reposition themselves). | ||
363 | view_damage(view, true); | ||
364 | view->swayc->x = ox; | ||
365 | view->swayc->y = oy; | ||
366 | view_damage(view, true); | ||
367 | } | ||
368 | |||
356 | void view_update_size(struct sway_view *view, int width, int height) { | 369 | void view_update_size(struct sway_view *view, int width, int height) { |
357 | if (view->width == width && view->height == height) { | 370 | if (view->width == width && view->height == height) { |
358 | return; | 371 | return; |