| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
It's a reoccurring issue that users try to build individual components
by pointing cmake at a specific subdirectory, e.g. 'cmake vncviewer'.
CMake, unfortunately, has insufficient protection against this so we'll
need to add a manual check.
This commit only adds it to the most likely places for misuse so we
don't have to pollute every CMakeLists.txt.
|
|
|
|
|
| |
All the information we need is now available in keysymdef.h, so let's
get everything updated and in sync.
|
|
|
|
| |
Make it easier to see what's code and what's just a lot of data.
|
|
|
|
|
| |
This is a manually set up table specific for TigerVNC. For clarity,
separate it out from the general keysym/Unicode table.
|
|
|
|
|
|
|
|
|
| |
This is mainly a copy of XKeysymToString() from libX11. We've also added
a wrapper that still gives a string, even if there is no name for the
requested keysym.
This grows the binaries a bit, but not with any extreme amount so is
hopefully worth it to get better debug logging.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can get races with clipboard managers in the server that is very
confusing to the user.
When the clipboard changes locally, we tell the server to drop the old
clipboard (as it is now lost). But we don't send over the new clipboard
until we get focus again, in order to not leak more data than necessary.
This causes some clibpoard managers to take over ownership in order to
avoid an empty clipboard. And this takes precedence over the new client
clipboard as it happened later. Effectively reverting the clipboard the
user sees.
Avoid all of this by simply ignoring the server when we don't have
focus. This is likely what users expect anyway as they expect their
currently focused application to control the clipboard, not vncviewer in
the background.
|
|
|
|
|
|
| |
Don't assume a lack of TCP listeners means the server will be
unreachable. There might be other methods of access, so let the higher
levels do that sanity check instead.
|
|
|
|
|
|
|
| |
Using "c" is in conflict the the "Ctrl" entry, so we need to pick
something else here.
This was a regression introduced in 44b085a.
|
|
|
|
|
|
|
|
| |
FLTK only allows 256 different box types, but it doesn't actually check
this when registering new ones.
Move our custom types to a valid range, and add an assert for good
measure to make sure we don't overflow FLTK's internal structures.
|
| |
|
|
|
|
|
| |
Follow the colors that modern desktops use when it comes to background,
text and selections.
|
|
|
|
|
|
|
| |
There is something broken with these FLTK draw routines on Windows. They
leave gaps at the start and end of the arc/pie rather than filling the
whole specified span. So we need to nudge the numbers a bit to work
around this.
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by modern Windows appearance, and to some extent macOS. They
have flat boxes and use white, or very light, colors for interactive
elements. Unfortunately we can't directly control the colors of
widgets, so instead we just lighten everything that uses this box type.
GNOME uses a different design, both their older and newer style. But UI
look is less consistent on Linux, so hopefully our new look is decent
enough there as well.
|
|
|
|
|
| |
Work around a bug in Fl_Input_Choice where it forgets to set the proper
"input background" on some parts.
|
|
|
|
| |
We should have a consistent color set over all widgets.
|
|
|
|
|
|
|
|
|
|
| |
gcc doesn't support -Wformat for the wide format versions of printf()
and friends yet:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308
Do what glibc does and have some commented out tags to show future
intent.
|
|
|
|
|
|
|
|
|
|
| |
gettext replaces all *printf() functions on platforms that don't fully
conform to the POSIX behaviour. Unfortunately, gettext fails to tag
these replacement functions properly so that -Wformat can still do its
thing.
Resolve this by adding a redudant declaration of the relevant functions,
with the attribute tagging in place.
|
|
|
|
|
|
| |
The size of size_t depends on the architecture, so we need to have
different conversion to and from strings. But we don't really need that
range, so avoid the issue by using a standard integer size.
|
|
|
|
|
| |
The WM_CLASS we set on all windows is just "vncviewer", so that it
matches the name of the .desktop file, which is what GNOME expects.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
We should handle this in the low-level protocol code as much as possible
to avoid mistakes. This way the rest of the code can assume that strings
are always UTF-8 with \n line endings.
|
| |
| |
| |
| |
| | |
These will always be byte streams at heart, so let's try to keep them
with a proper type. Should make it clearer how they will be used.
|
| |
| |
| |
| | |
The need for these must have got lost somewhere in the type cleanup.
|
| |
| |
| |
| | |
They are not fully supported and break with some backends, like Ninja.
|
| |
| |
| |
| |
| | |
It is more specific, and it properly sets up propagation when include
directories also need to be used further down a dependency chain.
|
|/
|
|
|
|
|
| |
The coordinates we get are relative the root window of each screen, so
we can only trust them if we are on the same screen. So let's explicitly
check that we are still getting events from the expected screen by
checking the root window field of the event.
|
|
|
|
|
| |
It's a type specific to that class, so let's keep them close for
clarity.
|
|
|
|
|
| |
It is much more natural than custom methods for this very common
operation.
|
|
|
|
|
|
|
|
| |
These files don't use anything from this header, so remove the include.
This exposes some missing includes in other places, though. So add an
explicit include in the files that were relying on an indirect
inclusion.
|
|
|
|
|
| |
Avoids a bit of complexity by delegating that handling to a string
object.
|
|
|
|
|
| |
Let's use a more common type instead of something homegrown. Should be
more familiar to new developers.
|
|
|
|
|
|
| |
We mostly use classical C strings, but the memory management around them
can get confusing and error prone. Let's use std::string for the cases
where we need to return a newly allocated string.
|
|
|
|
|
| |
We know the needed space here, so let's keep it simple with a constant
size string buffer.
|
|
|
|
|
| |
It should return a path to the directory itself, just like its sister
function getuserhomedir().
|
|
|
|
| |
All library functions should be in a proper namespace.
|
|
|
|
|
|
|
|
|
| |
This mimics how some system functions (like inet_ntop()) work, and
avoids complexity around ownership of the returned string buffer.
The downside is that the string must be consumed directly as it will be
overwritten on the next call, but that is not an issue with the current
usage.
|
|
|
|
|
| |
We don't need to make extra copies of the string in most cases, so let's
simplify the code and access the string directly when we can.
|
|
|
|
|
| |
We never use Windows' "UNICODE" mode anyway, so let's get rid of this
complexity.
|
|
|
|
|
| |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|
|
|
|
|
| |
These are supported by gcc and clang, and I don't think MSVC works well
with our code anyway, so let's keep things simple and use these
directly.
|
|
|
|
| |
gcc will complain, and we will fill out all fields later anyway.
|
|
|
|
|
| |
These types caused an incorrect signed/unsigned behaviour, so let's make
sure we use the appropriate type.
|
|
|
|
| |
These are all truisms because of the valid range of the types.
|
|
|
|
|
| |
This allows us to separate accidental fall through from explicit ones,
which allows us to turn on such checks in the compiler.
|
|
|
|
|
| |
These were not meant to fall through. Likely didn't have any adverse
effects, but let's fix it anyway.
|
|
|
|
|
| |
This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
|
|
|
|
|
| |
No practical difference currently, but let's respect what this API was
supposed to do.
|
| |
|
|
|
|
|
| |
This makes sure the compiler doesn't complain about problems in those
files.
|