diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-12-11 00:58:25 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-12-18 16:51:45 -0800 |
commit | a11c58fa0c5809f918b36b84be53385cb2d8ea59 (patch) | |
tree | d5b4416102f59a6abe3a86026bd6b5febb2ca26a /xfixes | |
parent | eb750f8b5e14751d4c40b50499baec5d2ba79db9 (diff) |
Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'xfixes')
-rw-r--r-- | xfixes/cursor.c | 7 | ||||
-rw-r--r-- | xfixes/region.c | 4 | ||||
-rw-r--r-- | xfixes/select.c | 6 |
3 files changed, 17 insertions, 0 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index c3e1e3534..0ef3e3aa4 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -53,6 +53,7 @@ #include "inputstr.h" #include "windowstr.h" #include "xace.h" +#include "registry.h" static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; @@ -1085,8 +1086,14 @@ XFixesCursorInit (void) 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"); if (pInvisibleCursor == NULL) { pInvisibleCursor = createInvisibleCursor(); diff --git a/xfixes/region.c b/xfixes/region.c index 59d8cee54..3942c9d32 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -33,6 +33,7 @@ extern int RenderErrBase; #include <regionstr.h> #include <gcstruct.h> #include <window.h> +#include "registry.h" RESTYPE RegionResType; @@ -65,6 +66,9 @@ XFixesRegionInit (void) { RegionResType = CreateNewResourceType(RegionResFree); + if (RegionResType) + RegisterResourceName(RegionResType, "XFixesRegion"); + return (RegionResType != 0); } diff --git a/xfixes/select.c b/xfixes/select.c index a5811bdc0..5a00ea845 100644 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -26,6 +26,7 @@ #include "xfixesint.h" #include "xace.h" +#include "registry.h" static RESTYPE SelectionClientType, SelectionWindowType; static Bool SelectionCallbackRegistered = FALSE; @@ -285,6 +286,11 @@ Bool XFixesSelectionInit (void) { SelectionClientType = CreateNewResourceType(SelectionFreeClient); + if (SelectionClientType) + RegisterResourceName(SelectionClientType, "XFixesSelectionClient"); SelectionWindowType = CreateNewResourceType(SelectionFreeWindow); + if (SelectionWindowType) + RegisterResourceName(SelectionWindowType, "XFixesSelectionWindow"); + return SelectionClientType && SelectionWindowType; } |