Commit Graph

4114 Commits

Author SHA1 Message Date
matt335672
660ac303f0 Replace various types used for auth_info
The loadable sesman authentication modules use different types for the
authentication handle returned from auth_userpass(). The PAM module
uses a pointer, and the other modules use (effectively) a boolean. Within
sesman itself, a long or tbus (intptr_t) is used.

This PR replaces all of these types with a pointer to an incomplete type.

Consequently:-
- A single better-labelled type is used it all places within sesman so
  it's more obvious what's being handled.
- There is no need to cast the authentication handle within the PAM
  module to a long and back again.
- The compiler can check function signatures between auth.h and the
  various verify modules.
2022-09-16 10:46:53 +01:00
matt335672
e1697879ec
Merge pull request #2364 from seflerZ/touchpad
Enable touchpad inertial scrolling
2022-09-16 10:22:16 +01:00
sefler
cb2b32e6c5 fix code review issues 2022-09-15 23:55:23 +08:00
sefler
9d33b4cbcb fix code style issue 2022-09-15 23:55:23 +08:00
sefler
6cc842b3e6 fix log level 2022-09-15 23:55:23 +08:00
sefler
c2b465880b add some comments and modify gitignore 2022-09-15 23:55:16 +08:00
sefler
c4d6714979 touchpad scrolling works now 2022-09-15 23:53:26 +08:00
matt335672
d80d096e32
Merge pull request #2368 from metalefty/gitignore
gitignore: add some built binaries
2022-09-15 15:17:41 +01:00
Koichiro IWAO
61a58aaad9 gitignore: add some built binaries 2022-09-15 19:45:53 +09:00
matt335672
62167d867e
Merge pull request #2359 from matt335672/freetype2_ci
Add freetype2 to CI
2022-09-06 10:42:06 +01:00
matt335672
02513dbd4b Add freetype2 to CI
The freetype2 library can now be used to create fv1 fonts. This
library is added to the 'max features' CI builds to pick up any
regressions.
2022-09-06 10:32:40 +01:00
matt335672
7354eb6060
Merge pull request #2341 from matt335672/scaled_login_screen
Scaled login screen support
2022-09-06 09:48:09 +01:00
matt335672
e44879740f Update fonts
Replace sans-10.fv1 with a modern version generated with the
new tools.
Also add a sans-18.fv1 for higher DPI monitors.
2022-09-06 09:42:14 +01:00
matt335672
a417ab0542 Add font control variables to xrdp.ini
This commit adds the variables fv1_select and default_dpi to
xrdp.ini. These variables allow for a different font to be
loaded, depending on the DPI of the login screen.
2022-09-06 09:42:14 +01:00
matt335672
d0c8e28d27 Add a scaling capability to the login screen
The dimensions from xrdp.ini are replaced with scaled and unscaled
versions. The unscaled versions are read from the config file, and
then scaled to match the loaded font.

Currently this has no significant effect, as the same font is still
loaded, so the scaling factor is 1.00. However, when a different font
is loaded, the login window can be made larger for use on higher DPI
monitors.
2022-09-06 09:42:14 +01:00
matt335672
36959e593a Add support for new fields in fv1 fonts
The previous commit added utilities which work with fv1 files
with additional fields in the fv1 header (i.e. body_height and
min_descender). This commit makes minor changes to the font loading code
in xrdp so xrdp can read the new font format.
2022-09-06 09:31:47 +01:00
matt335672
90561f7bad Added fontutils/README_fv1.txt 2022-09-06 09:31:47 +01:00
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