Consider view's min/max sizes when resizing

This commit is contained in:
Ryan Dwyer 2018-07-21 12:13:00 +10:00
parent 9df660ee31
commit 011d1ebfa4
5 changed files with 52 additions and 1 deletions

View file

@ -141,6 +141,19 @@ const char *view_get_shell(struct sway_view *view) {
return "unknown";
}
void view_get_constraints(struct sway_view *view, double *min_width,
double *max_width, double *min_height, double *max_height) {
if (view->impl->get_constraints) {
view->impl->get_constraints(view,
min_width, max_width, min_height, max_height);
} else {
*min_width = DBL_MIN;
*max_width = DBL_MAX;
*min_height = DBL_MIN;
*max_height = DBL_MAX;
}
}
uint32_t view_configure(struct sway_view *view, double lx, double ly, int width,
int height) {
if (view->impl->configure) {