Commit Graph

4842 Commits

Author SHA1 Message Date
matt335672
620f3b6220 Pass KBDFLAGS_EXTENDED1 flag for FP scancode events
The current fastpath code for scancode events is not mapping
the FASTPATH_INPUT_KBDFLAGS_EXTENDED1 flag to the KBDFLAGS_EXTENDED1
flag.
2024-06-12 16:20:12 +01:00
matt335672
96168ff918 Fix lookup of extended keys
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.
2024-06-12 16:16:47 +01:00
matt335672
a5a7ccc660
Merge pull request #3112 from matt335672/fix_dvorak_layout
Replace 'dvorak' keyboard description with 'us(dvorak)'
2024-06-12 14:08:02 +01:00
matt335672
a1b7c17906 Replace 'dvorak' keyboard description with 'us(dvorak)'
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
2024-06-12 10:46:32 +01:00
matt335672
095f0d0e4c Fix min/max monitor placing issue
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)
2024-06-10 20:01:56 +01:00
matt335672
6fa941e208
Merge pull request #3107 from matt335672/fix_resize_crash
Fix GFX resize crash
2024-06-10 18:50:09 +01:00
matt335672
985b0de35e Add explicit object for the encoder finishing
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.
2024-06-03 16:00:31 +01:00
matt335672
809df89c08 Prevent SEGV when resizing with GFX
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.
2024-06-03 15:50:16 +01:00
matt335672
8048a63b49
Merge pull request #3106 from matt335672/fix_link_error_on_devel_all
Fix build with devel logging, but without --enable-pixman
2024-06-03 13:33:42 +01:00
matt335672
f38e215de5 Fix build with devel logging, but without --enable-pixman
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
2024-06-03 11:46:08 +01:00
matt335672
c98289732e
Merge pull request #3103 from matt335672/fix_display_list
Fix session list processing
2024-06-03 09:42:28 +01:00
matt335672
5c4278ccb1
Merge pull request #3090 from matt335672/remove_ibus_daemon_delay
Remove the wait for the ibus daemon to start
2024-06-01 10:41:19 +01:00
matt335672
70f1b685ba Fix session list processing
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.
2024-06-01 10:31:58 +01:00
matt335672
c47a87e8e6
Merge pull request #3104 from matt335672/freebsd_13_3
Bump FreeBSD CI version to 13.3
2024-06-01 10:31:18 +01:00
matt335672
cbaaf221cd Bump FreeBSD CI version to 13.3 2024-06-01 10:20:03 +01:00
matt335672
5f91eec695 Remove duplicate enable&disable func registration 2024-05-30 12:19:20 +01:00
jsorg71
00332aca17
Merge pull request #3073 from jsorg71/x264
add GFX h264 software via --enable-x264
2024-05-28 11:18:57 -07:00
Jay Sorg
4dcf59c8f4 remove some unnecessary code 2024-05-28 10:57:55 -07:00
Jay Sorg
2bed4f6b9b rename old_capture_code to mark unused 2024-05-28 10:57:55 -07:00
Jay Sorg
485e64ee76 fix for odd width, height 2024-05-28 10:57:55 -07:00
Jay Sorg
112a534f4c change capture_code to enum 2024-05-28 10:57:55 -07:00
Jay Sorg
96ff6fdba8 multimon fixes 2024-05-28 10:57:55 -07:00
Jay Sorg
57ed8e9d52 format 2024-05-28 10:57:55 -07:00
Jay Sorg
b583a8d510 xrdp_encoder.c changes for x264 2024-05-28 10:57:55 -07:00
Jay Sorg
ab97002c22 add xrdp_encoder_x264.c/h 2024-05-28 10:57:55 -07:00
Jay Sorg
e5e56a2ed9 add x264 to configure.ac 2024-05-28 10:57:55 -07:00
matt335672
e622f0512b
Merge pull request #3039 from matt335672/move_to_evdev
Restructure keymap files
2024-05-24 16:58:41 +01:00
matt335672
3d5c8822a1 Fix keyload load errors detected by unit testing
The code to clear the memory for the key mappings was incorrect,
due to array type decaying to a pointer
2024-05-24 16:34:31 +01:00
matt335672
4d91771cac Add basic keymap loading test 2024-05-24 16:34:30 +01:00
matt335672
8ffd75e8d1 Update manpages for new mapping files
A new manpage describing the new file format for the keyboard mapping
files is added.
2024-05-24 16:34:30 +01:00
matt335672
bd49d2f690 Regenerate keymap files in new format 2024-05-24 16:34:19 +01:00
matt335672
6257dae74d Send X11 keycode to xorgxrdp
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.
2024-05-24 16:33:08 +01:00
matt335672
1cb2ce06cd Update xrdp to use new keymap file format 2024-05-24 16:33:08 +01:00
matt335672
7301b505c9 Restructured genkeymap/dump-keymaps.sh 2024-05-24 16:33:08 +01:00
matt335672
2be49f3d73 Update CI dependencies
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
2024-05-24 16:33:08 +01:00
matt335672
fe410a595d Update genkeymap executable to use new format 2024-05-24 16:33:08 +01:00
matt335672
b0cfc1a12b Add initial scancode module 2024-05-24 16:33:08 +01:00
matt335672
c12c475e04 Add devel logging for key events 2024-05-24 16:33:08 +01:00
matt335672
d32737a993
Merge pull request #3022 from sasha0552/devel
Add mappings for media keys (VNC)
2024-05-24 16:24:15 +01:00
matt335672
f0069456f9 Remove the wait for the ibus daemon to start
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.
2024-05-23 16:35:53 +01:00
matt335672
de5711637f
Merge pull request #3086 from schen0x/devel
Fix a systemd dependency ("network-online.target")
2024-05-23 11:28:17 +01:00
Schen
21e11de157 Fix a systemd dependency ("network-online.target")
- 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.
2024-05-22 19:11:39 +09:00
matt335672
640411dd39
Merge pull request #3082 from matt335672/chansrv_fuse_fixes
chansrv FUSE fixes
2024-05-21 14:21:31 +01:00
matt335672
e0a1339b34 chansrv FUSE fixes
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.
2024-05-21 12:33:17 +01:00
matt335672
98d0003715
Merge pull request #3058 from seflerZ/unicode_contr
Add ibus unicode input support
2024-05-20 12:27:52 +01:00
sefler
cad94531da fix tab 2024-05-15 00:05:17 +08:00
sefler
d512b0dbc0 add missing "break" statement 2024-05-14 23:59:38 +08:00
seflerZ
c53662e3c1 apply xrdp_caps.c patach written by mattt 2024-05-09 11:25:08 +08:00
matt335672
33670aed48
Merge pull request #3057 from chipitsine/asan
CI: add a job with address sanitizer enabled
2024-05-08 11:20:09 +01:00
Ilia Shipitsin
bc71ac22f5 CI: add a job with address sanitizer enabled 2024-05-07 15:02:33 +02:00