While here, embed correct file size in BMP file header.
Fixes: #3102
Sponsored by: Krämer Pferdesport GmbH & Co KG
(cherry picked from commit 4968a34cd6)
6257dae74d added a mapping of RDP
scancodes to X11 keycodes to the XUP interface. The intention is
to move this functionality from xorgxrdp to a common lookup
in xrdp.
The mapping of RDP scancodes for extended keys (e.g. Right-CTRL) is
not being done correctly.
In the words of @iskunk
It is no longer possible to refer to the Dvorak layout as just "dvorak"
(as when one would run "setxkbmap dvorak"); one must now use either
"us dvorak" or "us(dvorak)"
See https://bugs.debian.org/1063725
when a multi-monitor session has the top-left vertex of the primary
monitor at a desktop location other than (0,0), minimising and maximising
the session results in the (0,0) co-ordinate of the entire desktop being
placed at the top-left of the primary monitor.
The implementation seems to be at odds with [MS-RDPEGFX] 2.2.2.14 which
suggests the monitorDefArray of the RDPGFX_RESET_GRAPHICS_PDU should be
the same as that in the Monitor Layout PDU ([MS-RDPBCGR] 2.2.12.1)
On a resize, the encoder is deleted. At present this is done by asking
the encoder to exit, and then waiting a second.
- On slower systems, a second may not be enough, and so the encoder
data structures are freed while they are still being used by the
encoder.
- On quicker systems, resizes are delayed by hundreds of milliseconds
longer than they need to be.
This commit adds a wait object which the encoder can use to signal it
has actually finished.
The xrdp_enc_data contains a union for handling surface commands
and gfx commands. Memory processing is different for these two
options.
The default destructor for the encoder FIFO only knows about surface
commands. Consequently, if the encoder has queued GFX data when the
encoder is closed, the destructor processes the queued data as if
it contained surface commands rather than GFX commands. This typically
causes a SEGV as the drects field of the overlaid surface command
structure is not pointing at anything valid when it is freed.
If ./configure is used with devel logging, but without --enable-pixman,
the stub pixman development files are used.
However, in this configuration, the pixman_region_selfcheck() function
is declared, but not defined.
This is a regression introduced in 7e58209b19
The get_sorted_session_displays() is broken in that it
doesn't produce a sorted list of displays.
The problem is the qsort comparison function which has 2 errors in 4 lines:-
1) The test is the wrong way round (i.e. arg1 < arg2 produces a +ve
result instead of -ve)
2) Subtracting two unsigned ints in C will never return < 0
The broken function has been masked by other display checks which mean
that it is only visible in a few situations:-
1) Starting two sessions very closely to each other may allocate the
same display to both sessions.
2) If /tmp is namespaced, the other display checks do not work, and
more than two sessions cannot be started.
For key events, send the X11 keycode (currently based on evdev) to xorgxrdp
rather than the Unicode character mapping for the key. This gives us a
single source of truth for RDP scancode to X11 keycode mapping.
At present xorgxrdp doesn't use the Unicode character, so no change is
required at that end for this commit.
The xrdp-genkeymap utility now requires the libxkbfile-dev
package (or equivalent) to be able to log the setxkbmap
command used to create a keymap file
The initial implementation of Uinicode input via IBus used a startup delay
of 3 seconds to wait for the daemon to be ready before connecting to it.
This commit introduces a poll-wait loop which can remove the delay
entirely if the daemon is up when chansrv starts the interface.
- Fix a problem that the xrdp.service fail to auto-start when instructed to listen on a specific interface
- By changing the "network.target" systemd dependency to "network-online.target"
- The "network-online.target", in short, means at least one network interface has finished IP level setup.
- The previously used "network.target" is vague and does not provide such guarantee (ref: man systemd.special(7)).
- Which often cause "xrdp.service" fail to auto-start when the service is configured to listen on a specific interface (e.g. in xrdp.ini, "port=tcp://192.168.0.1:3389"). Because the interface may have not finish setting up its IP, when "xrdp.service" starts.
1) [Regression] If the specified mountpoint is not immediately below an
existing directory, the directory is not created.
2) The message to ask the user to unmount an existing mounted directory
has been moved to the right place.