size: Let max size change work in unrestricted directions

Previously only e.g. max width (not size) change would change size of
vertically restricted windows.
This commit is contained in:
Kim Woelders 2023-09-21 12:09:24 +02:00
parent 3d872d0fe2
commit 4ca0aa427c
1 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2003-2021 Kim Woelders * Copyright (C) 2003-2023 Kim Woelders
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -845,9 +845,12 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int hor, int ver, int flags)
else if (!strcmp(resize_type, "half_W")) else if (!strcmp(resize_type, "half_W"))
type = MAX_HALF_W; type = MAX_HALF_W;
if (ewin->state.inhibit_max_hor && hor) if (ewin->state.inhibit_max_hor)
return; hor = 0;
if (ewin->state.inhibit_max_ver && ver) if (ewin->state.inhibit_max_ver)
ver = 0;
if (!hor && !ver)
return; return;
if ((type == MAX_HALF_E || type == MAX_HALF_W) && hor && !ver) if ((type == MAX_HALF_E || type == MAX_HALF_W) && hor && !ver)