diff options
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/layout.c b/sway/layout.c index 527579d9..261e2138 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -993,3 +993,15 @@ void recursive_resize(swayc_t *container, double amount, enum wlc_resize_edge ed | |||
993 | } | 993 | } |
994 | } | 994 | } |
995 | } | 995 | } |
996 | |||
997 | enum swayc_layouts default_layout(swayc_t *output) { | ||
998 | if (config->default_layout != L_NONE) { | ||
999 | return config->default_layout; | ||
1000 | } else if (config->default_orientation != L_NONE) { | ||
1001 | return config->default_orientation; | ||
1002 | } else if (output->width >= output->height) { | ||
1003 | return L_HORIZ; | ||
1004 | } else { | ||
1005 | return L_VERT; | ||
1006 | } | ||
1007 | } | ||