On Mon, Jan 6, 2020 at 10:54 AM Zhipeng Zhao near2see@163.com wrote:
When resizing an resizable window, we can resize it smaller than it's minsize show in Windows, I think it's a bug, and try to fix it.
Signed-off-by: Zhipeng Zhao near2see@163.com
Hi,
I'm not really able to judge the technical merit of the patch but I can tell you there are a few formatting / code convention things that make your patch, in its current form, unsuitable for inclusion.
I'll have a few specific comments inline.
dlls/winex11.drv/mouse.c | 121 +++++++++++++++++++++++++++++++++++++- dlls/winex11.drv/window.c | 14 ++++- 2 files changed, 131 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 290732fa93..1c5766be09 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1560,6 +1560,104 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) return TRUE; }
+/***********************************************************************
set_window_minsize
- */
+void set_window_minsize(HWND hwnd, RECT* sizingRect, int dir, int* minWidth, int* minHeight)
We frown upon camel case for variable names and such. In general give a look at surrounding code to get an idea of the preferred style. Also the '*' for the pointer arguments should go next to the argument name.
+{
- Display *display = thread_display();
- Window win = X11DRV_get_whole_window( hwnd );
- POINT pos;
- GetCursorPos(&pos);
- switch (dir)
- {
case 7: //_NET_WM_MOVERESIZE_SIZE_LEFT:
case 3: //_NET_WM_MOVERESIZE_SIZE_RIGHT:
C++ comments are not allowed.
if(*minWidth == 0)
{
FIXME("before top = %i, left = %i, right = %i, bottom = %i, width = %i\n", sizingRect->top, sizingRect->left, sizingRect->right, sizingRect->bottom, sizingRect->right-sizingRect->left);
This is a debug trace you used for testing your code I guess? Either get rid of it or replace with TRACE(). Same for the other instances below. FWIW in format strings you should probably use %d for signed and %u for unsigned values.