In GFX mode, if we're using xorgxrdp, frame updates are send directly
from the client, bypassing the screen buffer in xrdp_mm.
This commit only allows the xrdp_mm screen buffer to be invalidated
if the painter has drawn into it since the module was loaded. This
prevents the unused (and invalid) frame buffer being pushed to the client
in GFX mode with xorgxrdp.
Input message 300 to xorgxrdp which communicated a screen size
has been replaced with message 302 which sends a list of monitors
to xorgxrdp. This simplifies the initialisation and resize logic
somewhat, but a compatible version of xorgxrdp must be used
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.
From [MS-RCPBCGR] 3.3.5.12.1:-
> ...The contents of this PDU SHOULD NOT be compressed.
>
> This PDU MUST NOT be sent to a client that has not indicated support for
> it by setting the RNS_UD_CS_SUPPORT_MONITOR_LAYOUT_PDU flag (0x0040)
> in the earlyCapabilityFlags field of the Client Core Data (section
> 2.2.1.3.2).
Also, 2.2.12.1 specifies the source channel must be zero.
In testing, a compressed monitor layout PDU causes mstsc.exe
to exit with a protocol error.
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.
as astyle 3.1 is no longer available in the latest FreeBSD.
Also, astyle upstream repository has been moved to GitLab. Switched git
to obtain astyle source.
https://gitlab.com/saalen/astyle
* 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.
Since v0.9.9, xrdp has assumed that the "drdynvc" static virtual
channel is available for its exclusive use. With GFX support, it
is necessary to codify this to prevent this sequence of operations:-
- NeutrinoRDP target sends DVC Capabilities Request PDU
- target responds wih DVC Capabilities Response PDU
- xrdp processes this, starting the GFX virtual channel again
In the future, if NeutrinoRDP requires access to virtual channels,
data may somehow need to be passed through to the target while being
parsed and handled appropriately within xrdp.
mstsc.exe indicates it supports GFX in the early capability flags, even
if it not able to support 32 BPP. This results in a session failure
if a RDPGFX_CAPS_CONFIRM_PDU is sent on the EGFX virtual channel.
* GFX: sort versions, flags to return the highest version we support in caps advertise
* GFX: simpify swtich in caps_advertise
* GFX: log skipped capability versions in caps_advertise
- Mostly base functions and utilities necessary to enable RFX
Progressive
- Add more EGFX work & mode flags.
- Update encoder.
- Does not yet include caps determination to enable RFX progressive
(yet).
- Update protocol constants