[PATCH v5] user32: Implement DM_REPOSITION message
Nikolay Sivov
nsivov at codeweavers.com
Thu Nov 7 03:07:21 CST 2019
Hi,
Please include your tests in the same patch, or use series notation of
format-patch/send-email.
> + siz.cx = rc.right - rc.left;
> + siz.cy = rc.bottom - rc.top;
> +
> + if (rc.right > mi.rcWork.right)
> + {
> + rc.right = mi.rcWork.right;
> + rc.left = rc.right - siz.cx;
> + }
> + if (rc.bottom > mi.rcWork.bottom)
> + {
> + rc.bottom = mi.rcWork.bottom;
> + rc.top = rc.bottom - siz.cy;
> + }
> +
> + if (rc.left < mi.rcWork.left)
> + {
> + rc.left = mi.rcWork.left;
> + rc.right = rc.left + siz.cx;
> + }
> + if (rc.top < mi.rcWork.top)
> + {
> + rc.top = mi.rcWork.top;
> + rc.bottom = rc.top + siz.cy;
> + }
> +
> + SetWindowPos(hwnd, NULL, rc.left, rc.top, 0, 0,
> + SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE |
> + SWP_NOZORDER);
You only need (x,y) coordinates - no need to set 'bottom' or 'right', so
it could be reduced to a several min/max calls. Also please change 'siz'
-> 'size'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20191107/acba6e6a/attachment.htm>
More information about the wine-devel
mailing list