From 895f40792a14d8b88923bf3b428d31ae3bb31e46 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 2 Dec 2009 17:43:01 -0800 Subject: Add type name argument to CreateNewResourceType Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- xfixes/cursor.c | 16 ++++++---------- xfixes/region.c | 6 +----- xfixes/select.c | 12 ++++-------- 3 files changed, 11 insertions(+), 23 deletions(-) (limited to 'xfixes') diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 0ef3e3aa4..1471a58d1 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -53,7 +53,6 @@ #include "inputstr.h" #include "windowstr.h" #include "xace.h" -#include "registry.h" static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; @@ -1085,15 +1084,12 @@ XFixesCursorInit (void) cs->pCursorHideCounts = NULL; SetCursorScreen (pScreen, cs); } - CursorClientType = CreateNewResourceType(CursorFreeClient); - if (CursorClientType) - RegisterResourceName(CursorClientType, "XFixesCursorClient"); - CursorHideCountType = CreateNewResourceType(CursorFreeHideCount); - if (CursorHideCountType) - RegisterResourceName(CursorClientType, "XFixesCursorClient"); - CursorWindowType = CreateNewResourceType(CursorFreeWindow); - if (CursorWindowType) - RegisterResourceName(CursorWindowType, "XFixesCursorWindow"); + CursorClientType = CreateNewResourceType(CursorFreeClient, + "XFixesCursorClient"); + CursorHideCountType = CreateNewResourceType(CursorFreeHideCount, + "XFixesCursorHideCount"); + CursorWindowType = CreateNewResourceType(CursorFreeWindow, + "XFixesCursorWindow"); if (pInvisibleCursor == NULL) { pInvisibleCursor = createInvisibleCursor(); diff --git a/xfixes/region.c b/xfixes/region.c index 3942c9d32..1b4accb3e 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -33,7 +33,6 @@ extern int RenderErrBase; #include #include #include -#include "registry.h" RESTYPE RegionResType; @@ -64,10 +63,7 @@ XFixesRegionCopy (RegionPtr pRegion) Bool XFixesRegionInit (void) { - RegionResType = CreateNewResourceType(RegionResFree); - - if (RegionResType) - RegisterResourceName(RegionResType, "XFixesRegion"); + RegionResType = CreateNewResourceType(RegionResFree, "XFixesRegion"); return (RegionResType != 0); } diff --git a/xfixes/select.c b/xfixes/select.c index 5a00ea845..5ba7896cb 100644 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -26,7 +26,6 @@ #include "xfixesint.h" #include "xace.h" -#include "registry.h" static RESTYPE SelectionClientType, SelectionWindowType; static Bool SelectionCallbackRegistered = FALSE; @@ -285,12 +284,9 @@ SelectionFreeWindow (pointer data, XID id) Bool XFixesSelectionInit (void) { - SelectionClientType = CreateNewResourceType(SelectionFreeClient); - if (SelectionClientType) - RegisterResourceName(SelectionClientType, "XFixesSelectionClient"); - SelectionWindowType = CreateNewResourceType(SelectionFreeWindow); - if (SelectionWindowType) - RegisterResourceName(SelectionWindowType, "XFixesSelectionWindow"); - + SelectionClientType = CreateNewResourceType(SelectionFreeClient, + "XFixesSelectionClient"); + SelectionWindowType = CreateNewResourceType(SelectionFreeWindow, + "XFixesSelectionWindow"); return SelectionClientType && SelectionWindowType; } -- cgit v1.2.3