xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Sep 1 00:52:10 UTC 2024
hw/xnest/Args.c | 40 ++++++++++++++++++++--------------------
hw/xnest/Color.c | 20 ++++++++++----------
hw/xnest/Cursor.c | 4 ++--
hw/xnest/Display.c | 2 +-
hw/xnest/Font.c | 12 ++++++------
hw/xnest/GC.c | 2 +-
hw/xnest/GCOps.c | 8 ++++----
hw/xnest/Init.c | 4 ++--
hw/xnest/Keyboard.c | 2 +-
hw/xnest/Pointer.c | 2 +-
hw/xnest/Screen.c | 10 +++++-----
hw/xnest/Window.c | 26 +++++++++++++-------------
12 files changed, 66 insertions(+), 66 deletions(-)
New commits:
commit 12f71ede8a29fb732da09b573583460ba095d031
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Aug 21 16:53:50 2024 +0200
Xnest: use Xorg's TRUE/FALSE instead of Xlib's True/False
Use Xserver's defines instead of Xlib's ones. The values are the same.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1657>
diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c
index adea553d6..ebf728c9c 100644
--- a/hw/xnest/Args.c
+++ b/hw/xnest/Args.c
@@ -34,23 +34,23 @@ is" without express or implied warranty.
#include "Args.h"
char *xnestDisplayName = NULL;
-Bool xnestSynchronize = False;
-Bool xnestFullGeneration = False;
+Bool xnestSynchronize = FALSE;
+Bool xnestFullGeneration = FALSE;
int xnestDefaultClass;
-Bool xnestUserDefaultClass = False;
+Bool xnestUserDefaultClass = FALSE;
int xnestDefaultDepth;
-Bool xnestUserDefaultDepth = False;
-Bool xnestSoftwareScreenSaver = False;
+Bool xnestUserDefaultDepth = FALSE;
+Bool xnestSoftwareScreenSaver = FALSE;
int xnestX;
int xnestY;
unsigned int xnestWidth;
unsigned int xnestHeight;
int xnestUserGeometry = 0;
int xnestBorderWidth;
-Bool xnestUserBorderWidth = False;
+Bool xnestUserBorderWidth = FALSE;
char *xnestWindowName = NULL;
int xnestNumScreens = 0;
-Bool xnestDoDirectColormaps = False;
+Bool xnestDoDirectColormaps = FALSE;
Window xnestParentWindow = 0;
int
@@ -64,43 +64,43 @@ ddxProcessArgument(int argc, char *argv[], int i)
return 0;
}
if (!strcmp(argv[i], "-sync")) {
- xnestSynchronize = True;
+ xnestSynchronize = TRUE;
return 1;
}
if (!strcmp(argv[i], "-full")) {
- xnestFullGeneration = True;
+ xnestFullGeneration = TRUE;
return 1;
}
if (!strcmp(argv[i], "-class")) {
if (++i < argc) {
if (!strcmp(argv[i], "StaticGray")) {
xnestDefaultClass = StaticGray;
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
return 2;
}
else if (!strcmp(argv[i], "GrayScale")) {
xnestDefaultClass = GrayScale;
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
return 2;
}
else if (!strcmp(argv[i], "StaticColor")) {
xnestDefaultClass = StaticColor;
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
return 2;
}
else if (!strcmp(argv[i], "PseudoColor")) {
xnestDefaultClass = PseudoColor;
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
return 2;
}
else if (!strcmp(argv[i], "TrueColor")) {
xnestDefaultClass = TrueColor;
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
return 2;
}
else if (!strcmp(argv[i], "DirectColor")) {
xnestDefaultClass = DirectColor;
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
return 2;
}
}
@@ -109,7 +109,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-cc")) {
if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultClass) == 1) {
if (xnestDefaultClass >= 0 && xnestDefaultClass <= 5) {
- xnestUserDefaultClass = True;
+ xnestUserDefaultClass = TRUE;
/* lex the OS layer process it as well, so return 0 */
}
}
@@ -118,14 +118,14 @@ ddxProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-depth")) {
if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultDepth) == 1) {
if (xnestDefaultDepth > 0) {
- xnestUserDefaultDepth = True;
+ xnestUserDefaultDepth = TRUE;
return 2;
}
}
return 0;
}
if (!strcmp(argv[i], "-sss")) {
- xnestSoftwareScreenSaver = True;
+ xnestSoftwareScreenSaver = TRUE;
return 1;
}
if (!strcmp(argv[i], "-geometry")) {
@@ -141,7 +141,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-bw")) {
if (++i < argc && sscanf(argv[i], "%i", &xnestBorderWidth) == 1) {
if (xnestBorderWidth >= 0) {
- xnestUserBorderWidth = True;
+ xnestUserBorderWidth = TRUE;
return 2;
}
}
@@ -167,7 +167,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
return 0;
}
if (!strcmp(argv[i], "-install")) {
- xnestDoDirectColormaps = True;
+ xnestDoDirectColormaps = TRUE;
return 1;
}
if (!strcmp(argv[i], "-parent")) {
diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c
index bb829847e..06b384539 100644
--- a/hw/xnest/Color.c
+++ b/hw/xnest/Color.c
@@ -126,7 +126,7 @@ xnestCreateColormap(ColormapPtr pCmap)
break;
}
- return True;
+ return TRUE;
}
void
@@ -175,19 +175,19 @@ static Bool
xnestSameInstalledColormapWindows(Window *windows, int numWindows)
{
if (xnestNumOldInstalledColormapWindows != numWindows)
- return False;
+ return FALSE;
if (xnestOldInstalledColormapWindows == windows)
- return True;
+ return TRUE;
if (xnestOldInstalledColormapWindows == NULL || windows == NULL)
- return False;
+ return FALSE;
if (memcmp(xnestOldInstalledColormapWindows, windows,
numWindows * sizeof(Window)))
- return False;
+ return FALSE;
- return True;
+ return TRUE;
}
void
@@ -372,7 +372,7 @@ xnestUninstallColormap(ColormapPtr pCmap)
}
}
-static Bool xnestInstalledDefaultColormap = False;
+static Bool xnestInstalledDefaultColormap = FALSE;
int
xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs)
@@ -474,7 +474,7 @@ xnestCreateDefaultColormap(ScreenPtr pScreen)
(pVisual->class & DynamicClass) ? AllocNone : AllocAll,
0)
!= Success)
- return False;
+ return FALSE;
wp = pScreen->whitePixel;
bp = pScreen->blackPixel;
@@ -486,7 +486,7 @@ xnestCreateDefaultColormap(ScreenPtr pScreen)
pScreen->blackPixel = bp;
(*pScreen->InstallColormap) (pCmap);
- xnestInstalledDefaultColormap = True;
+ xnestInstalledDefaultColormap = TRUE;
- return True;
+ return TRUE;
}
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index 22999bfaa..9ff143a4f 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -107,7 +107,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
XFreePixmap(xnestDisplay, source);
XFreePixmap(xnestDisplay, mask);
- return True;
+ return TRUE;
}
Bool
@@ -115,7 +115,7 @@ xnestUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
{
XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen));
free(xnestGetCursorPriv(pCursor, pScreen));
- return True;
+ return TRUE;
}
void
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c
index 0735de772..daf1cf068 100644
--- a/hw/xnest/Display.c
+++ b/hw/xnest/Display.c
@@ -86,7 +86,7 @@ xnestOpenDisplay(int argc, char *argv[])
XDisplayName(xnestDisplayName));
if (xnestSynchronize)
- XSynchronize(xnestDisplay, True);
+ XSynchronize(xnestDisplay, TRUE);
mask = VisualScreenMask;
vi.screen = DefaultScreen(xnestDisplay);
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index 4a8f7d328..511ab687b 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -47,7 +47,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
xfont2_font_set_private(pFont, xnestFontPrivateIndex, NULL);
- name_atom = MakeAtom("FONT", 4, True);
+ name_atom = MakeAtom("FONT", 4, TRUE);
value_atom = 0L;
nprops = pFont->info.nprops;
@@ -60,12 +60,12 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
}
if (!value_atom)
- return False;
+ return FALSE;
name = NameForAtom(value_atom);
if (!name)
- return False;
+ return FALSE;
priv = (void *) malloc(sizeof(xnestPrivFont));
xfont2_font_set_private(pFont, xnestFontPrivateIndex, priv);
@@ -73,9 +73,9 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
xnestFontPriv(pFont)->font_struct = XLoadQueryFont(xnestDisplay, name);
if (!xnestFontStruct(pFont))
- return False;
+ return FALSE;
- return True;
+ return TRUE;
}
Bool
@@ -87,5 +87,5 @@ xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont)
free(xnestFontPriv(pFont));
xfont2_font_set_private(pFont, xnestFontPrivateIndex, NULL);
}
- return True;
+ return TRUE;
}
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index df12aee7d..054adb9ec 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -84,7 +84,7 @@ xnestCreateGC(GCPtr pGC)
xnestDefaultDrawables[pGC->depth],
0L, NULL);
- return True;
+ return TRUE;
}
void
diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c
index 9c35d7410..47c5f9010 100644
--- a/hw/xnest/GCOps.c
+++ b/hw/xnest/GCOps.c
@@ -100,7 +100,7 @@ static int
xnestIgnoreErrorHandler (Display *dpy,
XErrorEvent *event)
{
- return False; /* return value is ignored */
+ return FALSE; /* return value is ignored */
}
void
@@ -112,7 +112,7 @@ xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
int (*old_handler)(Display*, XErrorEvent*);
/* we may get BadMatch error when xnest window is minimized */
- XSync(xnestDisplay, False);
+ XSync(xnestDisplay, FALSE);
old_handler = XSetErrorHandler (xnestIgnoreErrorHandler);
ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable),
@@ -150,13 +150,13 @@ xnestBitBlitHelper(GCPtr pGC)
if (!pReg || !pTmpReg)
return NullRegion;
- pending = True;
+ pending = TRUE;
while (pending) {
XIfEvent(xnestDisplay, &event, xnestBitBlitPredicate, NULL);
switch (event.type) {
case NoExpose:
- pending = False;
+ pending = FALSE;
break;
case GraphicsExpose:
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index cd555edbb..529a4ee5a 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -51,7 +51,7 @@ is" without express or implied warranty.
#include "dpmsproc.h"
#endif
-Bool xnestDoFullGeneration = True;
+Bool xnestDoFullGeneration = TRUE;
#ifdef GLXEXT
void
@@ -135,7 +135,7 @@ CloseInput(void)
void
ddxGiveUp(enum ExitCode error)
{
- xnestDoFullGeneration = True;
+ xnestDoFullGeneration = TRUE;
xnestCloseDisplay();
}
diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c
index 4d7388baa..e1c42284f 100644
--- a/hw/xnest/Keyboard.c
+++ b/hw/xnest/Keyboard.c
@@ -190,7 +190,7 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
modmap, serverClient);
XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
- XkbFreeKeyboard(xkb, 0, False);
+ XkbFreeKeyboard(xkb, 0, FALSE);
free(keymap);
break;
case DEVICE_ON:
diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c
index a2ee90064..dc45e2dad 100644
--- a/hw/xnest/Pointer.c
+++ b/hw/xnest/Pointer.c
@@ -41,7 +41,7 @@ DeviceIntPtr xnestPointerDevice = NULL;
void
xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl)
{
- XChangePointerControl(xnestDisplay, True, True,
+ XChangePointerControl(xnestDisplay, TRUE, TRUE,
ctrl->num, ctrl->den, ctrl->threshold);
}
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 6eb767233..61210602b 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -78,7 +78,7 @@ static Bool
xnestSaveScreen(ScreenPtr pScreen, int what)
{
if (xnestSoftwareScreenSaver)
- return False;
+ return FALSE;
else {
switch (what) {
case SCREEN_SAVER_ON:
@@ -102,7 +102,7 @@ xnestSaveScreen(ScreenPtr pScreen, int what)
xnestSetInstalledColormapWindows(pScreen);
break;
}
- return True;
+ return TRUE;
}
}
@@ -406,9 +406,9 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
}
if (!xnestCreateDefaultColormap(pScreen))
- return False;
+ return FALSE;
- return True;
+ return TRUE;
}
Bool
@@ -427,5 +427,5 @@ xnestCloseScreen(ScreenPtr pScreen)
the display connection. There is no need to generate extra protocol.
*/
- return True;
+ return TRUE;
}
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index 932db760c..479a9eab3 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -145,7 +145,7 @@ xnestCreateWindow(WindowPtr pWin)
if (!pWin->parent) /* only the root window will have the right colormap */
xnestSetInstalledColormapWindows(pWin->drawable.pScreen);
- return True;
+ return TRUE;
}
Bool
@@ -162,7 +162,7 @@ xnestDestroyWindow(WindowPtr pWin)
if (pWin->optional && pWin->optional->colormap && pWin->parent)
xnestSetInstalledColormapWindows(pWin->drawable.pScreen);
- return True;
+ return TRUE;
}
Bool
@@ -172,7 +172,7 @@ xnestPositionWindow(WindowPtr pWin, int x, int y)
CWParent |
CWX | CWY | CWWidth | CWHeight | CWBorderWidth);
- return True;
+ return TRUE;
}
void
@@ -348,7 +348,7 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
XChangeWindowAttributes(xnestDisplay, xnestWindow(pWin),
mask, &attributes);
- return True;
+ return TRUE;
}
Bool
@@ -358,7 +358,7 @@ xnestRealizeWindow(WindowPtr pWin)
xnestShapeWindow(pWin);
XMapWindow(xnestDisplay, xnestWindow(pWin));
- return True;
+ return TRUE;
}
Bool
@@ -366,7 +366,7 @@ xnestUnrealizeWindow(WindowPtr pWin)
{
XUnmapWindow(xnestDisplay, xnestWindow(pWin));
- return True;
+ return TRUE;
}
void
@@ -394,7 +394,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn)
Window window;
BoxRec Box;
- XSync(xnestDisplay, False);
+ XSync(xnestDisplay, FALSE);
window = xnestWindow(pWin);
@@ -429,10 +429,10 @@ xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
unsigned int n1, n2;
if (pReg1 == pReg2)
- return True;
+ return TRUE;
if (pReg1 == NullRegion || pReg2 == NullRegion)
- return False;
+ return FALSE;
pBox1 = RegionRects(pReg1);
n1 = RegionNumRects(pReg1);
@@ -441,15 +441,15 @@ xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
n2 = RegionNumRects(pReg2);
if (n1 != n2)
- return False;
+ return FALSE;
if (pBox1 == pBox2)
- return True;
+ return TRUE;
if (memcmp(pBox1, pBox2, n1 * sizeof(BoxRec)))
- return False;
+ return FALSE;
- return True;
+ return TRUE;
}
void
More information about the xorg-commit
mailing list