Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hw/xnest/Color.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static DevPrivateKeyRec cmapScrPrivateKeyRec;
#define cmapScrPrivateKey (&cmapScrPrivateKeyRec)

#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey))
#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c))
#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, (c)))

static Bool load_colormap(ColormapPtr pCmap, int ncolors, uint32_t *colors)
{
Expand Down
2 changes: 1 addition & 1 deletion hw/xnest/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
#define xnestColormapPriv(pCmap) \
((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))

#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
#define xnestColormap(pCmap) (xnestColormapPriv((pCmap))->colormap)

#define xnestPixel(pixel) (pixel)

Expand Down
4 changes: 2 additions & 2 deletions hw/xnest/Drawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ is" without express or implied warranty.

#define xnestDrawable(pDrawable) \
(WindowDrawable((pDrawable)->type) ? \
xnestWindow((WindowPtr)pDrawable) : \
xnestPixmap((PixmapPtr)pDrawable))
xnestWindow((WindowPtr)(pDrawable)) : \
xnestPixmap((PixmapPtr)(pDrawable)))

#endif /* XNESTDRAWABLE_H */
6 changes: 3 additions & 3 deletions hw/xnest/XNCursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ extern DevScreenPrivateKeyRec xnestScreenCursorPrivKeyRec;

#define xnestGetCursorPriv(pCursor, pScreen) ((xnestPrivCursor *) \
dixLookupScreenPrivate(&(pCursor)->devPrivates, \
&xnestScreenCursorPrivKeyRec, pScreen))
&xnestScreenCursorPrivKeyRec, (pScreen)))

#define xnestSetCursorPriv(pCursor, pScreen, v) \
dixSetScreenPrivate(&(pCursor)->devPrivates, \
&xnestScreenCursorPrivKeyRec, pScreen, v)
&xnestScreenCursorPrivKeyRec, (pScreen), (v))

#define xnestCursor(pCursor, pScreen) \
(xnestGetCursorPriv(pCursor, pScreen)->cursor)
(xnestGetCursorPriv((pCursor), (pScreen))->cursor)

Bool xnestRealizeCursor(DeviceIntPtr pDev,
ScreenPtr pScreen, CursorPtr pCursor);
Expand Down
2 changes: 1 addition & 1 deletion hw/xnest/XNFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ is" without express or implied warranty.
extern int xnestFontPrivateIndex;

#define xnestFontPriv(pFont) \
((xnestPrivFont *)FontGetPrivate(pFont, xnestFontPrivateIndex))
((xnestPrivFont *)FontGetPrivate((pFont), xnestFontPrivateIndex))

Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont);
Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
Expand Down
2 changes: 1 addition & 1 deletion hw/xnest/XNGC.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern DevPrivateKeyRec xnestGCPrivateKeyRec;
#define xnestGCPriv(pGC) ((xnestPrivGC *) \
dixLookupPrivate(&(pGC)->devPrivates, xnestGCPrivateKey))

#define xnestGC(pGC) (xnestGCPriv(pGC)->gc)
#define xnestGC(pGC) (xnestGCPriv((pGC))->gc)

Bool xnestCreateGC(GCPtr pGC);
void xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
Expand Down
2 changes: 1 addition & 1 deletion hw/xnest/XNPixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ typedef struct {
#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))

#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
#define xnestPixmap(pPixmap) (xnestPixmapPriv((pPixmap))->pixmap)

#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)

Expand Down
4 changes: 2 additions & 2 deletions hw/xnest/XNWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ extern DevPrivateKeyRec xnestWindowPrivateKeyRec;
#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))

#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
#define xnestWindow(pWin) (xnestWindowPriv((pWin))->window)

#define xnestWindowParent(pWin) \
((pWin)->parent ? \
xnestWindow((pWin)->parent) : \
xnestDefaultWindows[pWin->drawable.pScreen->myNum])
xnestDefaultWindows[(pWin)->drawable.pScreen->myNum])

#define xnestWindowSiblingAbove(pWin) \
((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : XCB_WINDOW_NONE)
Expand Down
6 changes: 3 additions & 3 deletions hw/xnest/xcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ do { \

#define XN_CI_GET_DEFAULT_INFO_2D(font,cs) \
do { \
unsigned int r = (font->font_reply->default_char >> 8); \
unsigned int c = (font->font_reply->default_char & 0xff); \
XN_CI_GET_CHAR_INFO_2D (font, r, c, NULL, cs); \
unsigned int r = ((font)->font_reply->default_char >> 8); \
unsigned int c = ((font)->font_reply->default_char & 0xff); \
XN_CI_GET_CHAR_INFO_2D ((font), r, c, NULL, (cs)); \
} while (0)

#define XN_CI_GET_ROWZERO_CHAR_INFO_2D(font,col,def,cs) \
Expand Down
Loading