winmultiwindowwindow.c
winmultiwindowwndproc.c Cleanup some message debugging
This commit is contained in:
parent
8df7126f09
commit
01b156240c
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user