vnc.c: In function ‘lib_framebuffer_update’:
vnc.c:816:37: error: ‘b’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
816 | return (r << 16) | (g << 8) | b;
| ~~~~~~~~~~~~~~~~~~~~~^~~
vnc.c:1301:9: note: ‘b’ was declared here
1301 | int b;
| ^
vnc.c:816:31: error: ‘g’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
816 | return (r << 16) | (g << 8) | b;
| ~~~^~~~~
vnc.c:1300:9: note: ‘g’ was declared here
1300 | int g;
| ^
vnc.c:816:19: error: ‘r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
816 | return (r << 16) | (g << 8) | b;
| ~~~^~~~~~
vnc.c:1299:9: note: ‘r’ was declared here
1299 | int r;
| ^
Significant updates for the VNC module:-
1) Support for the new API calls allowing both server and client
multi-monitor resizes.
2) The s member variable of the vnc_screen_layout structure is no longer
dynamically allocated.
3) The module server_width and server_height member variables are
removed as these are just duplicating server_layout.total_width and
server_layout.total_height.
4) When the server screens are resized, there is no need to restart the
entire resize state machine as we already know at this point that
the server supports resizing.
This commit DOES NOT compile.
This change alters these module interface calls:-
1) mod_server_monitor_resize() (Call from xrdp to module). Updated.
2) server_reset() (Call from module to xrdp). Replaced.
The mod_server_monitor_resize() call is updated :-
1) to allow a monitor list to be passed in for a multimon resize
2) with an 'in_progress' return value which tells the caller whether or
not to expect a callback.
The server_reset() call served two purposes up until now:-
1) To allow a module to resize a single monitor session. There
is no way to request a multi-monitor resize from the module
2) (with bpp == 0) To signal to the mm resize state machine that
a server screen resize hsa finished.
This is split into two calls:-
1) client_monitor_resize() to allow a mdule to request a
multimon resize.
2) server_monitor_resize_done(). This is called by a module
when a resize is completed.
This fixes some monitor hotplug issues with non-GFX codepaths.
1) The server_version_message() was working on an out-of-date
copy of the client_info. As a result, the X server and the
window manager did not agree on the number of windows
2) As a result of 1), a memory leak was found in the VNC module.
* Store EGFX state before entering resize state machine
At present the EGFX state is destroyed by states WMRZ_EGFX_DELETE_SURFACE
through WRMZ_EGFX_DELETE. This means that at WMRZ_EGFX_INITIALIZE we
cannot distinguish between EGFX not being ever used, and EGFX
having been torn down. Consequently, when running non-GFX, we don't
correctly recover the session.
* Allow multiple reasons for suppress_output
Replaces the single boolean for suppress_output with
a bitmask, to allow output to be suppressed for
more than one reason
* Disable output during resize
* Add states to dynamic resize
Adds states to the dynamic resize state machine so we wait for a
Deactivation-Reactivation sequence to finish before sending pointer
updates, etc.
* suppress module output during the dynamic resize
* Add support for dynamic resize to VNC backend
xrdp_mm needs to be informed when a resize has been performed so that
the resize stte machine can be updsate.
There are a number of ways the existing transport connect logic in
trans_connect could be improved for POSIX compatibility, and also
slightly tidied up:-
1) The same socket is re-used for multiple connect attempts following
failure which isn't behaviour defined by POSIX.1-2017 (although it
works on Linux).
2) An asynchronous connect is started, and then after a short
delay connect() is called again on the same socket. POSIX.1-2017
is clear that in this situation EALREADY is returned before the
connection is established, but is silent on the behaviour expected
when the connection is established. Returning success is an option,
but so is returning EISCONN. The current code assumes the connect()
call will succeed.
3) The code contains two virtually identical, quite complex loops for
TCP and UNIX sockets, differing only in the calls to create a socket
and connect it.
4) trans_connect() contains looping and retry logic, but this isn't
seen as sufficient by the chansrv connect code in xrdp/xrdp_mm.c and
the Xorg connect code in xup/xup.c. Both of these implement their own
looping and retry logic on top of the logic in trans_connect(),
resulting in slightly unpredictable behaviour with regard to
timeouts.
5) A socket number can technically be zero, but in a couple of places
this isn't allowed for.
This PR attempts to correct the implementation of trans_connect(),
and also to simplify the areas it is called from.
As part of the PR, the signature of the server_is_term member of the
xrdp module interface is changed to match the signature expected by the
is_term member of a struct trans. This allows for trans_connect()
in xrdp modules to directly access g_is_term() within the main xrdp
executable. At the moment this functionality is only used by the xup
module.
- Eliminate duplicaiton for display_size_description
- monitorCount needs to be uint32_t
- width/height -> session_width/session_height
- Update CLIENT_INFO_CURRENT_VERSION
- Also some misc unit test updates.
- Minor log updates.
- Based on https://github.com/jsorg71/xrdp/tree/dynamic_monitor
- Tested with xorgxrdp
- Tested with vnc
- Only works with single monitor.
- Update documentation to clarify the difference between MSTSC and
Microsoft Remote Desktop.
- Does not include compatibility with /gfx at this time, which is still
in testing.
- Updates to include ms-rdpedisp.h header for the 2.2.2 specification of
the protocol.
- Adds new dynamic_monitor_layout struct that shares the number of
monitors with xrdp_client_info.h
- Does not allow for BPP changes because the RDP protocol doesn't
support it.
- Option to disable feature as NeutrinoRDP doesn't support it (It was
based on FreeRDP 1.0.1 which didn't yet have this feature.)
- Add CLIENT_MONITOR_DATA_MAXIMUM_MONITORS constant and reference
spec definition.
Depends on https://github.com/neutrinolabs/xorgxrdp/pull/183
Versioning is for libraries. Modules are not libraries; no code is linked
against them.
Libtool makes sure the modules can be opened by dlopen(). That is already
true for ELF format, but other file formats may need special processing.
This fixes loading modules compiled with a C++ compiler. Remote thandle
type, it's unused. Use tintptr for module data. Don't cast pointers to
long, they won't fit on Win64.