summaryrefslogtreecommitdiff
path: root/Xext/xace.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2008-12-18 13:58:35 -0500
committerEamon Walsh <ewalsh@tycho.nsa.gov>2008-12-18 13:58:35 -0500
commitf87e66486c3610c56888915b66ae5ab0af03da8b (patch)
tree23960b5c014d3a703234a5710ca32e952a86b4b7 /Xext/xace.c
parent777408914dbf395e9969e3f34720286e6f740369 (diff)
xace: Export wrappers around two Xtrans functions used by modules.
Don't know a better way to do this, since Xtrans isn't a library that can be linked into modules.
Diffstat (limited to 'Xext/xace.c')
-rw-r--r--Xext/xace.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Xext/xace.c b/Xext/xace.c
index c7583197d..7e82f810d 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -29,6 +29,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "gcstruct.h"
#include "xacestr.h"
+#define XSERV_t
+#define TRANS_SERVER
+#include <X11/Xtrans/Xtrans.h>
+#include "../os/osdep.h"
+
_X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0};
/* Special-cased hook functions. Called by Xserver.
@@ -339,3 +344,18 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
REGION_UNINIT(pScreen, &imageRegion);
REGION_UNINIT(pScreen, &censorRegion);
} /* XaceCensorImage */
+
+/*
+ * Xtrans wrappers for use by modules
+ */
+int XaceGetConnectionNumber(ClientPtr client)
+{
+ XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn;
+ return _XSERVTransGetConnectionNumber(ci);
+}
+
+int XaceIsLocal(ClientPtr client)
+{
+ XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn;
+ return _XSERVTransIsLocal(ci);
+}