From 66b2b1381c6bf96bc24fbe541b6349a22190a0a8 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 23 Feb 2003 05:23:04 +0000 Subject: [PATCH] * key.c (init_key_x11): Don't try to use X11 if DISPLAY is not set in the environment. --- src/ChangeLog | 5 +++++ src/key.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a13ca9826..ae5551d93 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-02-23 Pavel Roskin + + * key.c (init_key_x11): Don't try to use X11 if DISPLAY is not + set in the environment. + 2003-02-22 Pavel Tsekov * key.c: Add support for dynamic loading of libX11. diff --git a/src/key.c b/src/key.c index bb154a957..f1220877d 100644 --- a/src/key.c +++ b/src/key.c @@ -259,7 +259,7 @@ static Bool (*func_XQueryPointer) (Display *, Window, Window *, Window *, unsigned int *); static GModule *x11_module; -#endif /* HAVE_GMODULE */ +#endif /* HAVE_GMODULE */ static Display *x11_display; static Window x11_window; @@ -269,7 +269,12 @@ init_key_x11 (void) { #ifdef HAVE_GMODULE gchar *x11_module_fname; +#endif /* HAVE_GMODULE */ + if (!getenv ("DISPLAY")) + return; + +#ifdef HAVE_GMODULE x11_module_fname = g_module_build_path (NULL, "X11"); if (!x11_module_fname)