diff options
author | D.B <thejan.2009@gmail.com> | 2016-07-21 22:13:31 +0200 |
---|---|---|
committer | D.B <thejan.2009@gmail.com> | 2016-07-21 22:21:49 +0200 |
commit | 03b0180c302b1f6feeecd39fd76f84f7a99abf34 (patch) | |
tree | da08882e578e55e1a39e2f20ad359330ad20fe7d /sway/layout.c | |
parent | calculate borders for hiding from workspace geometry (diff) | |
download | sway-03b0180c302b1f6feeecd39fd76f84f7a99abf34.tar.gz sway-03b0180c302b1f6feeecd39fd76f84f7a99abf34.tar.zst sway-03b0180c302b1f6feeecd39fd76f84f7a99abf34.zip |
rename ws to workspace for clarity
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/layout.c b/sway/layout.c index 80c74c16..3285560b 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -522,8 +522,8 @@ void update_geometry(swayc_t *container) { | |||
522 | return; | 522 | return; |
523 | } | 523 | } |
524 | 524 | ||
525 | swayc_t *ws = swayc_parent_by_type(container, C_WORKSPACE); | 525 | swayc_t *workspace = swayc_parent_by_type(container, C_WORKSPACE); |
526 | swayc_t *op = ws->parent; | 526 | swayc_t *op = workspace->parent; |
527 | swayc_t *parent = container->parent; | 527 | swayc_t *parent = container->parent; |
528 | 528 | ||
529 | struct wlc_geometry geometry = { | 529 | struct wlc_geometry geometry = { |
@@ -552,7 +552,7 @@ void update_geometry(swayc_t *container) { | |||
552 | geometry.origin.y = 0; | 552 | geometry.origin.y = 0; |
553 | geometry.size.w = size->w; | 553 | geometry.size.w = size->w; |
554 | geometry.size.h = size->h; | 554 | geometry.size.h = size->h; |
555 | if (op->focused == ws) { | 555 | if (op->focused == workspace) { |
556 | wlc_view_bring_to_front(container->handle); | 556 | wlc_view_bring_to_front(container->handle); |
557 | } | 557 | } |
558 | 558 | ||
@@ -570,23 +570,23 @@ void update_geometry(swayc_t *container) { | |||
570 | int border_right = container->border_thickness; | 570 | int border_right = container->border_thickness; |
571 | 571 | ||
572 | // handle hide_edge_borders | 572 | // handle hide_edge_borders |
573 | if (config->hide_edge_borders != E_NONE && (gap <= 0 || (config->smart_gaps && ws->children->length == 1))) { | 573 | if (config->hide_edge_borders != E_NONE && (gap <= 0 || (config->smart_gaps && workspace->children->length == 1))) { |
574 | if (config->hide_edge_borders == E_HORIZONTAL || config->hide_edge_borders == E_BOTH) { | 574 | if (config->hide_edge_borders == E_HORIZONTAL || config->hide_edge_borders == E_BOTH) { |
575 | if (geometry.origin.x == ws->x) { | 575 | if (geometry.origin.x == workspace->x) { |
576 | border_left = 0; | 576 | border_left = 0; |
577 | } | 577 | } |
578 | 578 | ||
579 | if (geometry.origin.x + geometry.size.w == ws->width) { | 579 | if (geometry.origin.x + geometry.size.w == workspace->width) { |
580 | border_right = 0; | 580 | border_right = 0; |
581 | } | 581 | } |
582 | } | 582 | } |
583 | 583 | ||
584 | if (config->hide_edge_borders == E_VERTICAL || config->hide_edge_borders == E_BOTH) { | 584 | if (config->hide_edge_borders == E_VERTICAL || config->hide_edge_borders == E_BOTH) { |
585 | if (geometry.origin.y == ws->y) { | 585 | if (geometry.origin.y == workspace->y) { |
586 | border_top = 0; | 586 | border_top = 0; |
587 | } | 587 | } |
588 | 588 | ||
589 | if (geometry.origin.y + geometry.size.h == ws->height) { | 589 | if (geometry.origin.y + geometry.size.h == workspace->height) { |
590 | border_bottom = 0; | 590 | border_bottom = 0; |
591 | } | 591 | } |
592 | } | 592 | } |