diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-02-01 15:29:12 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2008-02-01 15:29:12 -0500 |
commit | 716be2e5eceac137f3406c332940dc946f4f8673 (patch) | |
tree | ff81a4dcd71e80844ae189970b3c6b56b8b734e4 | |
parent | 9e0eb0615ca66512a8648cc600ec11bbcd499828 (diff) |
dix: Modify callers of property API to use new interface.
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 11 | ||||
-rw-r--r-- | hw/xprint/pcl/PclMisc.c | 17 | ||||
-rw-r--r-- | hw/xprint/pcl/PclWindow.c | 6 | ||||
-rw-r--r-- | hw/xprint/ps/PsMisc.c | 17 | ||||
-rw-r--r-- | hw/xprint/ps/PsWindow.c | 6 | ||||
-rw-r--r-- | hw/xquartz/applewm.c | 14 | ||||
-rw-r--r-- | hw/xquartz/quartzPasteboard.c | 16 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprFrame.c | 4 | ||||
-rwxr-xr-x | hw/xwin/winwin32rootless.c | 4 | ||||
-rw-r--r-- | miext/rootless/rootlessWindow.c | 4 | ||||
-rw-r--r-- | xkb/xkbInit.c | 4 |
11 files changed, 45 insertions, 58 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index d12b6bd6a..0196b7502 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -173,12 +173,11 @@ xf86CreateRootWindow(WindowPtr pWin) Atom prop; prop = MakeAtom(pProp->name, strlen(pProp->name), TRUE); - err = ChangeWindowProperty(pWin, - prop, pProp->type, - pProp->format, PropModeReplace, - pProp->size, pProp->data, - FALSE - ); + err = dixChangeWindowProperty(serverClient, pWin, + prop, pProp->type, + pProp->format, PropModeReplace, + pProp->size, pProp->data, + FALSE); } /* Look at err */ diff --git a/hw/xprint/pcl/PclMisc.c b/hw/xprint/pcl/PclMisc.c index e0b7dced9..0b37836e9 100644 --- a/hw/xprint/pcl/PclMisc.c +++ b/hw/xprint/pcl/PclMisc.c @@ -115,7 +115,7 @@ GetPropString( if(atom != BAD_RESOURCE) { WindowPtr pPropWin; - int n; + int rc, n; /* * The atom has been defined, but it might only exist as a @@ -124,15 +124,12 @@ GetPropString( for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; pPropWin = pPropWin->parent) { - for(pProp = (PropertyPtr)(wUserProps(pPropWin)); - pProp != (PropertyPtr)NULL; - pProp = pProp->next) - { - if (pProp->propertyName == atom) - break; - } - if(pProp != (PropertyPtr)NULL) - break; + rc = dixLookupProperty(&pProp, pPropWin, atom, + serverClient, DixReadAccess); + if (rc == Success) + break; + else + pProp = NULL; } if(pProp == (PropertyPtr)NULL) return (char *)NULL; diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c index a87dc0e7a..950933e49 100644 --- a/hw/xprint/pcl/PclWindow.c +++ b/hw/xprint/pcl/PclWindow.c @@ -128,9 +128,9 @@ PclCreateWindow( { propName = MakeAtom(propStrings[i], strlen(propStrings[i]), TRUE); - ChangeWindowProperty(pWin, propName, XA_STRING, 8, - PropModeReplace, strlen(propVal), - (pointer)propVal, FALSE); + dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING, + 8, PropModeReplace, strlen(propVal), + (pointer)propVal, FALSE); xfree(propVal); } } diff --git a/hw/xprint/ps/PsMisc.c b/hw/xprint/ps/PsMisc.c index 0df039e0b..8d5005f91 100644 --- a/hw/xprint/ps/PsMisc.c +++ b/hw/xprint/ps/PsMisc.c @@ -175,7 +175,7 @@ GetPropString( if(atom != BAD_RESOURCE) { WindowPtr pPropWin; - int n; + int rc, n; */ /* @@ -186,15 +186,12 @@ GetPropString( for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; pPropWin = pPropWin->parent) { - for(pProp = (PropertyPtr)(wUserProps(pPropWin)); - pProp != (PropertyPtr)NULL; - pProp = pProp->next) - { - if (pProp->propertyName == atom) - break; - } - if(pProp != (PropertyPtr)NULL) - break; + rc = dixLookupProperty(&pProp, pPropWin, atom, + serverClient, DixReadAccess); + if (rc == Success) + break; + else + pProp = NULL; } if(pProp == (PropertyPtr)NULL) return (char *)NULL; diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c index d17cf8ce0..8bfde4b0d 100644 --- a/hw/xprint/ps/PsWindow.c +++ b/hw/xprint/ps/PsWindow.c @@ -154,9 +154,9 @@ PsCreateWindow(WindowPtr pWin) { propName = MakeAtom(propStrings[i], strlen(propStrings[i]), TRUE); - ChangeWindowProperty(pWin, propName, XA_STRING, 8, - PropModeReplace, strlen(propVal), - (pointer)propVal, FALSE); + dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING, + 8, PropModeReplace, strlen(propVal), + (pointer)propVal, FALSE); xfree(propVal); } } diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index c460ec6ae..072e57ff4 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -154,8 +154,8 @@ AppleWMSetScreenOrigin( data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY); - ChangeWindowProperty(pWin, xa_native_screen_origin(), XA_INTEGER, - 32, PropModeReplace, 2, data, TRUE); + dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(), + XA_INTEGER, 32, PropModeReplace, 2, data, TRUE); } /* Window managers can set the _APPLE_NO_ORDER_IN property on windows @@ -169,15 +169,11 @@ AppleWMDoReorderWindow( { Atom atom; PropertyPtr prop; + int rc; atom = xa_apple_no_order_in(); - for (prop = wUserProps(pWin); prop != NULL; prop = prop->next) - { - if (prop->propertyName == atom && prop->type == atom) - return FALSE; - } - - return TRUE; + rc = dixLookupProperty(&prop, pWin, atom, serverClient, DixReadAccess); + return (rc == Success) && (prop->type == atom); } diff --git a/hw/xquartz/quartzPasteboard.c b/hw/xquartz/quartzPasteboard.c index 0cecff54a..837e44824 100644 --- a/hw/xquartz/quartzPasteboard.c +++ b/hw/xquartz/quartzPasteboard.c @@ -54,18 +54,16 @@ extern int NumCurrentSelections; // Returns NULL if there is no cut text or there is not enough memory. static char * QuartzReadCutBuffer(void) { - int i; + int rc, i; char *text = NULL; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; PropertyPtr pProp; - pProp = wUserProps (WindowTable[pScreen->myNum]); - while (pProp && pProp->propertyName != XA_CUT_BUFFER0) { - pProp = pProp->next; - } - if (! pProp) continue; + rc = dixLookupProperty(&pProp, WindowTable[pScreen->myNum], + XA_CUT_BUFFER0, serverClient, DixReadAccess); + if (rc != Success) continue; if (pProp->type != XA_STRING) continue; if (pProp->format != 8) continue; @@ -114,9 +112,9 @@ void QuartzReadPasteboard(void) ScreenPtr pScreen = screenInfo.screens[scrn]; // Set the cut buffers on each screen // fixme really on each screen? - ChangeWindowProperty(WindowTable[pScreen->myNum], XA_CUT_BUFFER0, - XA_STRING, 8, PropModeReplace, - strlen(text), (pointer)text, TRUE); + dixChangeWindowProperty(serverClient, WindowTable[pScreen->myNum], + XA_CUT_BUFFER0, XA_STRING, 8, PropModeReplace, + strlen(text), (pointer)text, TRUE); } // Undo any current X selection (similar to code in dispatch.c) diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c index b9a33de90..864ef0d40 100644 --- a/hw/xquartz/xpr/xprFrame.c +++ b/hw/xquartz/xpr/xprFrame.c @@ -90,8 +90,8 @@ xprSetNativeProperty(RootlessWindowPtr pFrame) /* FIXME: move this to AppleWM extension */ data = native_id; - ChangeWindowProperty(pFrame->win, xa_native_window_id(), - XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE); + dixChangeWindowProperty(serverClient, pFrame->win, xa_native_window_id(), + XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE); } } diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 4b4cd3ded..6f4e2c97e 100755 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -1087,6 +1087,6 @@ winMWExtWMSetNativeProperty (RootlessWindowPtr pFrame) /* FIXME: move this to WindowsWM extension */ lData = (long) pRLWinPriv->hWnd; - ChangeWindowProperty (pFrame->win, AtmWindowsWmNativeHwnd (), - XA_INTEGER, 32, PropModeReplace, 1, &lData, TRUE); + dixChangeWindowProperty(serverClient, pFrame->win, AtmWindowsWmNativeHwnd(), + XA_INTEGER, 32, PropModeReplace, 1, &lData, TRUE); } diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 7285f959d..0dad44a99 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -181,8 +181,8 @@ set_screen_origin (WindowPtr pWin) data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY); - ChangeWindowProperty (pWin, xa_native_screen_origin (), XA_INTEGER, - 32, PropModeReplace, 2, data, TRUE); + dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(), + XA_INTEGER, 32, PropModeReplace, 2, data, TRUE); } /* diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 6301a32e7..090815427 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -221,8 +221,8 @@ char * pval; ErrorF("Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n", out,len); } - ChangeWindowProperty(WindowTable[0],name,XA_STRING,8,PropModeReplace, - len,pval,True); + dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8, + PropModeReplace, len, pval, True); xfree(pval); return True; } |