Pierre Ossman [Mon, 18 Sep 2017 14:05:48 +0000 (16:05 +0200)]
Release pointer grab when cursor leaves window
We don't need the grab any more if the pointer cannot click on our
window. This makes it possible to shift focus to another application
when we aren't covering all monitors.
Rahul Kale [Wed, 12 Jul 2017 22:35:58 +0000 (00:35 +0200)]
rfb_win32: Use scan codes if available
If scan codes are available using QEMU Extended Keyboard Messages
from clients, use that to inject scancodes directly into the
system using the SendInput API.
No conversion is needed as Windows uses the same scancode encoding.
Signed-off-by: Rahul Kale <Rahul.Kale@barco.com> Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Pierre Ossman [Tue, 16 May 2017 12:30:38 +0000 (14:30 +0200)]
Basic support for QEMU Extended Key Events
This adds the basic infrastructure and handshake for the QEMU
Extended Key Events extension. No viewer or server makes use of
the extra functionality yet though.
Pierre Ossman [Wed, 16 Aug 2017 13:20:20 +0000 (15:20 +0200)]
Respect modifiers in x0vncserver
Using XKeysymToKeycode() often gives the incorrect keycode as it
doesn't respect the current modifier state. Use XKB to find the
proper key instead.
This however also means that we need to track the mapping for all
pressed keys to make sure we know the correct keycode when it is
time to release the key.
Brian P. Hinz [Sun, 13 Aug 2017 00:19:50 +0000 (20:19 -0400)]
Fully implement support for alpha cursor pseudo encoding.
Alpha cursors are not supported in java on Windows so disable
it in that case. Ideally it would be nice to be able to test
whether or not the client OS supports it, but at the moment
MS Windows is the only one that I'm aware of that doesn't.
Brian P. Hinz [Sun, 6 Aug 2017 19:00:09 +0000 (15:00 -0400)]
Fixed issue where CLI paramters specified as "-param value" caused
a java.nio.BufferOverflowException while the same parameter specified
as "-param=value" worked fine.
x0vncserver: Use Xfixes to display cursors if available
https://github.com/TigerVNC/tigervnc/issues/361
This is a simple implementation that refetches and transforms the cursor
image every time it changes, and doesn't use the cursor naming functions
of the XFixes extension to save & cache cursor images.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Pierre Ossman [Fri, 21 Jul 2017 12:07:15 +0000 (14:07 +0200)]
Add fallbacks for translating .desktop file
Only fairly recent versions of gettext can translate .desktop files.
So fall back to the older intltool on older systems, or just a plain
copy if intltool is also missing.
Pierre Ossman [Wed, 19 Jul 2017 09:20:53 +0000 (11:20 +0200)]
Increase default pointer event interval
Some systems (e.g. macOS) send massive amounts of pointer events, so
we need to start rate limiting things to something sensible by default.
One event per screen refresh should be more than sufficient.
Add a new parameter 'alertOnFatalError' which guards
the displaying of the GUI alert on fatal errors, and
thus when false just gives the textual error.
Now I can do:
while true
do
vncviewer alertOnFatalError=false vm:0
sleep 1
done
and it'll reappear when my VM appears without me getting error
dialogs.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
--
Steve Kondik [Sat, 8 Jul 2017 09:06:16 +0000 (02:06 -0700)]
rfb: Silence nonliteral format string warning in Logger
Clang complains loudly about this with Wformat=2, so add
a __printf_attr to help out.
Fixes:
/home/shade/dev/tigervnc/common/rfb/Logger.cxx:48:35: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vsnprintf(buf1, sizeof(buf1)-1, format, ap);
^~~~~~
1 error generated.
Steve Kondik [Sat, 8 Jul 2017 09:00:49 +0000 (02:00 -0700)]
rfb: Fix struct-vs-class warnings
Clang doesn't like when struct and class are used to refer
to the same thing interchangeably.
Fixes all instances of:
In file included from /home/shade/dev/tigervnc/common/rfb/CConnection.cxx:29:
In file included from /home/shade/dev/tigervnc/common/rfb/CConnection.h:28:
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:35:3: error: class 'Exception' was previously declared as a struct [-Werror,-Wmismatched-tags]
class Exception;
^
/home/shade/dev/tigervnc/common/rdr/Exception.h:32:10: note: previous use is here
struct Exception {
^
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:35:3: note: did you mean struct here?
class Exception;
^~~~~
struct
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:43:3: error: class 'Rect' was previously declared as a struct [-Werror,-Wmismatched-tags]
class Rect;
^
/home/shade/dev/tigervnc/common/rfb/Rect.h:68:10: note: previous use is here
struct Rect {
^
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:43:3: note: did you mean struct here?
class Rect;
^~~~~
struct
Steve Kondik [Sat, 8 Jul 2017 08:49:14 +0000 (01:49 -0700)]
Add missing virtual destructors
Fix warnings emitted by Clang:
/home/shade/dev/tigervnc/common/rdr/FdInStream.h:30:9: error: 'rdr::FdInStreamBlockCallback' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class FdInStreamBlockCallback {
^
In file included from /home/shade/dev/tigervnc/common/network/TcpSocket.cxx:44:
In file included from /home/shade/dev/tigervnc/common/network/TcpSocket.h:31:
/home/shade/dev/tigervnc/common/network/Socket.h:82:9: error: 'network::ConnectionFilter' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class ConnectionFilter {
^
..etc
Steve Kondik [Sat, 8 Jul 2017 08:45:10 +0000 (01:45 -0700)]
rfb: Fix hidden function overload warnings
Fix the following warnings emitted by Clang:
/home/shade/dev/tigervnc/common/rfb/Configuration.h:164:18: note: hidden overloaded virtual function 'rfb::VoidParameter::setParam' declared here: different number of parameters (0 vs 1)
virtual bool setParam();
^
/home/shade/dev/tigervnc/common/rfb/Configuration.h:256:18: error: 'rfb::BinaryParameter::setParam' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
virtual void setParam(const void* v, int l);
^
/home/shade/dev/tigervnc/common/rfb/Configuration.h:164:18: note: hidden overloaded virtual function 'rfb::VoidParameter::setParam' declared here: different number of parameters (0 vs 2)
virtual bool setParam();
Luke Shumaker [Tue, 23 May 2017 18:03:15 +0000 (14:03 -0400)]
vncviewer: Fix scrollbar visibility
Have a window that is sized to the remote screen. Now shrink the window
vertically, making it shorter than the remote screen in one axis. The
vertical scrollbar appears. However, the horizontal scrollbar does not
appear, despite the rightmost ~24 pixels (Fl::scrollbar_size()) being
hidden by the vertical scroll bar.
Fix that.
For clarity, move the fullscreen checks into a separate `if` statement,
rather than keeping the size and fullscreen checks together.
I think the comment does a decent job of explaining and justifying the
check's logic, but if you require further convincing, perhaps this
alternate explanation will help:
To be a bit more verbose and repetitive, we can split that ternary in to
two separate checks, and add some comments:
if (
(w() - < viewport->w()) // X needs a scrollbar
||
( (w() - Fl::scrollbar_size() < viewport->w()) && (h() < viewport->h()) )
//( X doesn't need a scrollbar unless Y does ) && ( Y does need one ) )
)
Within the "Y does need one" check, we don't need to worry about the
case where `h() - Fl::scrollbar_size() < viewport-h()` is true,
because if both axes are saying "I don't need a scrollbar unless
you do", then neither needs one.
Pierre Ossman [Fri, 28 Apr 2017 09:40:02 +0000 (11:40 +0200)]
Filter out alpha channel for normal draw() operation
macOS actually uses the alpha channel on windows, so we can get visual
artifacts if we feed it bogus alpha data. This filtering unfortunately
causes some CPU usage, but it's necessary until we can make sure the
framebuffer always contains proper 0xff for alpha.