23 Aug
2024
23 Aug
'24
6:05 a.m.
Zhiyi Zhang (@zhiyi) commented about dlls/user32/edit.c:
- INT bw, bh; + INT bw, bh, res; ExStyle = GetWindowLongPtrW(es->hwndSelf, GWL_EXSTYLE); + + res = EDIT_is_valid_format_rect(es, rc); + if (res == 0) + { + GetClientRect(es->hwndSelf, &es->format_rect); + } + else if (res == -1) + { + CopyRect(&es->format_rect, rc); + es->format_rect.left += 1; + es->format_rect.top += 1; + es->format_rect.right -= 1; + es->format_rect.bottom += 1; This looks hacky. What do these ones mean? Please find a way to simplify it. It's also a bit weird that EDIT_is_valid_format_rect() returns three values.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6304#note_79739