Author: fireball
Date: Mon Nov 6 13:20:40 2006
New Revision: 24693
URL:
http://svn.reactos.org/svn/reactos?rev=24693&view=rev
Log:
Revert 24074 by Saveliy Tretiakov until correct fix available. Fixes bug with moveable
calculator buttons.
Modified:
trunk/reactos/dll/win32/user32/windows/nonclient.c
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/nonclient.c (original)
+++ trunk/reactos/dll/win32/user32/windows/nonclient.c Mon Nov 6 13:20:40 2006
@@ -735,7 +735,7 @@
return HTBORDER;
}
- if (Style & WS_CAPTION)
+ if ((Style & WS_CAPTION) == WS_CAPTION)
{
if (ExStyle & WS_EX_TOOLWINDOW)
WindowRect.top += GetSystemMetrics(SM_CYSMCAPTION);
@@ -751,15 +751,11 @@
}
else
{
+ WindowRect.left += GetSystemMetrics(SM_CXSIZE);
WindowRect.right -= GetSystemMetrics(SM_CXSIZE);
}
-
- // On windows with WS_EX_DLGMODALFRAME and
- // WS_EX_TOOLWINDOW there is no system menu button.
- if (!(ExStyle & WS_EX_DLGMODALFRAME) && !(ExStyle &
WS_EX_TOOLWINDOW))
- WindowRect.left += GetSystemMetrics(SM_CXSIZE);
}
- if (Point.x < WindowRect.left)
+ if (Point.x <= WindowRect.left)
return HTSYSMENU;
if (WindowRect.right <= Point.x)
return HTCLOSE;