On Mon Apr 7 10:28:59 2025 +0000, Zhiyi Zhang wrote:
Giving it a second thought, using the old logic, when a window has both `WS_MAXIMIZE` and `WS_MINIMIZE`.
(WS_MINIMIZE | WS_MAXIMIZE) & (WS_MINIMIZE | WS_MAXIMIZE) = WS_MINIMIZE | WS_MAXIMIZE (WS_MINIMIZE | WS_MAXIMIZE) != WS_MAXIMIZE
So the work rect is empty when both `WS_MINIMIZE` and `WS_MAXIMIZE` are present using the old logic. The only case work rect is not empty is when WS_MAXIMIZE is set and WS_MINIMIZE is not set. Thus, the logic in v6 is correct, isn't it?
Maybe, I was looking at the initial change only as a way to avoid calling into `monitor_info_from_window` which didn't look right to have it there just to avoid triggering a recursion, but the old logic was already doing this and it is indeed equivalent.