diff options
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/CConn.cxx | 13 | ||||
-rw-r--r-- | vncviewer/PlatformPixelBuffer.cxx | 9 | ||||
-rw-r--r-- | vncviewer/Surface_X11.cxx | 33 | ||||
-rw-r--r-- | vncviewer/Viewport.cxx | 13 | ||||
-rw-r--r-- | vncviewer/vncviewer.cxx | 2 | ||||
-rw-r--r-- | vncviewer/vncviewer.man | 2 |
6 files changed, 57 insertions, 15 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index 166597e5..69186c55 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -113,14 +113,14 @@ CConn::CConn(const char* vncServerName, network::Socket* socket=NULL) if (strchr(vncServerName, '/') != NULL) { sock = new network::UnixSocket(vncServerName); serverHost = sock->getPeerAddress(); - vlog.info(_("connected to socket %s"), serverHost); + vlog.info(_("Connected to socket %s"), serverHost); } else #endif { getHostAndPort(vncServerName, &serverHost, &serverPort); sock = new network::TcpSocket(serverHost, serverPort); - vlog.info(_("connected to host %s port %d"), serverHost, serverPort); + vlog.info(_("Connected to host %s port %d"), serverHost, serverPort); } } catch (rdr::Exception& e) { vlog.error("%s", e.str()); @@ -575,9 +575,12 @@ void CConn::autoSelectFormatAndEncoding() // Select best color level newFullColour = (kbitsPerSecond > 256); if (newFullColour != fullColour) { - vlog.info(_("Throughput %d kbit/s - full color is now %s"), - kbitsPerSecond, - newFullColour ? _("enabled") : _("disabled")); + if (newFullColour) + vlog.info(_("Throughput %d kbit/s - full color is now enabled"), + kbitsPerSecond); + else + vlog.info(_("Throughput %d kbit/s - full color is now disabled"), + kbitsPerSecond); fullColour.setParam(newFullColour); formatChange = true; } diff --git a/vncviewer/PlatformPixelBuffer.cxx b/vncviewer/PlatformPixelBuffer.cxx index c79b5c1a..e6a054ab 100644 --- a/vncviewer/PlatformPixelBuffer.cxx +++ b/vncviewer/PlatformPixelBuffer.cxx @@ -34,13 +34,8 @@ static rfb::LogWriter vlog("PlatformPixelBuffer"); PlatformPixelBuffer::PlatformPixelBuffer(int width, int height) : - FullFramePixelBuffer(rfb::PixelFormat(32, 24, -#if !defined(WIN32) && !defined(__APPLE__) - ImageByteOrder(fl_display) == MSBFirst, -#else - false, -#endif - true, 255, 255, 255, 16, 8, 0), + FullFramePixelBuffer(rfb::PixelFormat(32, 24, false, true, + 255, 255, 255, 16, 8, 0), width, height, 0, stride), Surface(width, height) #if !defined(WIN32) && !defined(__APPLE__) diff --git a/vncviewer/Surface_X11.cxx b/vncviewer/Surface_X11.cxx index 3523da3d..6562634d 100644 --- a/vncviewer/Surface_X11.cxx +++ b/vncviewer/Surface_X11.cxx @@ -109,6 +109,7 @@ void Surface::blend(Surface* dst, int src_x, int src_y, int x, int y, int w, int void Surface::alloc() { + XRenderPictFormat templ; XRenderPictFormat* format; // Might not be open at this point @@ -117,7 +118,37 @@ void Surface::alloc() pixmap = XCreatePixmap(fl_display, XDefaultRootWindow(fl_display), width(), height(), 32); - format = XRenderFindStandardFormat(fl_display, PictStandardARGB32); + // Our code assumes a BGRA byte order, regardless of what the endian + // of the machine is or the native byte order of XImage, so make sure + // we find such a format + templ.type = PictTypeDirect; + templ.depth = 32; +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + templ.direct.alpha = 0; + templ.direct.red = 8; + templ.direct.green = 16; + templ.direct.blue = 24; +#else + templ.direct.alpha = 24; + templ.direct.red = 16; + templ.direct.green = 8; + templ.direct.blue = 0; +#endif + templ.direct.alphaMask = 0xff; + templ.direct.redMask = 0xff; + templ.direct.greenMask = 0xff; + templ.direct.blueMask = 0xff; + + format = XRenderFindFormat(fl_display, PictFormatType | PictFormatDepth | + PictFormatRed | PictFormatRedMask | + PictFormatGreen | PictFormatGreenMask | + PictFormatBlue | PictFormatBlueMask | + PictFormatAlpha | PictFormatAlphaMask, + &templ, 0); + + if (!format) + throw rdr::Exception("XRenderFindFormat"); + picture = XRenderCreatePicture(fl_display, pixmap, format, 0, NULL); visFormat = XRenderFindVisualFormat(fl_display, fl_visual->visual); diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 7b5df572..18ed69e7 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -936,6 +936,13 @@ int Viewport::handleSystemEvent(void *event, void *data) keyCode = ((msg->lParam >> 16) & 0xff); + // Windows' touch keyboard doesn't set a scan code for the Alt + // portion of the AltGr sequence, so we need to help it out + if (!isExtended && (keyCode == 0x00) && (vKey == VK_MENU)) { + isExtended = true; + keyCode = 0x38; + } + // Windows doesn't have a proper AltGr, but handles it using fake // Ctrl+Alt. However the remote end might not be Windows, so we need // to merge those in to a single AltGr event. We detect this case @@ -1040,6 +1047,12 @@ int Viewport::handleSystemEvent(void *event, void *data) keyCode = ((msg->lParam >> 16) & 0xff); + // Touch keyboard AltGr (see above) + if (!isExtended && (keyCode == 0x00) && (vKey == VK_MENU)) { + isExtended = true; + keyCode = 0x38; + } + // We can't get a release in the middle of an AltGr sequence, so // abort that detection if (self->altGrArmed) { diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx index 8d795109..ac4afca4 100644 --- a/vncviewer/vncviewer.cxx +++ b/vncviewer/vncviewer.cxx @@ -100,7 +100,7 @@ static const char *about_text() _("TigerVNC Viewer %d-bit v%s\n" "Built on: %s\n" "Copyright (C) 1999-%d TigerVNC Team and many others (see README.rst)\n" - "See http://www.tigervnc.org for information on TigerVNC."), + "See https://www.tigervnc.org for information on TigerVNC."), (int)sizeof(size_t)*8, PACKAGE_VERSION, BUILD_TIMESTAMP, 2018); diff --git a/vncviewer/vncviewer.man b/vncviewer/vncviewer.man index 421290f8..8762dfbd 100644 --- a/vncviewer/vncviewer.man +++ b/vncviewer/vncviewer.man @@ -320,7 +320,7 @@ Default certificate revocation list. .BR vncconfig (1), .BR vncserver (1) .br -http://www.tigervnc.org +https://www.tigervnc.org .SH AUTHOR Tristan Richardson, RealVNC Ltd. and others. |