From daba227da64b488a264417708e91e285aeb2fa54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand=20=28astrand=29?= Date: Mon, 9 Oct 2017 12:32:14 +0200 Subject: [PATCH] Build with support for MIT-SHM No need for ifdefs; we can assume MITSHM. Already done in vncviewer. --- unix/x0vncserver/Image.cxx | 9 +-------- unix/x0vncserver/Image.h | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/unix/x0vncserver/Image.cxx b/unix/x0vncserver/Image.cxx index f998c6a5..7bb2328d 100644 --- a/unix/x0vncserver/Image.cxx +++ b/unix/x0vncserver/Image.cxx @@ -24,10 +24,8 @@ #include #include -#ifdef HAVE_MITSHM #include #include -#endif #include #include @@ -196,8 +194,6 @@ void Image::updateRect(Image *src, int dst_x, int dst_y, updateRect(src->xim, dst_x, dst_y, src_x, src_y, w, h); } -#ifdef HAVE_MITSHM - // // ShmImage class implementation. // @@ -429,7 +425,6 @@ void IrixOverlayShmImage::get(Window wnd, int x, int y, int w, int h, } #endif // HAVE_READDISPLAY -#endif // HAVE_MITSHM #ifdef HAVE_SUN_OVL @@ -490,7 +485,7 @@ void SolarisOverlayImage::get(Window wnd, int x, int y, int w, int h, // // Prepare useful shortcuts for compile-time options. -#if defined(HAVE_READDISPLAY) && defined(HAVE_MITSHM) +#if defined(HAVE_READDISPLAY) #define HAVE_SHM_READDISPLAY #endif #if defined(HAVE_SHM_READDISPLAY) || defined(HAVE_SUN_OVL) @@ -536,7 +531,6 @@ Image *ImageFactory::newImage(Display *d, int width, int height) // Now, try to use shared memory image. -#ifdef HAVE_MITSHM if (mayUseShm) { image = new ShmImage(d, width, height); if (image->xim != NULL) { @@ -546,7 +540,6 @@ Image *ImageFactory::newImage(Display *d, int width, int height) delete image; vlog.error("Failed to create SHM image, falling back to Xlib image"); } -#endif // HAVE_MITSHM // Fall back to Xlib image. diff --git a/unix/x0vncserver/Image.h b/unix/x0vncserver/Image.h index 4cac8b41..675b1fa6 100644 --- a/unix/x0vncserver/Image.h +++ b/unix/x0vncserver/Image.h @@ -92,8 +92,6 @@ protected: // ShmImage uses MIT-SHM extension of an X server to get image data. // -#ifdef HAVE_MITSHM - #include class ShmImage : public Image { @@ -167,7 +165,6 @@ protected: }; #endif // HAVE_READDISPLAY -#endif // HAVE_MITSHM // // SolarisOverlayImage uses SUN_OVL extension of an X server to get -- 2.39.5