dbe: formatting cleanup

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-09-22 15:48:58 +02:00
committed by Enrico Weigelt
parent 8fb8ce515e
commit 7b37b0c28b
3 changed files with 23 additions and 48 deletions

View File

@@ -30,8 +30,6 @@
*
*****************************************************************************/
/* INCLUDES */
#include <dix-config.h>
#include <string.h>
@@ -90,9 +88,8 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens)
pDbeScreenPriv->WinPrivDelete = NULL;
(*nStubbedScreens)++;
}
} /* DbeStubScreen() */
/******************************************************************************
*
* DBE DIX Procedure: ProcDbeGetVersion
@@ -239,17 +236,14 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
/* Actually connect the window priv to the window. */
dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv);
} /* if -- There is no buffer associated with the window. */
else {
int i=0;
} else {
/* A buffer is already associated with the window.
* Add the new buffer ID to the array, reallocating the array memory
* if necessary.
*/
/* Determine if there is a free element in the ID array. */
int i=0;
for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) {
if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) {
/* There is still room in the ID array. */
@@ -296,8 +290,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
}
add_index = i;
} /* else -- A buffer is already associated with the window. */
}
/* Call the DDX routine to allocate the back buffer. */
status = (*pDbeScreenPriv->AllocBackBufferName) (pWin, stuff->buffer,
@@ -337,8 +330,8 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
free(pDbeWindowPriv);
return status;
} /* ProcDbeAllocateBackBufferName() */
}
/******************************************************************************
*
* DBE DIX Procedure: ProcDbeDeallocateBackBufferName
@@ -402,9 +395,8 @@ ProcDbeDeallocateBackBufferName(ClientPtr client)
FreeResource(stuff->buffer, X11_RESTYPE_NONE);
return Success;
}
} /* ProcDbeDeallocateBackBufferName() */
/******************************************************************************
*
* DBE DIX Procedure: ProcDbeSwapBuffers
@@ -542,9 +534,8 @@ ProcDbeSwapBuffers(ClientPtr client)
free(swapInfo);
return Success;
}
} /* ProcDbeSwapBuffers() */
/******************************************************************************
*
* DBE DIX Procedure: ProcDbeGetVisualInfo
@@ -662,9 +653,8 @@ clearRpcBuf:
free(pDrawables);
return rc;
}
} /* ProcDbeGetVisualInfo() */
/******************************************************************************
*
* DBE DIX Procedure: ProcDbeGetbackBufferAttributes
@@ -755,8 +745,7 @@ ProcDbeDispatch(ClientPtr client)
default:
return BadRequest;
}
} /* ProcDbeDispatch() */
}
/******************************************************************************
*
@@ -818,8 +807,8 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
}
return ChangeGC(NULL, pGC, gcmask, gcvalues) == 0;
} /* DbeSetupBackgroundPainter() */
}
/******************************************************************************
*
* DBE DIX Procedure: DbeDrawableDelete
@@ -841,8 +830,8 @@ DbeDrawableDelete(void *pDrawable, XID id)
{
return Success;
} /* DbeDrawableDelete() */
}
/******************************************************************************
*
* DBE DIX Procedure: DbeWindowPrivDelete
@@ -937,8 +926,7 @@ DbeWindowPrivDelete(void *pDbeWinPriv, XID id)
}
return Success;
} /* DbeWindowPrivDelete() */
}
static void miDbeWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWin);
@@ -1111,5 +1099,4 @@ DbeExtensionInit(void)
SetResourceTypeErrorValue(dbeWindowPrivResType,
dbeErrorBase + DbeBadBuffer);
SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer);
} /* DbeExtensionInit() */
}

View File

@@ -30,8 +30,6 @@
*
*****************************************************************************/
/* INCLUDES */
#include <dix-config.h>
#include <X11/X.h>
@@ -54,7 +52,6 @@
#include <stdio.h>
/******************************************************************************
*
* DBE MI Procedure: miDbeGetVisualInfo
@@ -114,9 +111,8 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo)
pScrVisInfo->visinfo = visInfo;
return TRUE; /* success */
}
} /* miDbeGetVisualInfo() */
/******************************************************************************
*
* DBE MI Procedure: miAllocBackBufferName
@@ -207,9 +203,8 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
}
return Success;
}
} /* miDbeAllocBackBufferName() */
/******************************************************************************
*
* DBE MI Procedure: miDbeAliasBuffers
@@ -230,9 +225,8 @@ miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv)
ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType,
(void *) pDbeWindowPriv->pBackBuffer);
}
}
} /* miDbeAliasBuffers() */
/******************************************************************************
*
* DBE MI Procedure: miDbeSwapBuffers
@@ -361,9 +355,8 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
FreeScratchGC(pGC);
return Success;
}
} /* miSwapBuffers() */
/******************************************************************************
*
* DBE MI Procedure: miDbeWinPrivDelete
@@ -430,7 +423,7 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
if (pDbeWindowPriv->pBackBuffer)
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
} /* miDbeWinPrivDelete() */
}
/******************************************************************************
*
@@ -557,9 +550,7 @@ void miDbeWindowPosition(CallbackListPtr *pcbl, ScreenPtr pScreen, XorgScreenWin
FreeScratchGC(pGC);
return;
}
else {
} else {
/* Clear out the new DBE buffer pixmaps. */
/* I suppose this could avoid quite a bit of work if
@@ -630,5 +621,4 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
return TRUE;
} /* miDbeInit() */
}

View File

@@ -36,8 +36,6 @@
#include "dix/screen_hooks_priv.h"
#include "include/privates.h"
/* EXTERNS */
extern Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv);
extern DevPrivateKeyRec dbeScreenPrivKeyRec;