@@ -770,6 +770,22 @@ TRANS(NoListen) (const char * protocol)
}
int
+TRANS(IsListening) (char * protocol)
+{
+ Xtransport *trans;
+
+ if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+ {
+ prmsg (1,"TransIsListening: unable to find transport: %s\n",
+ protocol, 0, 0);
+
+ return 0;
+ }
+
+ return (trans->flags & TRANS_NOLISTEN);
+}
+
+int
TRANS(ResetListener) (XtransConnInfo ciptr)
{
@@ -307,6 +307,10 @@ int TRANS(NoListen) (
const char* /* protocol*/
);
+int TRANS(IsListening) (
+ char* /* protocol*/
+);
+
int TRANS(ResetListener)(
XtransConnInfo /* ciptr */
);
libxtrans provides TransNoListen() to set the 'don't listen' flag for a particular transport, but there is no interface to query the state of that flag This is a bit of a problem for the XWin server, as it wants to start some helper clients (for clipboard integration and integrated window management), so needs to know what transports the server is listening on to construct appropriate display names for those clients. Add TransIsListening() to discover if TransNoListen() has been called for a particular protocol or not Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> --- Xtrans.c | 16 ++++++++++++++++ Xtrans.h | 4 ++++ 2 files changed, 20 insertions(+)