Avoid direct access to the screen dimensions and layout so that we
can make sure it stays sane. This also makes sure the layout is
properly updated when we only get the screen dimensions from the
server.
Grabbing (and ungrabbing) the keyboard generates fake focus events
with modern versions of Xorg. This causes an infinite loop since we
update the grab status on focus events.
Work around this by ignoring these fake events.
The VNC servers aren't great at getting full frames with each update,
so avoid calling it "frames per second" in the statistics as that
can be misleading.
Copy paste errors/brain fart:
- Pixels do not need a factor 8 for any conversion
- Multiplying bytes by 8 gives bits, so lower case 'b', and bits
use SI prefixes, not IEC
Similar to 841e9f32d5 but for the
pointer. Fixes a problem where the desktop environment is unresponsive
(to the mouse) after fullscreen exit; Fixes #579.
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.
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:
The check for the X-axis is
if ((w() - (h() < viewport->h() ? Fl::scrollbar_size() : 0) < viewport->w())
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.
Adds an optional graph to the viewer to display current frame rate,
pixel rate and network bandwidth. Makes it easier to debug and test
performance related issues.
Some platforms draw directly to the screen, which means that updates
will flicker if we draw multiple layers. Prevent this by first
composing the update on a hidden surface.
Delegate decoder object management to a separate class
Done in preparation for multi-core decoding. Keeps the complexity
out of the other classes. This also moves ownership of the
framebuffer in to CConnection. It's the CConnection object that is
aware of the threads and how to synchronise with them. Therefore
the ownership of the framebuffer must also be there to make sure
it isn't deleted whilst threads are working.
This workaround is no longer effective with the new system handler
method of handling keyboard events. The bug has also been fixed
in upstream FLTK, further making it pointless.
The local window manager might give us a window of a different size
than the one we request. Make sure that the remote resize setting
gets respected even in this case.
Use PixelBuffer objects as the interface for encoders and decoders
This avoid a lot of unnecessary middle men. This also pushes the
responsibility for pixel format conversion into the encoders and
decoders. The new bufferFromBuffer() is used for direct conversion,
rather than PixelTransformer/TransImageGetter.
Gets rid of a loooot of code and complexity.
Colour map clients are still supported through an
automatically generated map, but we lose the ability to
develop a client or server that uses colour maps
internally.
Leaving/entering full screen on OS X would leave the scroll bars in an
incorrect state. Turned out it was actually a redraw bug.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5010 3789f03b-4d11-0410-bbf8-ca57d06f2519
Fl::screen_work_area() was added after FLTK 1.3.0, so we need to have
checks that it is actually present on the current system.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5008 3789f03b-4d11-0410-bbf8-ca57d06f2519
Starting in full screen was misbehaving because we were waiting
for a FL_FULLSCREEN event to set things up properly, and FLTK
doesn't emit this for a hidden window.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5004 3789f03b-4d11-0410-bbf8-ca57d06f2519
XFCE's window manager did not interact well with the code that avoided
accidental legacy full screen requests. Seems we need to sort that
FIXME out sooner rather than later.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5002 3789f03b-4d11-0410-bbf8-ca57d06f2519
Using maximize and full screen at the same time on OS X would misbehave
as we would first create a full screen window, then resize it to a
maximized site. Reorganise things a bit so that we get sensible
behaviour.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5001 3789f03b-4d11-0410-bbf8-ca57d06f2519