Commit Graph

4097 Commits

Author SHA1 Message Date
matt335672 ae6a55dbac Replace Windows font utility with native utilities
To generate new fonts, the freetype2 library is required. This
can now be specified by configure in the usual way. If it's missing,
new fonts cannot be generated.
2022-09-06 09:31:47 +01:00
matt335672 70622bf92b Remove hard-coded values for font sizes.
The font body height is now explicitly stored in the font
structure. This is the definition that would be used for manual
typesetting (i.e. the line spacing). This is used for calculating
the heights of strings.

The window title header has also been increased by 3 pixels from a
hard-coded 18 to (font_height + 5), which now equates to 21 pixels
with the sans-10.fv1 font.
2022-09-06 09:31:47 +01:00
matt335672 9875f0c0d8 Add g_memmove() to os_calls 2022-09-06 09:31:47 +01:00
matt335672 888c2a0434 Font macro updates for adding font utilities 2022-09-06 09:31:47 +01:00
matt335672 c3585adaa0 Merge pull request #2353 from kraj/clang
mark variable with unused attribute for Clang 15
2022-09-06 09:29:35 +01:00
Khem Raj fc2d61e0c8 mark count with unused attribute
This may throw a warning with clang-15+ when devel logs are disabled
Fixes
../../../xrdp-0.9.19/sesman/chansrv/chansrv.c:198:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-05 22:58:07 -07:00
matt335672 b4dd86fadd Merge pull request #2354 from a1346054/fixes
Simple maintenance improvements
2022-09-05 10:39:39 +01:00
a1346054 59f8d9fe07 fix some shellcheck warnings 2022-09-03 02:05:08 +00:00
a1346054 0c942feaff improve test logic 2022-09-03 02:02:14 +00:00
a1346054 5ff68740e5 remove executable bit from text files 2022-09-03 02:02:14 +00:00
a1346054 048e3c9e99 add missing final newline 2022-09-03 02:01:49 +00:00
a1346054 7fe18cc1c0 fix typos 2022-09-03 02:01:48 +00:00
matt335672 5d0c4b4e3a Merge pull request #2350 from matt335672/cppcheck_29
Bumped cppcheck version to 2.9
2022-08-30 11:18:12 +01:00
matt335672 cb75014221 Bumped cppcheck version to 2.9 2022-08-30 10:39:49 +01:00
matt335672 686bb4e075 Merge pull request #2348 from metalefty/sesman-ini
sesman.ini: mention FreeBSD Xorg path
2022-08-27 12:06:29 +01:00
Koichiro IWAO 235d264a02 sesman.ini: mention FreeBSD Xorg path 2022-08-26 13:56:52 +09:00
Nexarian 77a8b64379 Fixing typo in log message. 2022-08-04 01:48:10 -04:00
matt335672 d43821f11f Merge pull request #2310 from matt335672/physical_desktop_size
Parse more physical monitor size information
2022-08-01 08:47:25 +01:00
matt335672 d5445e9dc1 Parse more physical monitor size information
To implement a scalable login screen, we need to be able to ascertain
the DPI of the connected primary monitor.

At present, in a multi-monitor situation, this information is available in
the struct display_size_description, which can be searched for the primary
monitor. This is only the case however if the Display Control Channel
Extension is in use ([MS-RDPEDISP]), and a DISPLAYCONTROL_MONITOR_LAYOUT
has been received.

This PR retrieves physical monitor size information from the following
two additional places.

1) The TS_UD_CS_CORE PDU. Physical size information is optionally
   included in this PDU for single-screen configurations.
2) The TS_UD_CS_MONITOR_EX PDU. This includes physical size
   information for multiple-screen configurations.
2022-07-29 10:48:04 +01:00
Nexarian 682ca95635 Merge pull request #2175 from Nexarian/refactor_resizing_into_state_machine
Refactoring resizing into state machine.
2022-07-11 00:10:35 -04:00
Christopher Pitstick 6f461aa54c Refactoring resizing into state machine.
- Fixes MSTSC resizing (with RFX as well).
- Queue system so that resizes are processed when XRDP and the X server
are ready, not immediately.
- Deletes and recreates the encoder (RFX fix)
- Introduces a dynamic_monitor_description struct that is used for the
queue system.
- Fix some lines previously introduced by the original resizing code to
be 80 chars long, as is the standard for XRDP.
2022-07-10 23:42:30 -04:00
Nexarian 7711978713 Merge pull request #2300 from Nexarian/block_resize_if_already_resized
Block resize if already this size.
2022-07-07 23:49:15 -04:00
Christopher Pitstick d01ce57c5f Block resize if already this size.
While this feature is part of other branches for testing EGFX
integration, it somehow never made it into devel. This should fix
https://github.com/neutrinolabs/xrdp/issues/1928, for real this time!
2022-07-07 23:31:47 -04:00
Nexarian 521e5e0e42 Merge pull request #2301 from Nexarian/update_scaling_factor_handling
Update handling of scale factor
2022-07-04 13:04:31 -04:00
Christopher Pitstick 07dbd0e032 Update handling of scale factor
Looking at 2.2.2.2.1 DISPLAYCONTROL_MONITOR_LAYOUT (https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpedisp/ea2de591-9203-42cd-9908-be7a55237d1c),
the way we were handling it was slightly off. device_scale_factor and
desktop_scale_factor are interdependent. If either one is out of spec,
both are set to default. That wasn't how it was previously being handled.
2022-07-02 18:28:59 -04:00
Nexarian eeb5daa338 Merge pull request #2291 from Nexarian/fix_mstsc_resize_bug
Fixes MSTSC resize issue/crash
2022-06-26 22:58:54 -04:00
Christopher Pitstick 965dbdedb7 Fixes MSTSC resize issue/crash
The RFX compression mode requires an encoder. When you resize RFX, you
have to recreate the encoder.

This will fix it as well: https://github.com/neutrinolabs/xrdp/pull/2175,
however, that PR is bigger and more complex and may take longer.
2022-06-25 22:37:11 -04:00
metalefty 55215cf271 Merge pull request #2275 from metalefty/ulalaca
Add ulalaca
2022-05-28 23:01:22 +09:00
matt335672 ab4daf4064 Merge pull request #2282 from metalefty/sesman-log
sesman: fix spacing in log
2022-05-28 11:05:46 +01:00
Koichiro IWAO a275c1de92 configure: ulalaca is still experimental 2022-05-28 01:40:21 +09:00
Koichiro IWAO 2c25e60abc sesman: fix spacing in log
[20220301-18:25:01] [INFO ] Starting window manager on display 12from user home directory: /home/user/startwm.sh
                                                                ^^
2022-05-28 01:27:47 +09:00
matt335672 559ab8f809 Merge pull request #2281 from matt335672/update_action
github actions: use canonical way to get ImageOS for astyle
2022-05-27 12:37:35 +01:00
matt335672 be2b778bae github actions: use canonical way to get ImageOS for astyle 2022-05-27 11:55:22 +01:00
matt335672 690d9e88d3 Merge pull request #2278 from matt335672/cppcheck_28
Bump cppcheck version to 2.8
2022-05-27 11:21:43 +01:00
matt335672 8236cda6a6 github actions: use canonical way to get ImageOS 2022-05-25 11:17:30 +01:00
matt335672 d8669a2998 Bump cppcheck version to 2.8 2022-05-23 12:59:01 +01:00
Koichiro IWAO 52f4920af8 Update submodule, obrain cppcheck fixes 2022-05-20 16:09:51 +09:00
matt335672 a64573b596 Merge pull request #2276 from matt335672/xrdpapi_simple
Update xrdpapi/simple.c example to work with new logging
2022-05-19 13:32:41 +01:00
matt335672 dabd049ad2 Add xrdpapi/simple.c to the CI 2022-05-19 13:25:00 +01:00
matt335672 58573c4110 Update xrdpapi/simple.c for new logging 2022-05-19 13:20:00 +01:00
matt335672 6c4bdf7d5e Merge pull request #2251 from matt335672/refactor_ip_addr_handling
Refactor ip address handling
2022-05-19 10:59:26 +01:00
Koichiro IWAO 38bf969a46 bootstrap: checkout ulalaca submodule if missing 2022-05-19 12:47:39 +09:00
Koichiro IWAO 8d88fe7a83 Add ulalaca to build 2022-05-19 12:10:05 +09:00
Koichiro IWAO d0197b7124 Add ulalaca submodule 2022-05-19 12:07:20 +09:00
matt335672 3e488773d7 Updated session allocation policy for sesman
Made session allocation policies more readable and maintainable.

The 'C' policy which was confusing before has been replaced with the
'Separate' keyword. This is a public interface change, but is unlikely
to affect many users.

The logging in session_get_bydata() is substantially improved, making
it far easier to spot why sessions are getting matched or not matched.
2022-05-18 12:35:07 +01:00
matt335672 a16695efd4 Added unit tests for bitmask<->charstr calls 2022-05-18 12:35:07 +01:00
matt335672 61bfb264de Add bitmask to character string conversions 2022-05-18 12:35:07 +01:00
matt335672 c1d2dcfc7f Cosmetic fixes to string_calls 2022-05-18 12:35:07 +01:00
matt335672 a4c6c36cf2 Add PAM_RHOST support
Supplies the IP address that an authentication event is
received from as the PAM parameter PAM_RHOST for PAM-capable systems.
2022-05-18 12:35:07 +01:00
matt335672 79bec8110c Unify connection fields for the connected client
The connected client is currently described in two places in
the xrdp_client_info structure:-

1) In the connection_description field. This was introduced as
   field client_ip by commit d797b2cf49
   for xrdp v0.6.0

2) In the client_addr and client_port fields introduced by commit
   25369460a1 for xrdp v0.8.0

This commit unifies these two sets of fields into a single
set of fields describing the connection IP and port (for
AF_INET/AF_INET6 connections only) and a connection description
for all connection types.

The code in os_calls to provide client logging has been simplified
somewhat which should make it easier to add new connection types (e.g.
AF_VSOCK).

The old connection_description field used to be passed to sesman to
inform sesman of the IP address of the client, and also to provide
a string for 'C' field session policy matching. 'C' field session policy
matching does not actually need this string (see #2239), and so now only
the IP field is passed to sesman.
2022-05-18 12:35:07 +01:00