mirror of
https://github.com/swaywm/sway.git
synced 2026-06-13 14:33:19 -04:00
Merge 1706318afc into 97c342f9e1
This commit is contained in:
commit
17e2123513
1 changed files with 18 additions and 0 deletions
|
|
@ -311,6 +311,24 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
struct wlr_box *new_geo = &xdg_surface->geometry;
|
||||
|
||||
if (view->wlr_xdg_toplevel->current.min_width > 0 &&
|
||||
new_geo->width < view->wlr_xdg_toplevel->current.min_width) {
|
||||
new_geo->width = view->wlr_xdg_toplevel->current.min_width;
|
||||
}
|
||||
if (view->wlr_xdg_toplevel->current.min_height > 0 &&
|
||||
new_geo->height < view->wlr_xdg_toplevel->current.min_height) {
|
||||
new_geo->height = view->wlr_xdg_toplevel->current.min_height;
|
||||
}
|
||||
if (view->wlr_xdg_toplevel->current.max_width > 0 &&
|
||||
new_geo->width > view->wlr_xdg_toplevel->current.max_width) {
|
||||
new_geo->width = view->wlr_xdg_toplevel->current.max_width;
|
||||
}
|
||||
if (view->wlr_xdg_toplevel->current.max_height > 0 &&
|
||||
new_geo->height > view->wlr_xdg_toplevel->current.max_height) {
|
||||
new_geo->height = view->wlr_xdg_toplevel->current.max_height;
|
||||
}
|
||||
|
||||
bool new_size = new_geo->width != view->geometry.width ||
|
||||
new_geo->height != view->geometry.height ||
|
||||
new_geo->x != view->geometry.x ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue