From 06c8977966e76255ce7798f4839ef6e3530264a8 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 4 Oct 2007 13:01:24 +0200 Subject: [PATCH] Xephyr: better handling of the -nodri option * hw/kdrive/ephyr/ephyr.c: (ephyrInitScreen): try and detect when the host has no DRI support. In that case, switch to the -nodri behaviour. When in the -nodri case, make sure not to skip glx visual initialisation. --- hw/kdrive/ephyr/ephyr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 85aab280f..f46a89d55 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -40,6 +40,10 @@ #endif /*XEPHYR_DRI*/ extern int KdTsPhyScreen; +#ifdef GLXEXT +extern Bool noGlxVisualInit; +#endif + KdKeyboardInfo *ephyrKbd; KdPointerInfo *ephyrMouse; EphyrKeySyms ephyrKeySyms; @@ -628,6 +632,11 @@ ephyrInitScreen (ScreenPtr pScreen) #endif /*XV*/ #ifdef XEPHYR_DRI + if (!ephyrNoDRI && !hostx_has_dri ()) { + EPHYR_LOG ("host x does not support DRI. Disabling DRI forwarding\n") ; + ephyrNoDRI = TRUE ; + noGlxVisualInit = FALSE ; + } if (!ephyrNoDRI) { ephyrDRIExtensionInit (pScreen) ; ephyrHijackGLXExtension () ; @@ -635,6 +644,12 @@ ephyrInitScreen (ScreenPtr pScreen) } #endif +#ifdef GLXEXT + if (ephyrNoDRI) { + noGlxVisualInit = FALSE ; + } +#endif + return TRUE; }