Juris Smotrovs : user32:
Send WM_SIZE when window changes state between restored/min/maximized.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jun 2 04:55:57 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: b8d9f3955a2104e629575b41f674ce625f771e60
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b8d9f3955a2104e629575b41f674ce625f771e60
Author: Juris Smotrovs <juris.smotrovs at sets.lv>
Date: Thu May 25 15:26:04 2006 +0300
user32: Send WM_SIZE when window changes state between restored/min/maximized.
---
dlls/user/defwnd.c | 2 +-
dlls/user/tests/msg.c | 16 +++++++++++++---
dlls/x11drv/winpos.c | 3 +--
include/winpos.h | 1 +
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/dlls/user/defwnd.c b/dlls/user/defwnd.c
index be71e75..da38c63 100644
--- a/dlls/user/defwnd.c
+++ b/dlls/user/defwnd.c
@@ -65,7 +65,7 @@ static void DEFWND_HandleWindowPosChange
if (!(winpos->flags & SWP_NOCLIENTMOVE))
SendMessageW( hwnd, WM_MOVE, 0, MAKELONG(rect.left, rect.top));
- if (!(winpos->flags & SWP_NOCLIENTSIZE))
+ if (!(winpos->flags & SWP_NOCLIENTSIZE) || (winpos->flags & SWP_STATECHANGED))
{
WPARAM wp = SIZE_RESTORED;
if (IsZoomed(hwnd)) wp = SIZE_MAXIMIZED;
diff --git a/dlls/user/tests/msg.c b/dlls/user/tests/msg.c
index c718a37..848e7d9 100644
--- a/dlls/user/tests/msg.c
+++ b/dlls/user/tests/msg.c
@@ -1435,9 +1435,19 @@ static void ok_sequence_(const struct me
"%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
context, expected->message, expected->lParam, actual->lParam);
}
- ok_( file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc),
- "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n",
- context, expected->message, (expected->flags & defwinproc) ? "" : "NOT ");
+ if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo)
+ {
+ todo_wine {
+ failcount ++;
+ ok_( file, line) (FALSE,
+ "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
+ context, expected->message, expected->lParam, actual->lParam);
+ }
+ }
+ else
+ ok_( file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc),
+ "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n",
+ context, expected->message, (expected->flags & defwinproc) ? "" : "NOT ");
ok_( file, line) ((expected->flags & beginpaint) == (actual->flags & beginpaint),
"%s: the msg 0x%04x should %shave been sent by BeginPaint\n",
context, expected->message, (expected->flags & beginpaint) ? "" : "NOT ");
diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c
index 64ffa8b..1da69d3 100644
--- a/dlls/x11drv/winpos.c
+++ b/dlls/x11drv/winpos.c
@@ -1031,9 +1031,8 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT c
{
/* it appears that Windows always adds an undocumented 0x8000
* flag if the state of a window changes.
- * FIXME: real SWP_xxxx name?
*/
- swp |= 0x8000;
+ swp |= SWP_STATECHANGED;
}
}
diff --git a/include/winpos.h b/include/winpos.h
index 61b8b53..ea3008f 100644
--- a/include/winpos.h
+++ b/include/winpos.h
@@ -30,6 +30,7 @@ #include <winuser.h>
/* undocumented SWP flags - from SDK 3.1 */
#define SWP_NOCLIENTSIZE 0x0800
#define SWP_NOCLIENTMOVE 0x1000
+#define SWP_STATECHANGED 0x8000
extern BOOL WINPOS_RedrawIconTitle( HWND hWnd );
extern BOOL WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow );
More information about the wine-cvs
mailing list