diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index 55bbbaa86..a84976778 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -46,7 +46,7 @@ Bool xnestUserBorderWidth = FALSE; char *xnestWindowName = NULL; int xnestNumScreens = 0; Bool xnestDoDirectColormaps = FALSE; -Window xnestParentWindow = 0; +xcb_window_t xnestParentWindow = 0; int ddxProcessArgument(int argc, char *argv[], int i) diff --git a/hw/xnest/Args.h b/hw/xnest/Args.h index 7ee70c56b..c742aa37d 100644 --- a/hw/xnest/Args.h +++ b/hw/xnest/Args.h @@ -18,6 +18,8 @@ is" without express or implied warranty. #include #include +#include + extern char *xnestDisplayName; extern Bool xnestFullGeneration; extern int xnestDefaultClass; @@ -32,6 +34,6 @@ extern Bool xnestUserBorderWidth; extern char *xnestWindowName; extern int xnestNumScreens; extern Bool xnestDoDirectColormaps; -extern Window xnestParentWindow; +extern xcb_window_t xnestParentWindow; #endif /* XNESTARGS_H */ diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c index a964bf46b..ae20d009d 100644 --- a/hw/xnest/Color.c +++ b/hw/xnest/Color.c @@ -17,6 +17,8 @@ is" without express or implied warranty. #include #include +#include + #include "dix/colormap_priv.h" #include "scrnintstr.h" @@ -182,11 +184,11 @@ xnestGetInstalledColormapWindows(WindowPtr pWin, void *ptr) return WT_WALKCHILDREN; } -static Window *xnestOldInstalledColormapWindows = NULL; +static xcb_window_t *xnestOldInstalledColormapWindows = NULL; static int xnestNumOldInstalledColormapWindows = 0; static Bool -xnestSameInstalledColormapWindows(Window *windows, int numWindows) +xnestSameInstalledColormapWindows(xcb_window_t *windows, int numWindows) { if (xnestNumOldInstalledColormapWindows != numWindows) return FALSE; @@ -198,7 +200,7 @@ xnestSameInstalledColormapWindows(Window *windows, int numWindows) return FALSE; if (memcmp(xnestOldInstalledColormapWindows, windows, - numWindows * sizeof(Window))) + numWindows * sizeof(xcb_window_t))) return FALSE; return TRUE; @@ -216,10 +218,7 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) icws.numWindows = 0; WalkTree(pScreen, xnestCountInstalledColormapWindows, (void *) &icws); if (icws.numWindows) { - if (!(icws.windows = calloc(icws.numWindows + 1, sizeof(Window)))) { - free(icws.cmapIDs); - return; - } + icws.windows = calloc(icws.numWindows + 1, sizeof(xcb_window_t)); icws.index = 0; WalkTree(pScreen, xnestGetInstalledColormapWindows, (void *) &icws); icws.windows[icws.numWindows] = xnestDefaultWindows[pScreen->myNum]; diff --git a/hw/xnest/Color.h b/hw/xnest/Color.h index a91c3530d..9ac6391b0 100644 --- a/hw/xnest/Color.h +++ b/hw/xnest/Color.h @@ -33,7 +33,7 @@ typedef struct { int numCmapIDs; Colormap *cmapIDs; int numWindows; - Window *windows; + xcb_window_t *windows; int index; } xnestInstalledColormapWindows; diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index c1dff365b..6b4d2e19b 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -46,13 +46,13 @@ is" without express or implied warranty. #include "Args.h" #include "mipointrst.h" -Window xnestDefaultWindows[MAXSCREENS]; -Window xnestScreenSaverWindows[MAXSCREENS]; +xcb_window_t xnestDefaultWindows[MAXSCREENS]; +xcb_window_t xnestScreenSaverWindows[MAXSCREENS]; DevPrivateKeyRec xnestScreenCursorFuncKeyRec; DevScreenPrivateKeyRec xnestScreenCursorPrivKeyRec; ScreenPtr -xnestScreen(Window window) +xnestScreen(xcb_window_t window) { int i; diff --git a/hw/xnest/Screen.h b/hw/xnest/Screen.h index d06338f5a..60312e7d9 100644 --- a/hw/xnest/Screen.h +++ b/hw/xnest/Screen.h @@ -18,10 +18,12 @@ is" without express or implied warranty. #include #include -extern Window xnestDefaultWindows[MAXSCREENS]; -extern Window xnestScreenSaverWindows[MAXSCREENS]; +#include -ScreenPtr xnestScreen(Window window); +extern xcb_window_t xnestDefaultWindows[MAXSCREENS]; +extern xcb_window_t xnestScreenSaverWindows[MAXSCREENS]; + +ScreenPtr xnestScreen(xcb_window_t window); Bool xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]); Bool xnestCloseScreen(ScreenPtr pScreen); diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index 1499fed6d..e8d9520cb 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -56,7 +56,7 @@ xnestFindWindowMatch(WindowPtr pWin, void *ptr) } WindowPtr -xnestWindowPtr(Window window) +xnestWindowPtr(xcb_window_t window) { xnestWindowMatch wm; int i; diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index db6491ebb..79f776ef4 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -16,23 +16,24 @@ is" without express or implied warranty. #define XNESTWINDOW_H #include +#include typedef struct { - Window window; - Window parent; + xcb_window_t window; + xcb_window_t parent; int x; int y; unsigned int width; unsigned int height; unsigned int border_width; - Window sibling_above; + xcb_window_t sibling_above; RegionPtr bounding_shape; RegionPtr clip_shape; } xnestPrivWin; typedef struct { WindowPtr pWin; - Window window; + xcb_window_t window; } xnestWindowMatch; extern DevPrivateKeyRec xnestWindowPrivateKeyRec; @@ -55,7 +56,7 @@ extern DevPrivateKeyRec xnestWindowPrivateKeyRec; #define xnestWindowSiblingBelow(pWin) \ ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : XCB_WINDOW_NONE) -WindowPtr xnestWindowPtr(Window window); +WindowPtr xnestWindowPtr(xcb_window_t window); Bool xnestCreateWindow(WindowPtr pWin); Bool xnestDestroyWindow(WindowPtr pWin); Bool xnestPositionWindow(WindowPtr pWin, int x, int y);