summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vncviewer/X11PixelBuffer.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vncviewer/X11PixelBuffer.cxx b/vncviewer/X11PixelBuffer.cxx
index 59b90e2c..f83aa5f4 100644
--- a/vncviewer/X11PixelBuffer.cxx
+++ b/vncviewer/X11PixelBuffer.cxx
@@ -156,6 +156,11 @@ int X11PixelBuffer::setupShm()
Bool pixmaps;
XErrorHandler old_handler;
Status status;
+ const char *display_name = XDisplayName (NULL);
+
+ /* Don't use MIT-SHM on remote displays */
+ if (*display_name && *display_name != ':')
+ return 0;
if (!XShmQueryVersion(fl_display, &major, &minor, &pixmaps))
return 0;