summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-01-06 09:09:21 -0500
committerAdam Jackson <ajax@redhat.com>2016-04-18 11:23:10 -0400
commita1b13cda6169a98d694451fec75e63352e9d90bd (patch)
treedfb1939e189d78dad6f6946bf317b41e9f219363
parente89c7f1c2a0ea3480b21446e413073c1427285ae (diff)
xfree86: Remove xf86RegisterRootWindowProperty
All consumers have been ported to the root window callback, so this can all be nuked. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/xfree86/common/xf86.h7
-rw-r--r--hw/xfree86/common/xf86Globals.c1
-rw-r--r--hw/xfree86/common/xf86Helper.c75
-rw-r--r--hw/xfree86/common/xf86Init.c52
-rw-r--r--hw/xfree86/common/xf86Priv.h2
-rw-r--r--hw/xfree86/common/xf86Privstr.h10
6 files changed, 1 insertions, 146 deletions
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 38b901f37..adb56013a 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -61,10 +61,6 @@ extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
#define xf86ScreenKey (&xf86ScreenKeyRec)
-extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec;
-
-#define xf86CreateRootWindowKey (&xf86CreateRootWindowKeyRec)
-
extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
extern _X_EXPORT const unsigned char byte_reversed[256];
extern _X_EXPORT Bool fbSlotClaimed;
@@ -351,9 +347,6 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
extern _X_EXPORT Bool
xf86IsScreenPrimary(ScrnInfoPtr pScrn);
-extern _X_EXPORT int
-xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
- int format, unsigned long len, void *value);
extern _X_EXPORT Bool
xf86IsUnblank(int mode);
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 86bf15dc2..07cfabf89 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -201,5 +201,4 @@ Bool xf86AllowMouseOpenFail = FALSE;
Bool xf86VidModeDisabled = FALSE;
Bool xf86VidModeAllowNonLocal = FALSE;
#endif
-RootWinPropPtr *xf86RegisteredPropertiesTable = NULL;
Bool xorgHWAccess = FALSE;
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index e6dd4a61f..1d4b431af 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1817,81 +1817,6 @@ xf86IsScreenPrimary(ScrnInfoPtr pScrn)
return FALSE;
}
-int
-xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
- int format, unsigned long len, void *value)
-{
- RootWinPropPtr pNewProp = NULL, pRegProp;
- Bool existing = FALSE;
-
- DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n",
- ScrnIndex, (long)property, (long)type, format, len, value);
-
- if (ScrnIndex < 0 || ScrnIndex >= xf86NumScreens) {
- return BadMatch;
- }
-
- if (xf86RegisteredPropertiesTable &&
- xf86RegisteredPropertiesTable[ScrnIndex]) {
- for (pNewProp = xf86RegisteredPropertiesTable[ScrnIndex];
- pNewProp; pNewProp = pNewProp->next) {
- if (strcmp(pNewProp->name, NameForAtom(property)) == 0)
- break;
- }
- }
-
- if (!pNewProp) {
- if ((pNewProp = (RootWinPropPtr) malloc(sizeof(RootWinProp))) == NULL) {
- return BadAlloc;
- }
- /*
- * We will put this property at the end of the list so that
- * the changes are made in the order they were requested.
- */
- pNewProp->next = NULL;
- }
- else {
- free((void *) pNewProp->name);
- existing = TRUE;
- }
-
- pNewProp->name = xnfstrdup(NameForAtom(property));
- pNewProp->type = type;
- pNewProp->format = format;
- pNewProp->size = len;
- pNewProp->data = value;
-
- DebugF("new property filled\n");
-
- if (xf86RegisteredPropertiesTable == NULL) {
- DebugF("creating xf86RegisteredPropertiesTable[] size %d\n",
- xf86NumScreens);
- xf86RegisteredPropertiesTable =
- xnfcalloc(sizeof(RootWinProp), xf86NumScreens);
- }
-
- DebugF("xf86RegisteredPropertiesTable %p\n",
- (void *) xf86RegisteredPropertiesTable);
- DebugF("xf86RegisteredPropertiesTable[%d] %p\n",
- ScrnIndex, (void *) xf86RegisteredPropertiesTable[ScrnIndex]);
-
- if (!existing) {
- if (xf86RegisteredPropertiesTable[ScrnIndex] == NULL) {
- xf86RegisteredPropertiesTable[ScrnIndex] = pNewProp;
- }
- else {
- pRegProp = xf86RegisteredPropertiesTable[ScrnIndex];
- while (pRegProp->next != NULL) {
- DebugF("- next %p\n", (void *) pRegProp);
- pRegProp = pRegProp->next;
- }
- pRegProp->next = pNewProp;
- }
- }
- DebugF("xf86RegisterRootWindowProperty succeeded\n");
- return Success;
-}
-
Bool
xf86IsUnblank(int mode)
{
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 744af7c14..46976c1b4 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -297,50 +297,6 @@ xf86PrivsElevated(void)
return privsElevated;
}
-static Bool
-xf86CreateRootWindow(WindowPtr pWin)
-{
- int ret = TRUE;
- int err = Success;
- ScreenPtr pScreen = pWin->drawable.pScreen;
- RootWinPropPtr pProp;
- CreateWindowProcPtr create_window = (CreateWindowProcPtr)
- dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
-
- DebugF("xf86CreateRootWindow(%p)\n", pWin);
-
- /* Unhook this function ... */
- pScreen->CreateWindow = create_window;
- dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL);
-
- /* ... and call the previous CreateWindow fuction, if any */
- if (NULL != pScreen->CreateWindow) {
- ret = (*pScreen->CreateWindow) (pWin);
- }
-
- /* Now do our stuff */
- if (xf86RegisteredPropertiesTable != NULL) {
- if (pWin->parent == NULL && xf86RegisteredPropertiesTable != NULL) {
- for (pProp = xf86RegisteredPropertiesTable[pScreen->myNum];
- pProp != NULL && err == Success; pProp = pProp->next) {
- Atom prop;
-
- prop = MakeAtom(pProp->name, strlen(pProp->name), TRUE);
- err = dixChangeWindowProperty(serverClient, pWin,
- prop, pProp->type,
- pProp->format, PropModeReplace,
- pProp->size, pProp->data, FALSE);
- }
-
- /* Look at err */
- ret &= (err == Success);
-
- }
- }
-
- return ret;
-}
-
static void
InstallSignalHandlers(void)
{
@@ -815,8 +771,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
if (!xf86ColormapAllocatePrivates(xf86Screens[i]))
FatalError("Cannot register DDX private keys");
- if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0) ||
- !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0))
+ if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0))
FatalError("Cannot register DDX private keys");
for (i = 0; i < xf86NumGPUScreens; i++) {
@@ -887,11 +842,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
DebugF("xf86Screens[%d]->pScreen->CreateWindow = %p\n",
i, xf86Screens[i]->pScreen->CreateWindow);
- dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates,
- xf86CreateRootWindowKey,
- xf86Screens[i]->pScreen->CreateWindow);
- xf86Screens[i]->pScreen->CreateWindow = xf86CreateRootWindow;
-
if (PictureGetSubpixelOrder(xf86Screens[i]->pScreen) == SubPixelUnknown) {
xf86MonPtr DDC = (xf86MonPtr) (xf86Screens[i]->monitor->DDC);
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index ad3f2b9f9..81f7294a9 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -92,8 +92,6 @@ extern _X_EXPORT const char *xf86VisualNames[];
extern _X_EXPORT int xf86Verbose; /* verbosity level */
extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */
-extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
-
extern ScrnInfoPtr *xf86GPUScreens; /* List of pointers to ScrnInfoRecs */
extern int xf86NumGPUScreens;
#ifndef DEFAULT_VERBOSE
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 4830fb35b..ad86138cd 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -115,16 +115,6 @@ typedef struct {
} DPMSRec, *DPMSPtr;
#endif
-/* Information for root window properties. */
-typedef struct _RootWinProp {
- struct _RootWinProp *next;
- const char *name;
- Atom type;
- short format;
- long size;
- void *data;
-} RootWinProp, *RootWinPropPtr;
-
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
#define XLED1 ((unsigned long) 0x00000001)
#define XLED2 ((unsigned long) 0x00000002)