aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-22 08:27:42 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-22 08:27:42 +1000
commitf6c3682c05bce05f00b13b8f469b52923ecd8ddb (patch)
tree57a109a0bef2b14ecd24a39469d52c70f6933987 /sway/tree/container.c
parentImplement stacked layout (diff)
downloadsway-f6c3682c05bce05f00b13b8f469b52923ecd8ddb.tar.gz
sway-f6c3682c05bce05f00b13b8f469b52923ecd8ddb.tar.zst
sway-f6c3682c05bce05f00b13b8f469b52923ecd8ddb.zip
Use constants for titlebar dimensions
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 5d88325f..3f30a079 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -510,7 +510,7 @@ static struct sway_container *container_at_tabbed(struct sway_container *parent,
510 struct sway_seat *seat = input_manager_current_seat(input_manager); 510 struct sway_seat *seat = input_manager_current_seat(input_manager);
511 511
512 // Tab titles 512 // Tab titles
513 int title_height = config->border_thickness * 2 + config->font_height; 513 int title_height = container_titlebar_height();
514 if (oy < parent->y + title_height) { 514 if (oy < parent->y + title_height) {
515 int tab_width = parent->width / parent->children->length; 515 int tab_width = parent->width / parent->children->length;
516 int child_index = (ox - parent->x) / tab_width; 516 int child_index = (ox - parent->x) / tab_width;
@@ -847,3 +847,7 @@ void container_notify_child_title_changed(struct sway_container *container) {
847 container_update_title_textures(container); 847 container_update_title_textures(container);
848 container_notify_child_title_changed(container->parent); 848 container_notify_child_title_changed(container->parent);
849} 849}
850
851size_t container_titlebar_height() {
852 return config->font_height + TITLEBAR_V_PADDING * 2;
853}