aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/ephyr/hostx.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 10:44:43 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 10:44:43 +0200
commit9f986778bd4393c5a9108426969d45aa7f10f334 (patch)
tree27d7bd08dac54a54a923e76dccf2b8e388be2a03 /xorg-server/hw/kdrive/ephyr/hostx.c
parentafbd3947071a33f59dda122f1ac396442a02c128 (diff)
downloadvcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.gz
vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.bz2
vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.zip
libX11 libXext libXft mesa libxcb mkfontscale pixman xserver
xkeyboard-config git update 19 oct 2011
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/hostx.c')
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c
index 4caf4516d..47a6681c4 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -45,6 +45,7 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h> /* for memset */
+#include <errno.h>
#include <time.h>
#include <sys/ipc.h>
@@ -331,6 +332,14 @@ hostx_set_title (char *title)
ephyrTitle = title;
}
+static int _X_NORETURN
+x_io_error_handler (Display *dpy) {
+ ErrorF("Lost connection to X server: %s\n", strerror(errno));
+ CloseWellKnownConnections();
+ OsCleanup(1);
+ exit(1);
+}
+
int
hostx_init (void)
{
@@ -358,6 +367,8 @@ hostx_init (void)
exit(1);
}
+ XSetIOErrorHandler(x_io_error_handler);
+
HostX.screen = DefaultScreen(HostX.dpy);
HostX.winroot = RootWindow(HostX.dpy, HostX.screen);
HostX.gc = XCreateGC(HostX.dpy, HostX.winroot, 0, NULL);