Moved hrgnUpdate from client to window coordinates, made nonclient
painting depend on the update region, reworked SetWindowPos() and
RedrawWindow() to speed up update region calculation, made -desktop
work properly, added WM_CANCELMODE here and there, fixed several
window activation bugs that crept in since the last time.
diff --git a/windows/win.c b/windows/win.c
index 2970fb9..5cf69a4 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -1666,14 +1666,24 @@
{
/* Enable window */
wndPtr->dwStyle &= ~WS_DISABLED;
+
+ if( wndPtr->flags & WIN_NATIVE )
+ wndPtr->pDriver->pSetHostAttr( wndPtr, HAK_ACCEPTFOCUS, TRUE );
+
SendMessageA( hwnd, WM_ENABLE, TRUE, 0 );
retvalue = TRUE;
goto end;
}
else if (!enable && !(wndPtr->dwStyle & WS_DISABLED))
{
+ SendMessageA( wndPtr->hwndSelf, WM_CANCELMODE, 0, 0);
+
/* Disable window */
wndPtr->dwStyle |= WS_DISABLED;
+
+ if( wndPtr->flags & WIN_NATIVE )
+ wndPtr->pDriver->pSetHostAttr( wndPtr, HAK_ACCEPTFOCUS, FALSE );
+
if ((hwnd == GetFocus()) || IsChild( hwnd, GetFocus() ))
{
SetFocus( 0 ); /* A disabled window can't have the focus */