--- a/WinWorkstation.st Thu Apr 08 09:34:50 2004 +0200
+++ b/WinWorkstation.st Tue Apr 13 08:16:16 2004 +0200
@@ -2674,6 +2674,14 @@
break;
case WM_GETMINMAXINFO:
+
+#ifndef PRE_13_APR_04_POSCHANGED_IN_EXITSIZEMOVE
+ if (inMove) {
+ *pDefault = 0;
+ return 0;
+ }
+#endif
+
{
int minW, maxW;
localWindowInfo *lI;
@@ -2727,6 +2735,13 @@
return 0;
case WM_WINDOWPOSCHANGED:
+
+#ifndef PRE_13_APR_04_POSCHANGED_IN_EXITSIZEMOVE
+ if (inMove) {
+ *pDefault = 0;
+ return 0;
+ }
+#endif
if (hWnd == __rootWinSpezial) {
/* can this happen ? */
*pDefault = 1;
@@ -2811,51 +2826,54 @@
w = rct.right - rct.left;
h = rct.bottom - rct.top;
- EVENT_PRINTF(("WM_WINDOWPOSCHANGED ["));
-
- if (wp->flags & SWP_NOSIZE) {
- EVENT_PRINTF(("NOSIZE "));
- }
- if (wp->flags & SWP_NOMOVE) {
- EVENT_PRINTF(("NOMOVE "));
- }
- if (wp->flags & SWP_NOZORDER) {
- EVENT_PRINTF(("NOZORDER "));
- }
- if (wp->flags & SWP_NOREDRAW) {
- EVENT_PRINTF(("NOREDRAW "));
- }
- if (wp->flags & SWP_NOACTIVATE) {
- EVENT_PRINTF(("NOACTIVATE "));
- }
- if (wp->flags & SWP_FRAMECHANGED) {
- EVENT_PRINTF(("FRAMECHANGED "));
- }
- if (wp->flags & SWP_NOCOPYBITS) {
- EVENT_PRINTF(("NOCOPYBITS "));
- }
- if (wp->flags & SWP_NOOWNERZORDER) {
- EVENT_PRINTF(("NOOWNERZORDER "));
- }
- if (wp->flags & SWP_NOSENDCHANGING) {
- EVENT_PRINTF(("NOSENDCHANGING "));
- }
- if (wp->flags & SWP_DEFERERASE) {
- EVENT_PRINTF(("DEFERERASE "));
- }
- if (wp->flags & SWP_ASYNCWINDOWPOS) {
- EVENT_PRINTF(("ASYNCWINDOWPOS "));
- }
- if (wp->flags & SWP_HIDEWINDOW) {
- EVENT_PRINTF(("HIDEWINDOW "));
- }
- if (wp->flags & SWP_SHOWWINDOW) {
- EVENT_PRINTF(("SHOWWINDOW "));
- }
-
- EVENT_PRINTF(("] %d/%d %d/%d flags:%d (0x%x) ->",
+ if (__debug__) {
+ EVENT_PRINTF(("WM_WINDOWPOSCHANGED ["));
+
+ if (wp->flags & SWP_NOSIZE) {
+ EVENT_PRINTF(("NOSIZE "));
+ }
+ if (wp->flags & SWP_NOMOVE) {
+ EVENT_PRINTF(("NOMOVE "));
+ }
+ if (wp->flags & SWP_NOZORDER) {
+ EVENT_PRINTF(("NOZORDER "));
+ }
+ if (wp->flags & SWP_NOREDRAW) {
+ EVENT_PRINTF(("NOREDRAW "));
+ }
+ if (wp->flags & SWP_NOACTIVATE) {
+ EVENT_PRINTF(("NOACTIVATE "));
+ }
+ if (wp->flags & SWP_FRAMECHANGED) {
+ EVENT_PRINTF(("FRAMECHANGED "));
+ }
+ if (wp->flags & SWP_NOCOPYBITS) {
+ EVENT_PRINTF(("NOCOPYBITS "));
+ }
+ if (wp->flags & SWP_NOOWNERZORDER) {
+ EVENT_PRINTF(("NOOWNERZORDER "));
+ }
+ if (wp->flags & SWP_NOSENDCHANGING) {
+ EVENT_PRINTF(("NOSENDCHANGING "));
+ }
+ if (wp->flags & SWP_DEFERERASE) {
+ EVENT_PRINTF(("DEFERERASE "));
+ }
+ if (wp->flags & SWP_ASYNCWINDOWPOS) {
+ EVENT_PRINTF(("ASYNCWINDOWPOS "));
+ }
+ if (wp->flags & SWP_HIDEWINDOW) {
+ EVENT_PRINTF(("HIDEWINDOW "));
+ }
+ if (wp->flags & SWP_SHOWWINDOW) {
+ EVENT_PRINTF(("SHOWWINDOW "));
+ }
+
+ EVENT_PRINTF(("] %d/%d %d/%d flags:%d (0x%x) ->",
wp->x, wp->y, wp->cx, wp->cy, wp->flags, wp->flags));
- EVENT_PRINTF((" client rect now: %d/%d %d/%d\n",x, y, w, h));
+ EVENT_PRINTF((" client rect now: %d/%d %d/%d\n",x, y, w, h));
+
+ } /* __debug__ */
if ((w == 0) && (h == 0)) {
EVENT_PRINTF(("w,h = 0.\n"));
@@ -4045,6 +4063,37 @@
case WM_EXITSIZEMOVE:
EVENT_PRINTF(("WM_EXITSIZEMOVE\n"));
+
+#ifndef PRE_13_APR_04_POSCHANGED_IN_EXITSIZEMOVE
+ if (inMove) {
+ /* generate WM_WINDOWPOSCHANGED
+ */
+ RECT rct;
+ int x, y, w, h;
+
+ GetClientRect(hWnd, &rct);
+
+ x = rct.left;
+ y = rct.top;
+ w = rct.right - rct.left;
+ h = rct.bottom - rct.top;
+
+ if ((w == 0) && (h == 0)) {
+ if (! GetWindow_iconified(hWnd)) {
+ SetWindow_iconified(hWnd, 1);
+ }
+ enqEvent(0, hWnd, __WM_ICONIFIED, 1, 0, 0, 0, 0, EV_NOTIME);
+ } else {
+ if (GetWindow_iconified(hWnd)) {
+ SetWindow_iconified(hWnd, 0);
+ enqEvent(0, hWnd, __WM_ICONIFIED, 0, 0, 0, 0, 0, EV_NOTIME);
+ } else {
+ enqEvent(0, hWnd, WM_WINDOWPOSCHANGED, 0, x, y, w, h, EV_NOTIME);
+ }
+ }
+ }
+#endif
+
inSizeMove = inMove = inSize = 0;
{
int modifiers;
@@ -15894,7 +15943,7 @@
!WinWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.266 2004-04-08 07:34:50 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.267 2004-04-13 06:16:16 ca Exp $'
! !
WinWorkstation initialize!