xwin: consolidate debugging symbols

We've got three #define's that are all set at once, on enable_debugging.

A comment in meson.build already asks for consolidating them into one,
so just do it now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1409>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-03-15 16:01:50 +01:00 committed by Marge Bot
parent d8758cdd20
commit 2003adfd33
23 changed files with 160 additions and 171 deletions

View File

@ -88,7 +88,7 @@ xwinDevWindowsHandlerNotify(int fd, int ready, void *data)
void void
InitInput(int argc, char *argv[]) InitInput(int argc, char *argv[])
{ {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("InitInput\n"); winDebug("InitInput\n");
#endif #endif
@ -126,7 +126,7 @@ InitInput(int argc, char *argv[])
} }
#endif #endif
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("InitInput - returning\n"); winDebug("InitInput - returning\n");
#endif #endif
} }

View File

@ -193,7 +193,7 @@ ddxGiveUp(enum ExitCode error)
{ {
int i; int i;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("ddxGiveUp\n"); winDebug("ddxGiveUp\n");
#endif #endif
@ -906,7 +906,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
/* Log the command line */ /* Log the command line */
winLogCommandLine(argc, argv); winLogCommandLine(argc, argv);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("InitOutput\n"); winDebug("InitOutput\n");
#endif #endif
@ -1024,7 +1024,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
winGenerateAuthorization(); winGenerateAuthorization();
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("InitOutput - Returning.\n"); winDebug("InitOutput - Returning.\n");
#endif #endif
} }

View File

@ -48,8 +48,8 @@
#endif #endif
/* Turn debug messages on or off */ /* Turn debug messages on or off */
#ifndef CYGDEBUG #ifndef ENABLE_DEBUG
#define CYGDEBUG NO #define ENABLE_DEBUG NO
#endif #endif
#define WIN_DEFAULT_BPP 0 #define WIN_DEFAULT_BPP 0
@ -193,7 +193,7 @@
* Debugging macros * Debugging macros
*/ */
#if CYGDEBUG #if ENABLE_DEBUG
#define DEBUG_MSG(str,...) \ #define DEBUG_MSG(str,...) \
if (fDebugProcMsg) \ if (fDebugProcMsg) \
{ \ { \
@ -208,19 +208,19 @@ if (fDebugProcMsg) \
#define DEBUG_MSG(str,...) #define DEBUG_MSG(str,...)
#endif #endif
#if CYGDEBUG #if ENABLE_DEBUG
#define DEBUG_FN_NAME(str) PTSTR szFunctionName = str #define DEBUG_FN_NAME(str) PTSTR szFunctionName = str
#else #else
#define DEBUG_FN_NAME(str) #define DEBUG_FN_NAME(str)
#endif #endif
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
#define DEBUGVARS BOOL fDebugProcMsg = FALSE #define DEBUGVARS BOOL fDebugProcMsg = FALSE
#else #else
#define DEBUGVARS #define DEBUGVARS
#endif #endif
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
#define DEBUGPROC_MSG fDebugProcMsg = TRUE #define DEBUGPROC_MSG fDebugProcMsg = TRUE
#else #else
#define DEBUGPROC_MSG #define DEBUGPROC_MSG

View File

@ -47,7 +47,7 @@ winAllocatePrivates(ScreenPtr pScreen)
{ {
winPrivScreenPtr pScreenPriv; winPrivScreenPtr pScreenPriv;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateScreenPrivates - g_ulServerGeneration: %lu " winDebug("winAllocateScreenPrivates - g_ulServerGeneration: %lu "
"serverGeneration: %lu\n", g_ulServerGeneration, serverGeneration); "serverGeneration: %lu\n", g_ulServerGeneration, serverGeneration);
#endif #endif
@ -102,7 +102,7 @@ winAllocatePrivates(ScreenPtr pScreen)
Bool Bool
winInitCmapPrivates(ColormapPtr pcmap, int i) winInitCmapPrivates(ColormapPtr pcmap, int i)
{ {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winInitCmapPrivates\n"); winDebug("winInitCmapPrivates\n");
#endif #endif
@ -129,7 +129,7 @@ winAllocateCmapPrivates(ColormapPtr pCmap)
winPrivCmapPtr pCmapPriv; winPrivCmapPtr pCmapPriv;
static unsigned long s_ulPrivateGeneration = 0; static unsigned long s_ulPrivateGeneration = 0;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateCmapPrivates\n"); winDebug("winAllocateCmapPrivates\n");
#endif #endif
@ -155,7 +155,7 @@ winAllocateCmapPrivates(ColormapPtr pCmap)
/* Save the cmap private pointer */ /* Save the cmap private pointer */
winSetCmapPriv(pCmap, pCmapPriv); winSetCmapPriv(pCmap, pCmapPriv);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateCmapPrivates - Returning\n"); winDebug("winAllocateCmapPrivates - Returning\n");
#endif #endif

View File

@ -116,13 +116,13 @@ winInstallColormap(ColormapPtr pColormap)
winScreenPriv(pScreen); winScreenPriv(pScreen);
ColormapPtr oldpmap = pScreenPriv->pcmapInstalled; ColormapPtr oldpmap = pScreenPriv->pcmapInstalled;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winInstallColormap\n"); winDebug("winInstallColormap\n");
#endif #endif
/* Did the colormap actually change? */ /* Did the colormap actually change? */
if (pColormap != oldpmap) { if (pColormap != oldpmap) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winInstallColormap - Colormap has changed, attempt " winDebug("winInstallColormap - Colormap has changed, attempt "
"to install.\n"); "to install.\n");
#endif #endif
@ -157,7 +157,7 @@ winUninstallColormap(ColormapPtr pmap)
winScreenPriv(pmap->pScreen); winScreenPriv(pmap->pScreen);
ColormapPtr curpmap = pScreenPriv->pcmapInstalled; ColormapPtr curpmap = pScreenPriv->pcmapInstalled;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winUninstallColormap\n"); winDebug("winUninstallColormap\n");
#endif #endif
@ -194,7 +194,7 @@ winStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs)
int i; int i;
unsigned short nRed, nGreen, nBlue; unsigned short nRed, nGreen, nBlue;
#if CYGDEBUG #if ENABLE_DEBUG
if (ndef != 1) if (ndef != 1)
winDebug("winStoreColors - ndef: %d\n", ndef); winDebug("winStoreColors - ndef: %d\n", ndef);
#endif #endif
@ -216,7 +216,7 @@ winStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs)
pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbGreen = nGreen; pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbGreen = nGreen;
pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbBlue = nBlue; pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbBlue = nBlue;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winStoreColors - nRed %d nGreen %d nBlue %d\n", winDebug("winStoreColors - nRed %d nGreen %d nBlue %d\n",
nRed, nGreen, nBlue); nRed, nGreen, nBlue);
#endif #endif
@ -237,7 +237,7 @@ winResolveColor(unsigned short *pred,
unsigned short *pgreen, unsigned short *pgreen,
unsigned short *pblue, VisualPtr pVisual) unsigned short *pblue, VisualPtr pVisual)
{ {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winResolveColor ()\n"); winDebug("winResolveColor ()\n");
#endif #endif
@ -253,7 +253,7 @@ winCreateColormap(ColormapPtr pmap)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateColormap\n"); winDebug("winCreateColormap\n");
#endif #endif
@ -311,7 +311,7 @@ winDestroyColormap(ColormapPtr pColormap)
free(pCmapPriv); free(pCmapPriv);
winSetCmapPriv(pColormap, NULL); winSetCmapPriv(pColormap, NULL);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winDestroyColormap - Returning\n"); winDebug("winDestroyColormap - Returning\n");
#endif #endif
} }
@ -338,7 +338,7 @@ winGetPaletteDIB(ScreenPtr pScreen, ColormapPtr pcmap)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winGetPaletteDIB - Retrieved %d colors from DIB\n", winDebug("winGetPaletteDIB - Retrieved %d colors from DIB\n",
uiColorsRetrieved); uiColorsRetrieved);
#endif #endif
@ -359,7 +359,7 @@ winGetPaletteDIB(ScreenPtr pScreen, ColormapPtr pcmap)
nGreen = rgbColors[i].rgbGreen << 8; nGreen = rgbColors[i].rgbGreen << 8;
nBlue = rgbColors[i].rgbBlue << 8; nBlue = rgbColors[i].rgbBlue << 8;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winGetPaletteDIB - Allocating a color: %u; " winDebug("winGetPaletteDIB - Allocating a color: %u; "
"%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue); "%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue);
#endif #endif
@ -421,7 +421,7 @@ winGetPaletteDD(ScreenPtr pScreen, ColormapPtr pcmap)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winGetPaletteDD - uiSystemPaletteEntries %d\n", winDebug("winGetPaletteDD - uiSystemPaletteEntries %d\n",
uiSystemPaletteEntries); uiSystemPaletteEntries);
#endif #endif
@ -444,7 +444,7 @@ winGetPaletteDD(ScreenPtr pScreen, ColormapPtr pcmap)
nRed = ppeColors[i].peRed << 8; nRed = ppeColors[i].peRed << 8;
nGreen = ppeColors[i].peGreen << 8; nGreen = ppeColors[i].peGreen << 8;
nBlue = ppeColors[i].peBlue << 8; nBlue = ppeColors[i].peBlue << 8;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winGetPaletteDD - Allocating a color: %u; " winDebug("winGetPaletteDD - Allocating a color: %u; "
"%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue); "%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue);
#endif #endif
@ -493,7 +493,7 @@ winCreateDefColormap(ScreenPtr pScreen)
ColormapPtr pcmap = NULL; ColormapPtr pcmap = NULL;
Pixel wp, bp; Pixel wp, bp;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateDefColormap\n"); winDebug("winCreateDefColormap\n");
#endif #endif
@ -514,7 +514,7 @@ winCreateDefColormap(ScreenPtr pScreen)
* to be changed by clients. * to be changed by clients.
*/ */
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateDefColormap - defColormap: %lu\n", pScreen->defColormap); winDebug("winCreateDefColormap - defColormap: %lu\n", pScreen->defColormap);
#endif #endif
@ -533,7 +533,7 @@ winCreateDefColormap(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateDefColormap - Created a colormap\n"); winDebug("winCreateDefColormap - Created a colormap\n");
#endif #endif
@ -594,7 +594,7 @@ winCreateDefColormap(ScreenPtr pScreen)
/* Install the created colormap */ /* Install the created colormap */
(*pScreen->InstallColormap) (pcmap); (*pScreen->InstallColormap) (pcmap);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateDefColormap - Returning\n"); winDebug("winCreateDefColormap - Returning\n");
#endif #endif

View File

@ -61,7 +61,7 @@ winCreateBoundingWindowFullScreen(ScreenPtr pScreen)
WNDCLASSEX wc; WNDCLASSEX wc;
char szTitle[256]; char szTitle[256];
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateBoundingWindowFullScreen\n"); winDebug("winCreateBoundingWindowFullScreen\n");
#endif #endif
@ -210,7 +210,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
/* Did the user specify a height and width? */ /* Did the user specify a height and width? */
if (pScreenInfo->fUserGaveHeightAndWidth) { if (pScreenInfo->fUserGaveHeightAndWidth) {
/* User gave a desired height and width, try to accommodate */ /* User gave a desired height and width, try to accommodate */
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateBoundingWindowWindowed - User gave height " winDebug("winCreateBoundingWindowWindowed - User gave height "
"and width\n"); "and width\n");
#endif #endif
@ -220,14 +220,14 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
&& !pScreenInfo->fRootless && !pScreenInfo->fRootless
&& !pScreenInfo->fMultiWindow && !pScreenInfo->fMultiWindow
) { ) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug winDebug
("winCreateBoundingWindowWindowed - Window has decoration\n"); ("winCreateBoundingWindowWindowed - Window has decoration\n");
#endif #endif
/* Are we resizable */ /* Are we resizable */
if (pScreenInfo->iResizeMode != resizeNotAllowed) { if (pScreenInfo->iResizeMode != resizeNotAllowed) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug winDebug
("winCreateBoundingWindowWindowed - Window is resizable\n"); ("winCreateBoundingWindowWindowed - Window is resizable\n");
#endif #endif
@ -237,7 +237,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
+ GetSystemMetrics(SM_CYCAPTION); + GetSystemMetrics(SM_CYCAPTION);
} }
else { else {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug winDebug
("winCreateBoundingWindowWindowed - Window is not resizable\n"); ("winCreateBoundingWindowWindowed - Window is not resizable\n");
#endif #endif
@ -250,7 +250,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
} }
else { else {
/* By default, we are creating a window that is as large as possible */ /* By default, we are creating a window that is as large as possible */
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateBoundingWindowWindowed - User did not give " winDebug("winCreateBoundingWindowWindowed - User did not give "
"height and width\n"); "height and width\n");
#endif #endif
@ -273,7 +273,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top)) if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top))
iHeight = rcWorkArea.bottom - rcWorkArea.top; iHeight = rcWorkArea.bottom - rcWorkArea.top;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateBoundingWindowWindowed - Adjusted width: %d " winDebug("winCreateBoundingWindowWindowed - Adjusted width: %d "
"height: %d\n", iWidth, iHeight); "height: %d\n", iWidth, iHeight);
#endif #endif
@ -307,7 +307,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n"); winDebug("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n");
#endif #endif

View File

@ -413,14 +413,14 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
static winPrivScreenPtr s_pScreenPriv = NULL; static winPrivScreenPtr s_pScreenPriv = NULL;
static winScreenInfo *s_pScreenInfo = NULL; static winScreenInfo *s_pScreenInfo = NULL;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winChangeDepthDlgProc\n"); winDebug("winChangeDepthDlgProc\n");
#endif #endif
/* Branch on message type */ /* Branch on message type */
switch (message) { switch (message) {
case WM_INITDIALOG: case WM_INITDIALOG:
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winChangeDepthDlgProc - WM_INITDIALOG\n"); winDebug("winChangeDepthDlgProc - WM_INITDIALOG\n");
#endif #endif
@ -428,13 +428,13 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
s_pScreenPriv = (winPrivScreenPtr) lParam; s_pScreenPriv = (winPrivScreenPtr) lParam;
s_pScreenInfo = s_pScreenPriv->pScreenInfo; s_pScreenInfo = s_pScreenPriv->pScreenInfo;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %p, " winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %p, "
"s_pScreenInfo: %p\n", "s_pScreenInfo: %p\n",
s_pScreenPriv, s_pScreenInfo); s_pScreenPriv, s_pScreenInfo);
#endif #endif
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winChangeDepthDlgProc - WM_INITDIALOG - orig bpp: %u, " winDebug("winChangeDepthDlgProc - WM_INITDIALOG - orig bpp: %u, "
"current bpp: %d\n", "current bpp: %d\n",
(unsigned int)s_pScreenInfo->dwBPP, (unsigned int)s_pScreenInfo->dwBPP,
@ -446,7 +446,7 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
return TRUE; return TRUE;
case WM_DISPLAYCHANGE: case WM_DISPLAYCHANGE:
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winChangeDepthDlgProc - WM_DISPLAYCHANGE - orig bpp: %u, " winDebug("winChangeDepthDlgProc - WM_DISPLAYCHANGE - orig bpp: %u, "
"new bpp: %d\n", "new bpp: %d\n",
(unsigned int)s_pScreenInfo->dwBPP, (unsigned int)s_pScreenInfo->dwBPP,
@ -542,14 +542,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
{ {
static winPrivScreenPtr s_pScreenPriv = NULL; static winPrivScreenPtr s_pScreenPriv = NULL;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAboutDlgProc\n"); winDebug("winAboutDlgProc\n");
#endif #endif
/* Branch on message type */ /* Branch on message type */
switch (message) { switch (message) {
case WM_INITDIALOG: case WM_INITDIALOG:
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAboutDlgProc - WM_INITDIALOG\n"); winDebug("winAboutDlgProc - WM_INITDIALOG\n");
#endif #endif

View File

@ -231,7 +231,7 @@ winMouseButtonsSendEvent(int iEventType, int iButton)
QueuePointerEvents(g_pwinPointer, iEventType, iButton, QueuePointerEvents(g_pwinPointer, iEventType, iButton,
POINTER_RELATIVE, &mask); POINTER_RELATIVE, &mask);
#if CYGDEBUG #if ENABLE_DEBUG
ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n", ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
iEventType, iButton); iEventType, iButton);
#endif #endif

View File

@ -33,7 +33,7 @@
#endif #endif
#include "win.h" #include "win.h"
#include "winmsg.h" #include "winmsg.h"
#if CYGDEBUG #if ENABLE_DEBUG
#include "winmessages.h" #include "winmessages.h"
#endif #endif
#include <stdarg.h> #include <stdarg.h>
@ -117,7 +117,7 @@ winW32ErrorEx(int verb, const char *msg, DWORD errorcode)
} }
} }
#if CYGDEBUG #if ENABLE_DEBUG
void void
winDebugWin32Message(const char *function, HWND hwnd, UINT message, winDebugWin32Message(const char *function, HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam) WPARAM wParam, LPARAM lParam)

View File

@ -41,7 +41,7 @@ static
LRESULT CALLBACK LRESULT CALLBACK
winMsgWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) winMsgWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
#if CYGDEBUG #if ENABLE_DEBUG
winDebugWin32Message("winMsgWindowProc", hwnd, message, wParam, lParam); winDebugWin32Message("winMsgWindowProc", hwnd, message, wParam, lParam);
#endif #endif
@ -153,7 +153,7 @@ winMsgWindowThreadProc(void *arg)
/* Pump the msg window message queue */ /* Pump the msg window message queue */
while (GetMessage(&msg, hwndMsg, 0, 0) > 0) { while (GetMessage(&msg, hwndMsg, 0, 0) > 0) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebugWin32Message("winMsgWindowThread", msg.hwnd, msg.message, winDebugWin32Message("winMsgWindowThread", msg.hwnd, msg.message,
msg.wParam, msg.lParam); msg.wParam, msg.lParam);
#endif #endif

View File

@ -46,7 +46,7 @@ winSetShapeMultiWindow(WindowPtr pWin, int kind)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind); ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind);
#endif #endif
@ -89,7 +89,7 @@ winReshapeMultiWindow(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winReshape ()\n"); winDebug("winReshape ()\n");
#endif #endif

View File

@ -84,7 +84,7 @@ winInitMultiWindowClass(void)
wcx.lpszClassName = WINDOW_CLASS_X; wcx.lpszClassName = WINDOW_CLASS_X;
wcx.hIconSm = hIconSmall; wcx.hIconSm = hIconSmall;
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X); ErrorF("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X);
#endif #endif
@ -105,7 +105,7 @@ winCreateWindowMultiWindow(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
winTrace("winCreateWindowMultiWindow - pWin: %p\n", pWin); winTrace("winCreateWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
@ -138,7 +138,7 @@ winDestroyWindowMultiWindow(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winDestroyWindowMultiWindow - pWin: %p\n", pWin); ErrorF("winDestroyWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
@ -177,14 +177,14 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
RECT rcNew; RECT rcNew;
RECT rcOld; RECT rcOld;
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
RECT rcClient; RECT rcClient;
RECT *lpRc; RECT *lpRc;
#endif #endif
DWORD dwExStyle; DWORD dwExStyle;
DWORD dwStyle; DWORD dwStyle;
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
winTrace("winPositionWindowMultiWindow - pWin: %p\n", pWin); winTrace("winPositionWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
@ -192,13 +192,13 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
fResult = (*pScreen->PositionWindow) (pWin, x, y); fResult = (*pScreen->PositionWindow) (pWin, x, y);
WIN_WRAP(PositionWindow, winPositionWindowMultiWindow); WIN_WRAP(PositionWindow, winPositionWindowMultiWindow);
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("winPositionWindowMultiWindow: (x, y) = (%d, %d)\n", x, y); ErrorF("winPositionWindowMultiWindow: (x, y) = (%d, %d)\n", x, y);
#endif #endif
/* Bail out if the Windows window handle is bad */ /* Bail out if the Windows window handle is bad */
if (!hWnd) { if (!hWnd) {
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("\timmediately return since hWnd is NULL\n"); ErrorF("\timmediately return since hWnd is NULL\n");
#endif #endif
return fResult; return fResult;
@ -219,7 +219,7 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
/* Store the origin, height, and width in a rectangle structure */ /* Store the origin, height, and width in a rectangle structure */
SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight); SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
lpRc = &rcNew; lpRc = &rcNew;
ErrorF("winPositionWindowMultiWindow - drawable (%d, %d)-(%d, %d)\n", ErrorF("winPositionWindowMultiWindow - drawable (%d, %d)-(%d, %d)\n",
(int)lpRc->left, (int)lpRc->top, (int)lpRc->right, (int)lpRc->bottom); (int)lpRc->left, (int)lpRc->top, (int)lpRc->right, (int)lpRc->bottom);
@ -234,7 +234,7 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
/* Get a rectangle describing the old Windows window */ /* Get a rectangle describing the old Windows window */
GetWindowRect(hWnd, &rcOld); GetWindowRect(hWnd, &rcOld);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
/* Get a rectangle describing the Windows window client area */ /* Get a rectangle describing the Windows window client area */
GetClientRect(hWnd, &rcClient); GetClientRect(hWnd, &rcClient);
@ -253,11 +253,11 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
/* Check if the old rectangle and new rectangle are the same */ /* Check if the old rectangle and new rectangle are the same */
if (!EqualRect(&rcNew, &rcOld)) { if (!EqualRect(&rcNew, &rcOld)) {
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winPositionWindowMultiWindow - Need to move\n"); ErrorF("winPositionWindowMultiWindow - Need to move\n");
#endif #endif
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("\tMoveWindow to (%d, %d) - %dx%d\n", (int)rcNew.left, (int)rcNew.top, ErrorF("\tMoveWindow to (%d, %d) - %dx%d\n", (int)rcNew.left, (int)rcNew.top,
(int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top)); (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top));
#endif #endif
@ -267,7 +267,7 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, TRUE); rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, TRUE);
} }
else { else {
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winPositionWindowMultiWindow - Not need to move\n"); ErrorF("winPositionWindowMultiWindow - Not need to move\n");
#endif #endif
} }
@ -287,7 +287,7 @@ winChangeWindowAttributesMultiWindow(WindowPtr pWin, unsigned long mask)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winChangeWindowAttributesMultiWindow - pWin: %p\n", pWin); ErrorF("winChangeWindowAttributesMultiWindow - pWin: %p\n", pWin);
#endif #endif
@ -316,7 +316,7 @@ winUnmapWindowMultiWindow(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winUnmapWindowMultiWindow - pWin: %p\n", pWin); ErrorF("winUnmapWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
@ -347,7 +347,7 @@ winMapWindowMultiWindow(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winMapWindowMultiWindow - pWin: %p\n", pWin); ErrorF("winMapWindowMultiWindow - pWin: %p\n", pWin);
#endif #endif
@ -411,7 +411,7 @@ winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG #if ENABLE_DEBUG || ENABLE_DEBUG
winTrace("winRestackMultiWindow - %p\n", pWin); winTrace("winRestackMultiWindow - %p\n", pWin);
#endif #endif
@ -676,7 +676,7 @@ winUpdateWindowsWindow(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
HWND hWnd = pWinPriv->hWnd; HWND hWnd = pWinPriv->hWnd;
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winUpdateWindowsWindow\n"); ErrorF("winUpdateWindowsWindow\n");
#endif #endif
@ -701,7 +701,7 @@ winUpdateWindowsWindow(WindowPtr pWin)
assert(pWinPriv->hWnd == NULL); assert(pWinPriv->hWnd == NULL);
} }
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("-winUpdateWindowsWindow\n"); ErrorF("-winUpdateWindowsWindow\n");
#endif #endif
} }
@ -719,7 +719,7 @@ winGetWindowID(WindowPtr pWin)
/* */ /* */
FindClientResourcesByType(c, RT_WINDOW, winFindWindow, &wi); FindClientResourcesByType(c, RT_WINDOW, winFindWindow, &wi);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winGetWindowID - Window ID: %u\n", (unsigned int)wi.id); ErrorF("winGetWindowID - Window ID: %u\n", (unsigned int)wi.id);
#endif #endif
@ -755,13 +755,13 @@ winReorderWindowsMultiWindow(void)
DWORD dwCurrentProcessID = GetCurrentProcessId(); DWORD dwCurrentProcessID = GetCurrentProcessId();
DWORD dwWindowProcessID = 0; DWORD dwWindowProcessID = 0;
#if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG #if ENABLE_DEBUG || ENABLE_DEBUG
winTrace("winReorderWindowsMultiWindow\n"); winTrace("winReorderWindowsMultiWindow\n");
#endif #endif
if (fRestacking) { if (fRestacking) {
/* It is a recursive call so immediately exit */ /* It is a recursive call so immediately exit */
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("winReorderWindowsMultiWindow - " ErrorF("winReorderWindowsMultiWindow - "
"exit because fRestacking == TRUE\n"); "exit because fRestacking == TRUE\n");
#endif #endif
@ -809,7 +809,7 @@ winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("CopyWindowMultiWindow\n"); ErrorF("CopyWindowMultiWindow\n");
#endif #endif
WIN_UNWRAP(CopyWindow); WIN_UNWRAP(CopyWindow);
@ -828,7 +828,7 @@ winMoveWindowMultiWindow(WindowPtr pWin, int x, int y,
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("MoveWindowMultiWindow to (%d, %d)\n", x, y); ErrorF("MoveWindowMultiWindow to (%d, %d)\n", x, y);
#endif #endif
@ -848,7 +848,7 @@ winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w,
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h); ErrorF("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h);
#endif #endif
WIN_UNWRAP(ResizeWindow); WIN_UNWRAP(ResizeWindow);
@ -879,12 +879,12 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
#define WIDTH(rc) (rc.right - rc.left) #define WIDTH(rc) (rc.right - rc.left)
#define HEIGHT(rc) (rc.bottom - rc.top) #define HEIGHT(rc) (rc.bottom - rc.top)
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("winAdjustXWindow\n"); ErrorF("winAdjustXWindow\n");
#endif #endif
if (IsIconic(hwnd)) { if (IsIconic(hwnd)) {
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("\timmediately return because the window is iconized\n"); ErrorF("\timmediately return because the window is iconized\n");
#endif #endif
/* /*
@ -902,21 +902,21 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
x = pDraw->x + GetSystemMetrics(SM_XVIRTUALSCREEN); x = pDraw->x + GetSystemMetrics(SM_XVIRTUALSCREEN);
y = pDraw->y + GetSystemMetrics(SM_YVIRTUALSCREEN); y = pDraw->y + GetSystemMetrics(SM_YVIRTUALSCREEN);
SetRect(&rcDraw, x, y, x + pDraw->width, y + pDraw->height); SetRect(&rcDraw, x, y, x + pDraw->width, y + pDraw->height);
#ifdef CYGMULTIWINDOW_DEBUG #ifdef ENABLE_DEBUG
winDebug("\tDrawable extend {%d, %d, %d, %d}, {%d, %d}\n", winDebug("\tDrawable extend {%d, %d, %d, %d}, {%d, %d}\n",
(int)rcDraw.left, (int)rcDraw.top, (int)rcDraw.right, (int)rcDraw.bottom, (int)rcDraw.left, (int)rcDraw.top, (int)rcDraw.right, (int)rcDraw.bottom,
(int)(rcDraw.right - rcDraw.left), (int)(rcDraw.bottom - rcDraw.top)); (int)(rcDraw.right - rcDraw.left), (int)(rcDraw.bottom - rcDraw.top));
#endif #endif
dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
#ifdef CYGMULTIWINDOW_DEBUG #ifdef ENABLE_DEBUG
winDebug("\tWindowStyle: %08x %08x\n", (unsigned int)dwStyle, (unsigned int)dwExStyle); winDebug("\tWindowStyle: %08x %08x\n", (unsigned int)dwStyle, (unsigned int)dwExStyle);
#endif #endif
AdjustWindowRectEx(&rcDraw, dwStyle, FALSE, dwExStyle); AdjustWindowRectEx(&rcDraw, dwStyle, FALSE, dwExStyle);
/* The source of adjust */ /* The source of adjust */
GetWindowRect(hwnd, &rcWin); GetWindowRect(hwnd, &rcWin);
#ifdef CYGMULTIWINDOW_DEBUG #ifdef ENABLE_DEBUG
winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n", winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
(int)rcWin.left, (int)rcWin.top, (int)rcWin.right, (int)rcWin.bottom, (int)rcWin.left, (int)rcWin.top, (int)rcWin.right, (int)rcWin.bottom,
(int)(rcWin.right - rcWin.left), (int)(rcWin.bottom - rcWin.top)); (int)(rcWin.right - rcWin.left), (int)(rcWin.bottom - rcWin.top));
@ -927,7 +927,7 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
if (EqualRect(&rcDraw, &rcWin)) { if (EqualRect(&rcDraw, &rcWin)) {
/* Bail if no adjust is needed */ /* Bail if no adjust is needed */
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("\treturn because already adjusted\n"); ErrorF("\treturn because already adjusted\n");
#endif #endif
return 0; return 0;
@ -949,7 +949,7 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
vlist[1] = pDraw->y + dY - wBorderWidth(pWin); vlist[1] = pDraw->y + dY - wBorderWidth(pWin);
vlist[2] = pDraw->width + dW; vlist[2] = pDraw->width + dW;
vlist[3] = pDraw->height + dH; vlist[3] = pDraw->height + dH;
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("\tConfigureWindow to (%u, %u) - %ux%u\n", ErrorF("\tConfigureWindow to (%u, %u) - %ux%u\n",
(unsigned int)vlist[0], (unsigned int)vlist[1], (unsigned int)vlist[0], (unsigned int)vlist[1],
(unsigned int)vlist[2], (unsigned int)vlist[3]); (unsigned int)vlist[2], (unsigned int)vlist[3]);

View File

@ -77,8 +77,8 @@ extern void winDebug(const char *format, ...);
extern void winReshapeMultiWindow(WindowPtr pWin); extern void winReshapeMultiWindow(WindowPtr pWin);
extern void winUpdateRgnMultiWindow(WindowPtr pWin); extern void winUpdateRgnMultiWindow(WindowPtr pWin);
#ifndef CYGDEBUG #ifndef ENABLE_DEBUG
#define CYGDEBUG NO #define ENABLE_DEBUG NO
#endif #endif
/* /*
@ -189,7 +189,7 @@ static Bool g_shutdown = FALSE;
* Translate msg id to text, for debug purposes * Translate msg id to text, for debug purposes
*/ */
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
static const char * static const char *
MessageName(winWMMessagePtr msg) MessageName(winWMMessagePtr msg)
{ {
@ -386,7 +386,7 @@ GetWindowName(WMInfoPtr pWMInfo, xcb_window_t iWin, char **ppWindowName)
xcb_connection_t *conn = pWMInfo->conn; xcb_connection_t *conn = pWMInfo->conn;
char *pszWindowName = NULL; char *pszWindowName = NULL;
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("GetWindowName\n"); ErrorF("GetWindowName\n");
#endif #endif
@ -791,7 +791,7 @@ winMultiWindowWMProc(void *pArg)
/* Initialize the Window Manager */ /* Initialize the Window Manager */
winInitMultiWindowWM(pWMInfo, pProcArg); winInitMultiWindowWM(pWMInfo, pProcArg);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winMultiWindowWMProc ()\n"); ErrorF("winMultiWindowWMProc ()\n");
#endif #endif
@ -808,7 +808,7 @@ winMultiWindowWMProc(void *pArg)
pthread_exit(NULL); pthread_exit(NULL);
} }
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winMultiWindowWMProc - MSG: %s (%d) ID: %d\n", ErrorF("winMultiWindowWMProc - MSG: %s (%d) ID: %d\n",
MessageName(&(pNode->msg)), (int)pNode->msg.msg, (int)pNode->msg.dwID); MessageName(&(pNode->msg)), (int)pNode->msg.msg, (int)pNode->msg.dwID);
#endif #endif
@ -1002,7 +1002,7 @@ winMultiWindowWMProc(void *pArg)
/* Free the passed-in argument */ /* Free the passed-in argument */
free(pProcArg); free(pProcArg);
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("-winMultiWindowWMProc ()\n"); ErrorF("-winMultiWindowWMProc ()\n");
#endif #endif
return NULL; return NULL;
@ -1441,7 +1441,7 @@ winInitWM(void **ppWMInfo,
return FALSE; return FALSE;
} }
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winInitWM - Returning.\n"); winDebug("winInitWM - Returning.\n");
#endif #endif
@ -1631,7 +1631,7 @@ winSendMessageToWM(void *pWMInfo, winWMMessagePtr pMsg)
{ {
WMMsgNodePtr pNode; WMMsgNodePtr pNode;
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winSendMessageToWM %s\n", MessageName(pMsg)); ErrorF("winSendMessageToWM %s\n", MessageName(pMsg));
#endif #endif

View File

@ -429,7 +429,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT ret; LRESULT ret;
static Bool hasEnteredSizeMove = FALSE; static Bool hasEnteredSizeMove = FALSE;
#if CYGDEBUG #if ENABLE_DEBUG
winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam, winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam,
lParam); lParam);
#endif #endif
@ -842,7 +842,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (wParam == VK_F4 && (GetKeyState(VK_MENU) & 0x8000)) if (wParam == VK_F4 && (GetKeyState(VK_MENU) & 0x8000))
break; break;
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
if (wParam == VK_ESCAPE) { if (wParam == VK_ESCAPE) {
/* Place for debug: put any tests and dumps here */ /* Place for debug: put any tests and dumps here */
WINDOWPLACEMENT windPlace; WINDOWPLACEMENT windPlace;
@ -1009,7 +1009,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
HWND forHwnd = GetForegroundWindow(); HWND forHwnd = GetForegroundWindow();
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
ErrorF("overridden window is shown\n"); ErrorF("overridden window is shown\n");
#endif #endif
if (forHwnd != NULL) { if (forHwnd != NULL) {
@ -1044,13 +1044,13 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
LPWINDOWPOS pWinPos = (LPWINDOWPOS) lParam; LPWINDOWPOS pWinPos = (LPWINDOWPOS) lParam;
if (!(pWinPos->flags & SWP_NOZORDER)) { if (!(pWinPos->flags & SWP_NOZORDER)) {
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
winDebug("\twindow z order was changed\n"); winDebug("\twindow z order was changed\n");
#endif #endif
if (pWinPos->hwndInsertAfter == HWND_TOP if (pWinPos->hwndInsertAfter == HWND_TOP
|| pWinPos->hwndInsertAfter == HWND_TOPMOST || pWinPos->hwndInsertAfter == HWND_TOPMOST
|| pWinPos->hwndInsertAfter == HWND_NOTOPMOST) { || pWinPos->hwndInsertAfter == HWND_NOTOPMOST) {
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
winDebug("\traise to top\n"); winDebug("\traise to top\n");
#endif #endif
/* Raise the window to the top in Z order */ /* Raise the window to the top in Z order */
@ -1079,7 +1079,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* If this is top of X windows in Windows stack, /* If this is top of X windows in Windows stack,
raise it in X stack. */ raise it in X stack. */
if (hWndAbove == NULL) { if (hWndAbove == NULL) {
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
winDebug("\traise to top\n"); winDebug("\traise to top\n");
#endif #endif
winRaiseWindow(pWin); winRaiseWindow(pWin);
@ -1105,7 +1105,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_SIZE: case WM_SIZE:
/* see dix/window.c */ /* see dix/window.c */
#if CYGWINDOWING_DEBUG #if ENABLE_DEBUG
{ {
char buf[64]; char buf[64];
@ -1209,7 +1209,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* Check if this window needs to be made active when clicked */ /* Check if this window needs to be made active when clicked */
if (!GetProp(pWinPriv->hWnd, WIN_NEEDMANAGE_PROP)) { if (!GetProp(pWinPriv->hWnd, WIN_NEEDMANAGE_PROP)) {
#if CYGMULTIWINDOW_DEBUG #if ENABLE_DEBUG
ErrorF("winTopLevelWindowProc - WM_MOUSEACTIVATE - " ErrorF("winTopLevelWindowProc - WM_MOUSEACTIVATE - "
"MA_NOACTIVATE\n"); "MA_NOACTIVATE\n");
#endif #endif

View File

@ -250,7 +250,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
} }
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("ddxProcessArgument - arg: %s\n", argv[i]); winDebug("ddxProcessArgument - arg: %s\n", argv[i]);
#endif #endif
@ -283,7 +283,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
int iWidth, iHeight, iX, iY; int iWidth, iHeight, iX, iY;
int iMonitor; int iMonitor;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("ddxProcessArgument - screen - argc: %d i: %d\n", argc, i); winDebug("ddxProcessArgument - screen - argc: %d i: %d\n", argc, i);
#endif #endif

View File

@ -52,7 +52,7 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
HDC hdc; HDC hdc;
DWORD dwInitialBPP; DWORD dwInitialBPP;
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winScreenInit - dwWidth: %u dwHeight: %u\n", winDebug("winScreenInit - dwWidth: %u dwHeight: %u\n",
(unsigned int)pScreenInfo->dwWidth, (unsigned int)pScreenInfo->dwHeight); (unsigned int)pScreenInfo->dwWidth, (unsigned int)pScreenInfo->dwHeight);
#endif #endif
@ -194,7 +194,7 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
pScreen->myNum, pScreen->x, pScreen->y); pScreen->myNum, pScreen->x, pScreen->y);
} }
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winScreenInit - returning\n"); winDebug("winScreenInit - returning\n");
#endif #endif
@ -333,14 +333,14 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
#endif #endif
/* Setup the cursor routines */ /* Setup the cursor routines */
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winFinishScreenInitFB - Calling miDCInitialize ()\n"); winDebug("winFinishScreenInitFB - Calling miDCInitialize ()\n");
#endif #endif
miDCInitialize(pScreen, &g_winPointerCursorFuncs); miDCInitialize(pScreen, &g_winPointerCursorFuncs);
/* KDrive does winCreateDefColormap right after miDCInitialize */ /* KDrive does winCreateDefColormap right after miDCInitialize */
/* Create a default colormap */ /* Create a default colormap */
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winFinishScreenInitFB - Calling winCreateDefColormap ()\n"); winDebug("winFinishScreenInitFB - Calling winCreateDefColormap ()\n");
#endif #endif
if (!winCreateDefColormap(pScreen)) { if (!winCreateDefColormap(pScreen)) {
@ -351,7 +351,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
/* Initialize the shadow framebuffer layer */ /* Initialize the shadow framebuffer layer */
if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
|| pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) { || pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n"); winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n");
#endif #endif
if (!shadowSetup(pScreen)) { if (!shadowSetup(pScreen)) {
@ -473,7 +473,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
if (pScreenInfo->fMultiWindow) { if (pScreenInfo->fMultiWindow) {
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winFinishScreenInitFB - Calling winInitWM.\n"); winDebug("winFinishScreenInitFB - Calling winInitWM.\n");
#endif #endif
@ -496,7 +496,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
/* Tell the server that we have a valid depth */ /* Tell the server that we have a valid depth */
pScreenPriv->fBadDepth = FALSE; pScreenPriv->fBadDepth = FALSE;
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winFinishScreenInitFB - returning\n"); winDebug("winFinishScreenInitFB - returning\n");
#endif #endif

View File

@ -198,7 +198,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
.dwSize = sizeof(DDPIXELFORMAT) .dwSize = sizeof(DDPIXELFORMAT)
}; };
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowDDNL - w %u h %u d %u\n", winDebug("winAllocateFBShadowDDNL - w %u h %u d %u\n",
(unsigned int)pScreenInfo->dwWidth, (unsigned int)pScreenInfo->dwWidth,
(unsigned int)pScreenInfo->dwHeight, (unsigned int)pScreenInfo->dwHeight,
@ -225,7 +225,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowDDNL - Created a clipper\n"); winDebug("winAllocateFBShadowDDNL - Created a clipper\n");
#endif #endif
@ -238,7 +238,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowDDNL - Attached clipper to window\n"); winDebug("winAllocateFBShadowDDNL - Attached clipper to window\n");
#endif #endif
@ -252,7 +252,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowDDNL - Created and initialized DD\n"); winDebug("winAllocateFBShadowDDNL - Created and initialized DD\n");
#endif #endif
@ -391,7 +391,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowDDNL - Primary masks: %08x %08x %08x " winDebug("winAllocateFBShadowDDNL - Primary masks: %08x %08x %08x "
"dwRGBBitCount: %u\n", "dwRGBBitCount: %u\n",
(unsigned int)ddpfPrimary.u2.dwRBitMask, (unsigned int)ddpfPrimary.u2.dwRBitMask,
@ -434,7 +434,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winAllocateFBShadowDDNL - Created shadow pitch: %d\n", winDebug("winAllocateFBShadowDDNL - Created shadow pitch: %d\n",
(int) ddsdShadow.u1.lPitch); (int) ddsdShadow.u1.lPitch);
#endif #endif
@ -443,7 +443,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
pScreenInfo->dwStride = (ddsdShadow.u1.lPitch * 8) pScreenInfo->dwStride = (ddsdShadow.u1.lPitch * 8)
/ pScreenInfo->dwBPP; / pScreenInfo->dwBPP;
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winAllocateFBShadowDDNL - Created shadow stride: %d\n", winDebug("winAllocateFBShadowDDNL - Created shadow stride: %d\n",
(int) pScreenInfo->dwStride); (int) pScreenInfo->dwStride);
#endif #endif
@ -456,7 +456,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
pScreenPriv->dwGreenMask = ddsdShadow.u4.ddpfPixelFormat.u3.dwGBitMask; pScreenPriv->dwGreenMask = ddsdShadow.u4.ddpfPixelFormat.u3.dwGBitMask;
pScreenPriv->dwBlueMask = ddsdShadow.u4.ddpfPixelFormat.u4.dwBBitMask; pScreenPriv->dwBlueMask = ddsdShadow.u4.ddpfPixelFormat.u4.dwBBitMask;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowDDNL - Returning\n"); winDebug("winAllocateFBShadowDDNL - Returning\n");
#endif #endif
@ -599,7 +599,7 @@ winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf)
DeleteObject(hrgnCombined); DeleteObject(hrgnCombined);
hrgnCombined = NULL; hrgnCombined = NULL;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winShadowUpdateDDNL - be x1 %d y1 %d x2 %d y2 %d\n", winDebug("winShadowUpdateDDNL - be x1 %d y1 %d x2 %d y2 %d\n",
pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x1, pBoxExtents->y1,
pBoxExtents->x2, pBoxExtents->y2); pBoxExtents->x2, pBoxExtents->y2);
@ -652,7 +652,7 @@ winCloseScreenShadowDDNL(ScreenPtr pScreen)
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
Bool fReturn = TRUE; Bool fReturn = TRUE;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCloseScreenShadowDDNL - Freeing screen resources\n"); winDebug("winCloseScreenShadowDDNL - Freeing screen resources\n");
#endif #endif
@ -791,7 +791,7 @@ winInitVisualsShadowDDNL(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winInitVisualsShadowDDNL - Returning\n"); winDebug("winInitVisualsShadowDDNL - Returning\n");
#endif #endif
@ -1136,7 +1136,7 @@ winDestroyColormapShadowDDNL(ColormapPtr pColormap)
* we need to handle the default colormap in a special way. * we need to handle the default colormap in a special way.
*/ */
if (pColormap->flags & IsDefault) { if (pColormap->flags & IsDefault) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug winDebug
("winDestroyColormapShadowDDNL - Destroying default colormap\n"); ("winDestroyColormapShadowDDNL - Destroying default colormap\n");
#endif #endif

View File

@ -94,7 +94,7 @@ winQueryScreenDIBFormat(ScreenPtr pScreen, BITMAPINFOHEADER * pbmih)
winScreenPriv(pScreen); winScreenPriv(pScreen);
HBITMAP hbmp; HBITMAP hbmp;
#if CYGDEBUG #if ENABLE_DEBUG
LPDWORD pdw = NULL; LPDWORD pdw = NULL;
#endif #endif
@ -117,7 +117,7 @@ winQueryScreenDIBFormat(ScreenPtr pScreen, BITMAPINFOHEADER * pbmih)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
/* Get a pointer to bitfields */ /* Get a pointer to bitfields */
pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER)); pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER));
@ -196,7 +196,7 @@ winQueryRGBBitsAndMasks(ScreenPtr pScreen)
/* Get a pointer to bitfields */ /* Get a pointer to bitfields */
pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER)); pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER));
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("%s - Masks: %08x %08x %08x\n", __FUNCTION__, winDebug("%s - Masks: %08x %08x %08x\n", __FUNCTION__,
(unsigned int)pdw[0], (unsigned int)pdw[1], (unsigned int)pdw[2]); (unsigned int)pdw[0], (unsigned int)pdw[1], (unsigned int)pdw[2]);
winDebug("%s - Bitmap: %dx%d %d bpp %d planes\n", __FUNCTION__, winDebug("%s - Bitmap: %dx%d %d bpp %d planes\n", __FUNCTION__,
@ -342,7 +342,7 @@ winAllocateFBShadowGDI(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
else { else {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowGDI - Shadow buffer allocated\n"); winDebug("winAllocateFBShadowGDI - Shadow buffer allocated\n");
#endif #endif
} }
@ -350,7 +350,7 @@ winAllocateFBShadowGDI(ScreenPtr pScreen)
/* Get information about the bitmap that was allocated */ /* Get information about the bitmap that was allocated */
GetObject(pScreenPriv->hbmpShadow, sizeof(dibsection), &dibsection); GetObject(pScreenPriv->hbmpShadow, sizeof(dibsection), &dibsection);
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
/* Print information about bitmap allocated */ /* Print information about bitmap allocated */
winDebug("winAllocateFBShadowGDI - Dibsection width: %d height: %d " winDebug("winAllocateFBShadowGDI - Dibsection width: %d height: %d "
"depth: %d size image: %d\n", "depth: %d size image: %d\n",
@ -361,7 +361,7 @@ winAllocateFBShadowGDI(ScreenPtr pScreen)
/* Select the shadow bitmap into the shadow DC */ /* Select the shadow bitmap into the shadow DC */
SelectObject(pScreenPriv->hdcShadow, pScreenPriv->hbmpShadow); SelectObject(pScreenPriv->hdcShadow, pScreenPriv->hbmpShadow);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowGDI - Attempting a shadow blit\n"); winDebug("winAllocateFBShadowGDI - Attempting a shadow blit\n");
#endif #endif
@ -371,7 +371,7 @@ winAllocateFBShadowGDI(ScreenPtr pScreen)
pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenInfo->dwWidth, pScreenInfo->dwHeight,
pScreenPriv->hdcShadow, 0, 0, SRCCOPY); pScreenPriv->hdcShadow, 0, 0, SRCCOPY);
if (fReturn) { if (fReturn) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAllocateFBShadowGDI - Shadow blit success\n"); winDebug("winAllocateFBShadowGDI - Shadow blit success\n");
#endif #endif
} }
@ -397,7 +397,7 @@ winAllocateFBShadowGDI(ScreenPtr pScreen)
/ dibsection.dsBmih.biHeight) / dibsection.dsBmih.biHeight)
* 8) / pScreenInfo->dwBPP; * 8) / pScreenInfo->dwBPP;
#if CYGDEBUG || YES #if ENABLE_DEBUG || YES
winDebug("winAllocateFBShadowGDI - Created shadow stride: %d\n", winDebug("winAllocateFBShadowGDI - Created shadow stride: %d\n",
(int) pScreenInfo->dwStride); (int) pScreenInfo->dwStride);
#endif #endif
@ -573,7 +573,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen)
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
Bool fReturn = TRUE; Bool fReturn = TRUE;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winCloseScreenShadowGDI - Freeing screen resources\n"); winDebug("winCloseScreenShadowGDI - Freeing screen resources\n");
#endif #endif
@ -698,7 +698,7 @@ winInitVisualsShadowGDI(ScreenPtr pScreen)
return FALSE; return FALSE;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winInitVisualsShadowGDI - Returning\n"); winDebug("winInitVisualsShadowGDI - Returning\n");
#endif #endif
@ -1002,13 +1002,13 @@ winRealizeInstalledPaletteShadowGDI(ScreenPtr pScreen)
winScreenPriv(pScreen); winScreenPriv(pScreen);
winPrivCmapPtr pCmapPriv = NULL; winPrivCmapPtr pCmapPriv = NULL;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winRealizeInstalledPaletteShadowGDI\n"); winDebug("winRealizeInstalledPaletteShadowGDI\n");
#endif #endif
/* Don't do anything if there is not a colormap */ /* Don't do anything if there is not a colormap */
if (pScreenPriv->pcmapInstalled == NULL) { if (pScreenPriv->pcmapInstalled == NULL) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winRealizeInstalledPaletteShadowGDI - No colormap " winDebug("winRealizeInstalledPaletteShadowGDI - No colormap "
"installed\n"); "installed\n");
#endif #endif
@ -1210,7 +1210,7 @@ winDestroyColormapShadowGDI(ColormapPtr pColormap)
* we need to handle the default colormap in a special way. * we need to handle the default colormap in a special way.
*/ */
if (pColormap->flags & IsDefault) { if (pColormap->flags & IsDefault) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winDestroyColormapShadowGDI - Destroying default " winDebug("winDestroyColormapShadowGDI - Destroying default "
"colormap\n"); "colormap\n");
#endif #endif

View File

@ -61,7 +61,7 @@ winCreateWindowRootless(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winCreateWindowRootless (%p)\n", pWin); winTrace("winCreateWindowRootless (%p)\n", pWin);
#endif #endif
@ -86,7 +86,7 @@ winDestroyWindowRootless(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winDestroyWindowRootless (%p)\n", pWin); winTrace("winDestroyWindowRootless (%p)\n", pWin);
#endif #endif
@ -115,7 +115,7 @@ winPositionWindowRootless(WindowPtr pWin, int x, int y)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winPositionWindowRootless (%p)\n", pWin); winTrace("winPositionWindowRootless (%p)\n", pWin);
#endif #endif
@ -139,7 +139,7 @@ winChangeWindowAttributesRootless(WindowPtr pWin, unsigned long mask)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winChangeWindowAttributesRootless (%p)\n", pWin); winTrace("winChangeWindowAttributesRootless (%p)\n", pWin);
#endif #endif
@ -165,7 +165,7 @@ winUnmapWindowRootless(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winUnmapWindowRootless (%p)\n", pWin); winTrace("winUnmapWindowRootless (%p)\n", pWin);
#endif #endif
@ -195,7 +195,7 @@ winMapWindowRootless(WindowPtr pWin)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winMapWindowRootless (%p)\n", pWin); winTrace("winMapWindowRootless (%p)\n", pWin);
#endif #endif
@ -217,7 +217,7 @@ winSetShapeRootless(WindowPtr pWin, int kind)
winScreenPriv(pScreen); winScreenPriv(pScreen);
#if CYGDEBUG #if ENABLE_DEBUG
winTrace("winSetShapeRootless (%p, %i)\n", pWin, kind); winTrace("winSetShapeRootless (%p, %i)\n", pWin, kind);
#endif #endif
@ -247,7 +247,7 @@ winAddRgn(WindowPtr pWin, void *data)
/* If pWin is not Root */ /* If pWin is not Root */
if (pWin->parent != NULL) { if (pWin->parent != NULL) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winAddRgn ()\n"); winDebug("winAddRgn ()\n");
#endif #endif
if (pWin->mapped) { if (pWin->mapped) {
@ -320,7 +320,7 @@ winReshapeRootless(WindowPtr pWin)
winWindowPriv(pWin); winWindowPriv(pWin);
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winReshapeRootless ()\n"); winDebug("winReshapeRootless ()\n");
#endif #endif

View File

@ -57,12 +57,6 @@
#endif #endif
#define WIN_WID_PROP "cyg_wid_prop_rl" #define WIN_WID_PROP "cyg_wid_prop_rl"
#define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl" #define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl"
#ifndef CYGMULTIWINDOW_DEBUG
#define CYGMULTIWINDOW_DEBUG NO
#endif
#ifndef CYGWINDOWING_DEBUG
#define CYGWINDOWING_DEBUG NO
#endif
#define XMING_SIGNATURE 0x12345678L #define XMING_SIGNATURE 0x12345678L

View File

@ -69,7 +69,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
int iScanCode; int iScanCode;
int i; int i;
#if CYGDEBUG #if ENABLE_DEBUG
winDebugWin32Message("winWindowProc", hwnd, message, wParam, lParam); winDebugWin32Message("winWindowProc", hwnd, message, wParam, lParam);
#endif #endif
@ -82,7 +82,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* Only retrieve new privates pointers if window handle is null or changed */ /* Only retrieve new privates pointers if window handle is null or changed */
if ((s_pScreenPriv == NULL || hwnd != s_hwndLastPrivates) if ((s_pScreenPriv == NULL || hwnd != s_hwndLastPrivates)
&& (s_pScreenPriv = GetProp(hwnd, WIN_SCR_PROP)) != NULL) { && (s_pScreenPriv = GetProp(hwnd, WIN_SCR_PROP)) != NULL) {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - Setting privates handle\n"); winDebug("winWindowProc - Setting privates handle\n");
#endif #endif
s_pScreenInfo = s_pScreenPriv->pScreenInfo; s_pScreenInfo = s_pScreenPriv->pScreenInfo;
@ -103,7 +103,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
s_pScreenPriv); s_pScreenPriv);
case WM_CREATE: case WM_CREATE:
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_CREATE\n"); winDebug("winWindowProc - WM_CREATE\n");
#endif #endif
@ -299,7 +299,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
RECT rcWindow; RECT rcWindow;
int iWidth, iHeight; int iWidth, iHeight;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_SIZE\n"); winDebug("winWindowProc - WM_SIZE\n");
#endif #endif
@ -437,7 +437,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
SCROLLINFO si; SCROLLINFO si;
int iVertPos; int iVertPos;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_VSCROLL\n"); winDebug("winWindowProc - WM_VSCROLL\n");
#endif #endif
@ -516,7 +516,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
SCROLLINFO si; SCROLLINFO si;
int iHorzPos; int iHorzPos;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_HSCROLL\n"); winDebug("winWindowProc - WM_HSCROLL\n");
#endif #endif
@ -595,7 +595,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
int iCaptionHeight; int iCaptionHeight;
int iBorderHeight, iBorderWidth; int iBorderHeight, iBorderWidth;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %p\n", winDebug("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %p\n",
s_pScreenInfo); s_pScreenInfo);
#endif #endif
@ -634,7 +634,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
return 0; return 0;
case WM_ERASEBKGND: case WM_ERASEBKGND:
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_ERASEBKGND\n"); winDebug("winWindowProc - WM_ERASEBKGND\n");
#endif #endif
/* /*
@ -645,7 +645,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
return TRUE; return TRUE;
case WM_PAINT: case WM_PAINT:
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_PAINT\n"); winDebug("winWindowProc - WM_PAINT\n");
#endif #endif
/* Only paint if we have privates and the server is enabled */ /* Only paint if we have privates and the server is enabled */
@ -667,7 +667,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_PALETTECHANGED: case WM_PALETTECHANGED:
{ {
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_PALETTECHANGED\n"); winDebug("winWindowProc - WM_PALETTECHANGED\n");
#endif #endif
/* /*
@ -904,7 +904,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_MOUSEWHEEL: case WM_MOUSEWHEEL:
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break; break;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_MOUSEWHEEL\n"); winDebug("winWindowProc - WM_MOUSEWHEEL\n");
#endif #endif
/* Button4 = WheelUp */ /* Button4 = WheelUp */
@ -915,7 +915,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_MOUSEHWHEEL: case WM_MOUSEHWHEEL:
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break; break;
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_MOUSEHWHEEL\n"); winDebug("winWindowProc - WM_MOUSEHWHEEL\n");
#endif #endif
/* Button7 = TiltRight */ /* Button7 = TiltRight */
@ -1071,7 +1071,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
return 0; return 0;
} }
#if CYGDEBUG #if ENABLE_DEBUG
winDebug("winWindowProc - WM_ACTIVATE\n"); winDebug("winWindowProc - WM_ACTIVATE\n");
#endif #endif
@ -1097,7 +1097,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break; break;
#if CYGDEBUG || TRUE #if ENABLE_DEBUG || TRUE
winDebug("winWindowProc - WM_ACTIVATEAPP\n"); winDebug("winWindowProc - WM_ACTIVATEAPP\n");
#endif #endif

View File

@ -411,10 +411,7 @@ xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin' ? '1' : false,
description: 'Has /dev/windows for signaling new win32 messages') description: 'Has /dev/windows for signaling new win32 messages')
xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false, xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false,
description: 'Make paths relative to the xserver installation location') description: 'Make paths relative to the xserver installation location')
# XXX: these three are all the same as DEBUG so we should just change to that xwin_data.set10('ENABLE_DEBUG', enable_debugging)
xwin_data.set10('CYGDEBUG', enable_debugging)
xwin_data.set10('CYGWINDOWING_DEBUG',enable_debugging)
xwin_data.set10('CYGMULTIWINDOW_DEBUG', enable_debugging)
configure_file(output : 'xwin-config.h', configure_file(output : 'xwin-config.h',
input : 'xwin-config.h.meson.in', input : 'xwin-config.h.meson.in',

View File

@ -13,9 +13,7 @@
#mesondefine HAS_DEVWINDOWS #mesondefine HAS_DEVWINDOWS
/* Switch on debug messages */ /* Switch on debug messages */
#mesondefine CYGDEBUG #mesondefine ENABLE_DEBUG
#mesondefine CYGWINDOWING_DEBUG
#mesondefine CYGMULTIWINDOW_DEBUG
/* Default log location */ /* Default log location */
#mesondefine DEFAULT_LOGDIR #mesondefine DEFAULT_LOGDIR