diff options
author | D.B <thejan.2009@gmail.com> | 2016-07-21 22:12:41 +0200 |
---|---|---|
committer | D.B <thejan.2009@gmail.com> | 2016-07-21 22:21:49 +0200 |
commit | b893f07ce19c999f7358c39bf8019c7df984248b (patch) | |
tree | 5ad3b037792f502ada9fd311bc7761c98ed42160 | |
parent | f181bf9c542ccb0478f653bbab76f60ac198a800 (diff) |
calculate borders for hiding from workspace geometry
-rw-r--r-- | sway/layout.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sway/layout.c b/sway/layout.c index faa108a1..80c74c16 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -571,29 +571,22 @@ void update_geometry(swayc_t *container) { // handle hide_edge_borders if (config->hide_edge_borders != E_NONE && (gap <= 0 || (config->smart_gaps && ws->children->length == 1))) { - swayc_t *output = swayc_parent_by_type(container, C_OUTPUT); - const struct wlc_size *size = wlc_output_get_resolution(output->handle); - if (config->hide_edge_borders == E_HORIZONTAL || config->hide_edge_borders == E_BOTH) { - if (geometry.origin.x == 0 || geometry.origin.x == container->x) { - // should work for swaybar at left + if (geometry.origin.x == ws->x) { border_left = 0; } - if (geometry.origin.x + geometry.size.w == size->w || geometry.size.w == container->width) { - // should work for swaybar at right + if (geometry.origin.x + geometry.size.w == ws->width) { border_right = 0; } } if (config->hide_edge_borders == E_VERTICAL || config->hide_edge_borders == E_BOTH) { - if (geometry.origin.y == 0 || geometry.origin.y == container->y) { - // this works for swaybar at top + if (geometry.origin.y == ws->y) { border_top = 0; } - if (geometry.origin.y + geometry.size.h == size->h || geometry.size.h == container->height) { - // this works for swaybar at bottom + if (geometry.origin.y + geometry.size.h == ws->height) { border_bottom = 0; } } |