diff options
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 4d9a87d8..110b958a 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -246,10 +246,10 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object | |||
246 | json_object_object_add(object, "marks", marks); | 246 | json_object_object_add(object, "marks", marks); |
247 | 247 | ||
248 | struct wlr_box window_box = { | 248 | struct wlr_box window_box = { |
249 | c->view->x - c->x, | 249 | c->content_x - c->x, |
250 | (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, | 250 | (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, |
251 | c->view->width, | 251 | c->content_width, |
252 | c->view->height | 252 | c->content_height |
253 | }; | 253 | }; |
254 | 254 | ||
255 | json_object_object_add(object, "window_rect", ipc_json_create_rect(&window_box)); | 255 | json_object_object_add(object, "window_rect", ipc_json_create_rect(&window_box)); |
@@ -258,7 +258,7 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object | |||
258 | 258 | ||
259 | if (c->current.border == B_NORMAL) { | 259 | if (c->current.border == B_NORMAL) { |
260 | deco_box.width = c->width; | 260 | deco_box.width = c->width; |
261 | deco_box.height = c->view->y - c->y; | 261 | deco_box.height = c->content_y - c->y; |
262 | } | 262 | } |
263 | 263 | ||
264 | json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box)); | 264 | json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box)); |