aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-21 12:13:00 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-22 23:10:19 +1000
commit011d1ebfa4219eb666487529a5a5e7189c14fd40 (patch)
tree4dd3efa39573b7baa9e3965ed3b03799af849c54 /sway/tree/view.c
parentStore last button and use it when views request to move or resize (diff)
downloadsway-011d1ebfa4219eb666487529a5a5e7189c14fd40.tar.gz
sway-011d1ebfa4219eb666487529a5a5e7189c14fd40.tar.zst
sway-011d1ebfa4219eb666487529a5a5e7189c14fd40.zip
Consider view's min/max sizes when resizing
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 24594950..89150a69 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -141,6 +141,19 @@ const char *view_get_shell(struct sway_view *view) {
141 return "unknown"; 141 return "unknown";
142} 142}
143 143
144void view_get_constraints(struct sway_view *view, double *min_width,
145 double *max_width, double *min_height, double *max_height) {
146 if (view->impl->get_constraints) {
147 view->impl->get_constraints(view,
148 min_width, max_width, min_height, max_height);
149 } else {
150 *min_width = DBL_MIN;
151 *max_width = DBL_MAX;
152 *min_height = DBL_MIN;
153 *max_height = DBL_MAX;
154 }
155}
156
144uint32_t view_configure(struct sway_view *view, double lx, double ly, int width, 157uint32_t view_configure(struct sway_view *view, double lx, double ly, int width,
145 int height) { 158 int height) {
146 if (view->impl->configure) { 159 if (view->impl->configure) {