mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
setup for resizable windows, drop weight
This commit is contained in:
parent
ba6034e8c8
commit
fbaa9111a8
5 changed files with 58 additions and 30 deletions
|
|
@ -14,7 +14,6 @@ static swayc_t *new_swayc(enum swayc_types type) {
|
|||
c->handle = -1;
|
||||
c->layout = L_NONE;
|
||||
c->type = type;
|
||||
c->weight = 1;
|
||||
if (type != C_VIEW) {
|
||||
c->children = create_list();
|
||||
}
|
||||
|
|
@ -172,6 +171,14 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
|
|||
view->name = title ? strdup(title) : NULL;
|
||||
view->visible = true;
|
||||
view->is_focused = true;
|
||||
//Setup geometry
|
||||
view->width = sibling->parent->width;
|
||||
view->height = sibling->parent->height;
|
||||
if (sibling->parent->layout == L_HORIZ) {
|
||||
view->width /= sibling->parent->children->length;
|
||||
} else {
|
||||
view->height /= sibling->parent->children->length;
|
||||
}
|
||||
|
||||
view->gaps = config->gaps_inner;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue