summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-12 14:55:24 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-12 14:55:24 +0000
commit01b156240ce66703b38a67ee3cfbb475352cdf68 (patch)
tree3d527f549c096d9af711182fccdfebbf8e6bc67b /hw/xwin
parent8df7126f09d6d7cb35a5912a71531cad28ba2545 (diff)
winmultiwindowwindow.c
winmultiwindowwndproc.c Cleanup some message debugging
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/ChangeLog7
-rwxr-xr-xhw/xwin/winmultiwindowwndproc.c74
-rwxr-xr-xhw/xwin/winwin32rootlesswndproc.c63
3 files changed, 52 insertions, 92 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 707c0aac1..e78ba50ff 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,5 +1,12 @@
2005-02-12 Alexander Gottwald <ago at freedesktop dot org>
+ * winmultiwindowwindow.c
+ * winmultiwindowwndproc.c
+ * winwin32rootlesswndproc.c:
+ Cleanup some message debugging
+
+2005-02-12 Alexander Gottwald <ago at freedesktop dot org>
+
* win.h
* winfont.c
* winmultiwindowshape.c
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index dc30f951c..fee36ae45 100755
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -355,9 +355,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
switch (message)
{
case WM_CREATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_CREATE\n");
-#endif
/* */
SetProp (hwnd,
@@ -388,33 +385,11 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/*
* Any window menu items go through here
*/
-#if CYGMULTIWINDOW_DEBUG
- switch (wParam & 0xFFF0) /* See MSDN for the magic number 0xFFF0 */
- {
- case SC_MINIMIZE:
- ErrorF ("winTopLevelWindowProc - WM_SYSCOMMAND (SC_MINIMIZE)\n");
- break;
-
- case SC_RESTORE:
- ErrorF ("winTopLevelWindowProc - WM_SYSCOMMAND (SC_RESTORE)\n");
- break;
-
- case SC_MAXIMIZE:
- ErrorF ("winTopLevelWindowProc - WM_SYSCOMMAND (SC_MAXIMIZE)\n");
- break;
-
- default:
- ErrorF ("winTopLevelWindowProc - WM_SYSCOMMAND (UNKNOWN)\n");
-#endif
- if (HandleCustomWM_COMMAND ((unsigned long)hwnd, LOWORD(wParam)))
- {
- /* Don't pass customized menus to DefWindowProc */
- return 0;
- }
-#if CYGMULTIWINDOW_DEBUG
- break;
- }
-#endif
+ if (HandleCustomWM_COMMAND ((unsigned long)hwnd, LOWORD(wParam)))
+ {
+ /* Don't pass customized menus to DefWindowProc */
+ return 0;
+ }
break;
case WM_INITMENU:
@@ -628,9 +603,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
return winMouseButtonsHandle (s_pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam);
case WM_MOUSEWHEEL:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEWHEEL\n");
-#endif
/* Pass the message to the root window */
SendMessage (hwndScreen, message, wParam, lParam);
@@ -665,9 +637,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
case WM_SYSKEYDOWN:
case WM_KEYDOWN:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_*KEYDOWN\n");
-#endif
/*
* Don't pass Alt-F4 key combo to root window,
@@ -729,27 +698,18 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
case WM_SYSKEYUP:
case WM_KEYUP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_*KEYUP\n");
-#endif
/* Pass the message to the root window */
SendMessage (hwndScreen, message, wParam, lParam);
return 0;
case WM_HOTKEY:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_HOTKEY\n");
-#endif
/* Pass the message to the root window */
SendMessage (hwndScreen, message, wParam, lParam);
return 0;
case WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_ACTIVATE\n");
-#endif
/* Pass the message to the root window */
SendMessage (hwndScreen, message, wParam, lParam);
@@ -770,9 +730,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
return 0;
case WM_ACTIVATEAPP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_ACTIVATEAPP\n");
-#endif
/*
* This message is also sent to the root window
* so we do nothing for individual multiwindow windows
@@ -780,9 +737,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
break;
case WM_CLOSE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_CLOSE\n");
-#endif
/* Branch on if the window was killed in X already */
if (pWinPriv->fXKilled)
{
@@ -799,9 +753,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
return 0;
case WM_DESTROY:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_DESTROY\n");
-#endif
/* Branch on if the window was killed in X already */
if (pWinPriv && !pWinPriv->fXKilled)
@@ -818,17 +769,9 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
RemoveProp (hwnd, WIN_WID_PROP);
RemoveProp (hwnd, WIN_NEEDMANAGE_PROP);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_DESTROY\n");
-#endif
break;
case WM_MOVE:
-#if CYGWINDOWING_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOVE to (%d, %d) - %d ms\n",
- (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam),
- (int)(GetTickCount ()));
-#endif
/* Adjust the X Window to the moved Windows window */
winAdjustXWindow (pWin, hwnd);
return 0;
@@ -838,10 +781,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
if (!wParam)
return 0;
-#if CYGWINDOWING_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_SHOWWINDOW\n");
-#endif
-
/* Tell X to map the window */
MapWindow (pWin, wClient(pWin));
@@ -1075,9 +1014,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
return 0; /* end of WM_SIZE handler */
case WM_MOUSEACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEACTIVATE\n");
-#endif
/* Check if this window needs to be made active when clicked */
if (!GetProp (pWinPriv->hWnd, WIN_NEEDMANAGE_PROP))
diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c
index 620c92e1c..20fbcd630 100755
--- a/hw/xwin/winwin32rootlesswndproc.c
+++ b/hw/xwin/winwin32rootlesswndproc.c
@@ -70,7 +70,7 @@ static UINT_PTR g_uipMousePollingTimerID = 0;
DEFINE_ATOM_HELPER(AtmWindowsWmRaiseOnClick, WINDOWSWM_RAISE_ON_CLICK)
DEFINE_ATOM_HELPER(AtmWindowsWMMouseActivate, WINDOWSWM_MOUSE_ACTIVATE)
-DEFINE_ATOM_HELPER(AtmWindowsWMClientWindow, WINDOWSWM_CLIENT_WINDOW)
+/* DEFINE_ATOM_HELPER(AtmWindowsWMClientWindow, WINDOWSWM_CLIENT_WINDOW) */
/*
* ConstrainSize - Taken from TWM sources - Respects hints for sizing
@@ -957,26 +957,27 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return ValidateSizing (hwnd, pWin, wParam, lParam);
case WM_WINDOWPOSCHANGED:
-#if CYGMULTIWINDOW_DEBUG
- winDebug ("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED\n");
-#endif
{
pWinPos = (LPWINDOWPOS) lParam;
#if CYGMULTIWINDOW_DEBUG
- winDebug("flags: ");
- if (pWinPos->flags & SWP_DRAWFRAME) winDebug("SWP_DRAWFRAME ");
- if (pWinPos->flags & SWP_FRAMECHANGED) winDebug("SWP_FRAMECHANGED ");
- if (pWinPos->flags & SWP_HIDEWINDOW) winDebug("SWP_HIDEWINDOW ");
- if (pWinPos->flags & SWP_NOACTIVATE) winDebug("SWP_NOACTIVATE ");
- if (pWinPos->flags & SWP_NOCOPYBITS) winDebug("SWP_NOCOPYBITS ");
- if (pWinPos->flags & SWP_NOMOVE) winDebug("SWP_NOMOVE ");
- if (pWinPos->flags & SWP_NOOWNERZORDER) winDebug("SWP_NOOWNERZORDER ");
- if (pWinPos->flags & SWP_NOSIZE) winDebug("SWP_NOSIZE ");
- if (pWinPos->flags & SWP_NOREDRAW) winDebug("SWP_NOREDRAW ");
- if (pWinPos->flags & SWP_NOSENDCHANGING) winDebug("SWP_NOSENDCHANGING ");
- if (pWinPos->flags & SWP_NOZORDER) winDebug("SWP_NOZORDER ");
- if (pWinPos->flags & SWP_SHOWWINDOW) winDebug("SWP_SHOWWINDOW ");
- winDebug("\n");
+ winDebug("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED\n");
+ winDebug("\tflags: %s%s%s%s%s%s%s%s%s%s%s%s\n",
+ (pWinPos->flags & SWP_DRAWFRAME)?"SWP_DRAWFRAME ":"",
+ (pWinPos->flags & SWP_FRAMECHANGED)?"SWP_FRAMECHANGED ":"",
+ (pWinPos->flags & SWP_HIDEWINDOW)?"SWP_HIDEWINDOW ":"",
+ (pWinPos->flags & SWP_NOACTIVATE)?"SWP_NOACTIVATE ":"",
+ (pWinPos->flags & SWP_NOCOPYBITS)?"SWP_NOCOPYBITS ":"",
+ (pWinPos->flags & SWP_NOMOVE)?"SWP_NOMOVE ":"",
+ (pWinPos->flags & SWP_NOOWNERZORDER)?"SWP_NOOWNERZORDER ":"",
+ (pWinPos->flags & SWP_NOSIZE)?"SWP_NOSIZE ":"",
+ (pWinPos->flags & SWP_NOREDRAW)?"SWP_NOREDRAW ":"",
+ (pWinPos->flags & SWP_NOSENDCHANGING)?"SWP_NOSENDCHANGING ":"",
+ (pWinPos->flags & SWP_NOZORDER)?"SWP_NOZORDER ":"",
+ (pWinPos->flags & SWP_SHOWWINDOW)?"SWP_SHOWWINDOW ":"");
+ winDebug("\tno_configure: %s\n", (g_fNoConfigureWindow?"Yes":"No"));
+ winDebug("\textend: (%d, %d, %d, %d)\n",
+ pWinPos->x, pWinPos->y, pWinPos->cx, pWinPos->cy);
+
#endif
if (pWinPos->flags & SWP_HIDEWINDOW) break;
@@ -1094,7 +1095,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
winDebug ("\tmove & resize\n");
#endif
if (winIsInternalWMRunning(pScreenInfo))
- winAdjustXWindow (pWin, hwnd);
+ winAdjustXWindow (pWin, hwnd);
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
@@ -1110,7 +1111,23 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
winDebug ("\tmove\n");
#endif
if (winIsInternalWMRunning(pScreenInfo))
- winAdjustXWindow (pWin, hwnd);
+ winAdjustXWindow (pWin, hwnd);
+
+ winMWExtWMMoveResizeXWindow (pWin,
+ rcClient.left - wBorderWidth (pWin)
+ - GetSystemMetrics (SM_XVIRTUALSCREEN),
+ rcClient.top - wBorderWidth (pWin)
+ - GetSystemMetrics (SM_YVIRTUALSCREEN),
+ rcClient.right - rcClient.left
+ - wBorderWidth (pWin)*2,
+ rcClient.bottom - rcClient.top
+ - wBorderWidth (pWin)*2);
+ } else if (!(pWinPos->flags & SWP_NOMOVE)) {
+#if CYGMULTIWINDOW_DEBUG
+ winDebug ("\tmove\n");
+#endif
+ if (winIsInternalWMRunning(pScreenInfo))
+ winAdjustXWindow (pWin, hwnd);
winMWExtWMMoveXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
@@ -1122,7 +1139,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
winDebug ("\tresize\n");
#endif
if (winIsInternalWMRunning(pScreenInfo))
- winAdjustXWindow (pWin, hwnd);
+ winAdjustXWindow (pWin, hwnd);
winMWExtWMResizeXWindow (pWin,
rcClient.right - rcClient.left
@@ -1204,7 +1221,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (!pRLWinPriv->fMovingOrSizing)
{
if (winIsInternalWMRunning(pScreenInfo))
- winAdjustXWindow (pWin, hwnd);
+ winAdjustXWindow (pWin, hwnd);
winMWExtWMResizeXWindow (pWin,
(short) LOWORD(lParam)
@@ -1275,7 +1292,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
MapWindowPoints (hwnd, HWND_DESKTOP, (LPPOINT)&rcClient, 2);
if (winIsInternalWMRunning(pScreenInfo))
- winAdjustXWindow (pWin, hwnd);
+ winAdjustXWindow (pWin, hwnd);
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)