mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dbe: formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
8fb8ce515e
commit
7b37b0c28b
45
dbe/dbe.c
45
dbe/dbe.c
@@ -30,8 +30,6 @@
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/* INCLUDES */
|
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -90,9 +88,8 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens)
|
|||||||
pDbeScreenPriv->WinPrivDelete = NULL;
|
pDbeScreenPriv->WinPrivDelete = NULL;
|
||||||
|
|
||||||
(*nStubbedScreens)++;
|
(*nStubbedScreens)++;
|
||||||
|
}
|
||||||
|
|
||||||
} /* DbeStubScreen() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: ProcDbeGetVersion
|
* DBE DIX Procedure: ProcDbeGetVersion
|
||||||
@@ -239,17 +236,14 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
|
|||||||
|
|
||||||
/* Actually connect the window priv to the window. */
|
/* Actually connect the window priv to the window. */
|
||||||
dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv);
|
dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv);
|
||||||
|
} else {
|
||||||
} /* if -- There is no buffer associated with the window. */
|
|
||||||
|
|
||||||
else {
|
|
||||||
int i=0;
|
|
||||||
/* A buffer is already associated with the window.
|
/* A buffer is already associated with the window.
|
||||||
* Add the new buffer ID to the array, reallocating the array memory
|
* Add the new buffer ID to the array, reallocating the array memory
|
||||||
* if necessary.
|
* if necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Determine if there is a free element in the ID array. */
|
/* Determine if there is a free element in the ID array. */
|
||||||
|
int i=0;
|
||||||
for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) {
|
for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) {
|
||||||
if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) {
|
if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) {
|
||||||
/* There is still room in the ID array. */
|
/* There is still room in the ID array. */
|
||||||
@@ -296,8 +290,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_index = i;
|
add_index = i;
|
||||||
|
}
|
||||||
} /* else -- A buffer is already associated with the window. */
|
|
||||||
|
|
||||||
/* Call the DDX routine to allocate the back buffer. */
|
/* Call the DDX routine to allocate the back buffer. */
|
||||||
status = (*pDbeScreenPriv->AllocBackBufferName) (pWin, stuff->buffer,
|
status = (*pDbeScreenPriv->AllocBackBufferName) (pWin, stuff->buffer,
|
||||||
@@ -337,8 +330,8 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
|
|||||||
free(pDbeWindowPriv);
|
free(pDbeWindowPriv);
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
} /* ProcDbeAllocateBackBufferName() */
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: ProcDbeDeallocateBackBufferName
|
* DBE DIX Procedure: ProcDbeDeallocateBackBufferName
|
||||||
@@ -402,9 +395,8 @@ ProcDbeDeallocateBackBufferName(ClientPtr client)
|
|||||||
FreeResource(stuff->buffer, X11_RESTYPE_NONE);
|
FreeResource(stuff->buffer, X11_RESTYPE_NONE);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
}
|
||||||
|
|
||||||
} /* ProcDbeDeallocateBackBufferName() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: ProcDbeSwapBuffers
|
* DBE DIX Procedure: ProcDbeSwapBuffers
|
||||||
@@ -542,9 +534,8 @@ ProcDbeSwapBuffers(ClientPtr client)
|
|||||||
|
|
||||||
free(swapInfo);
|
free(swapInfo);
|
||||||
return Success;
|
return Success;
|
||||||
|
}
|
||||||
|
|
||||||
} /* ProcDbeSwapBuffers() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: ProcDbeGetVisualInfo
|
* DBE DIX Procedure: ProcDbeGetVisualInfo
|
||||||
@@ -662,9 +653,8 @@ clearRpcBuf:
|
|||||||
free(pDrawables);
|
free(pDrawables);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
} /* ProcDbeGetVisualInfo() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: ProcDbeGetbackBufferAttributes
|
* DBE DIX Procedure: ProcDbeGetbackBufferAttributes
|
||||||
@@ -755,8 +745,7 @@ ProcDbeDispatch(ClientPtr client)
|
|||||||
default:
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} /* ProcDbeDispatch() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
@@ -818,8 +807,8 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ChangeGC(NULL, pGC, gcmask, gcvalues) == 0;
|
return ChangeGC(NULL, pGC, gcmask, gcvalues) == 0;
|
||||||
} /* DbeSetupBackgroundPainter() */
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: DbeDrawableDelete
|
* DBE DIX Procedure: DbeDrawableDelete
|
||||||
@@ -841,8 +830,8 @@ DbeDrawableDelete(void *pDrawable, XID id)
|
|||||||
{
|
{
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
} /* DbeDrawableDelete() */
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: DbeWindowPrivDelete
|
* DBE DIX Procedure: DbeWindowPrivDelete
|
||||||
@@ -937,8 +926,7 @@ DbeWindowPrivDelete(void *pDbeWinPriv, XID id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
}
|
||||||
} /* DbeWindowPrivDelete() */
|
|
||||||
|
|
||||||
static void miDbeWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWin);
|
static void miDbeWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWin);
|
||||||
|
|
||||||
@@ -1111,5 +1099,4 @@ DbeExtensionInit(void)
|
|||||||
SetResourceTypeErrorValue(dbeWindowPrivResType,
|
SetResourceTypeErrorValue(dbeWindowPrivResType,
|
||||||
dbeErrorBase + DbeBadBuffer);
|
dbeErrorBase + DbeBadBuffer);
|
||||||
SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer);
|
SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer);
|
||||||
|
}
|
||||||
} /* DbeExtensionInit() */
|
|
||||||
|
|||||||
24
dbe/midbe.c
24
dbe/midbe.c
@@ -30,8 +30,6 @@
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/* INCLUDES */
|
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
@@ -54,7 +52,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miDbeGetVisualInfo
|
* DBE MI Procedure: miDbeGetVisualInfo
|
||||||
@@ -114,9 +111,8 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo)
|
|||||||
pScrVisInfo->visinfo = visInfo;
|
pScrVisInfo->visinfo = visInfo;
|
||||||
|
|
||||||
return TRUE; /* success */
|
return TRUE; /* success */
|
||||||
|
}
|
||||||
|
|
||||||
} /* miDbeGetVisualInfo() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miAllocBackBufferName
|
* DBE MI Procedure: miAllocBackBufferName
|
||||||
@@ -207,9 +203,8 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
}
|
||||||
|
|
||||||
} /* miDbeAllocBackBufferName() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miDbeAliasBuffers
|
* DBE MI Procedure: miDbeAliasBuffers
|
||||||
@@ -230,9 +225,8 @@ miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv)
|
|||||||
ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType,
|
ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType,
|
||||||
(void *) pDbeWindowPriv->pBackBuffer);
|
(void *) pDbeWindowPriv->pBackBuffer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} /* miDbeAliasBuffers() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miDbeSwapBuffers
|
* DBE MI Procedure: miDbeSwapBuffers
|
||||||
@@ -361,9 +355,8 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
|
|||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
}
|
||||||
|
|
||||||
} /* miSwapBuffers() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miDbeWinPrivDelete
|
* DBE MI Procedure: miDbeWinPrivDelete
|
||||||
@@ -430,7 +423,7 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
|
|||||||
|
|
||||||
if (pDbeWindowPriv->pBackBuffer)
|
if (pDbeWindowPriv->pBackBuffer)
|
||||||
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
|
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
|
||||||
} /* miDbeWinPrivDelete() */
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
@@ -557,9 +550,7 @@ void miDbeWindowPosition(CallbackListPtr *pcbl, ScreenPtr pScreen, XorgScreenWin
|
|||||||
|
|
||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
return;
|
return;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else {
|
|
||||||
/* Clear out the new DBE buffer pixmaps. */
|
/* Clear out the new DBE buffer pixmaps. */
|
||||||
|
|
||||||
/* I suppose this could avoid quite a bit of work if
|
/* I suppose this could avoid quite a bit of work if
|
||||||
@@ -630,5 +621,4 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
|
|||||||
pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
|
pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
} /* miDbeInit() */
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
#include "dix/screen_hooks_priv.h"
|
#include "dix/screen_hooks_priv.h"
|
||||||
#include "include/privates.h"
|
#include "include/privates.h"
|
||||||
|
|
||||||
/* EXTERNS */
|
|
||||||
|
|
||||||
extern Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv);
|
extern Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv);
|
||||||
|
|
||||||
extern DevPrivateKeyRec dbeScreenPrivKeyRec;
|
extern DevPrivateKeyRec dbeScreenPrivKeyRec;
|
||||||
|
|||||||
Reference in New Issue
Block a user