Commit Graph

110 Commits

Author SHA1 Message Date
matt335672
84fd2a510b Start the drdynvc channel within xrdp_wm
The responsibility for starting the drdynvc channel is moved out of
libxrdp into the application. This will make it easier to allow the
application to check the channel is enabled before starting it.
2024-03-15 10:31:46 +00:00
matt335672
74c2f7c4a7 Rework xrdp to support new module resize interface
This commit compiles.
2024-02-21 00:14:26 +09:00
matt335672
e00236193f Fixes some problems with monitor hotplug
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.
2024-02-21 00:14:26 +09:00
matt335672
54acca43cf Resize state machine: A fix and a question (#2929)
* 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.
2024-01-31 19:08:29 -05:00
Jay Sorg
c250529e8e add large cursor support, posix shm 2023-05-16 10:20:24 -07:00
Nexarian
edb8fa7946 Add planar compression
Used for the bitmaps transmitted for the login screen over the egfx
channels.
2023-03-15 22:17:05 -04:00
Nexarian
5273624089 Fixing some comments 2023-03-14 02:02:09 -04:00
Koichiro IWAO
1b2e1b9a48 Constify some magic numbers
- CMDTYPE_FRAME_MARKER
- FASTPATH_UPDATETYPE_SURFCMDS
2022-11-11 11:41:46 +09: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
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
matt335672
7cfd3bb3d8 Fix off-by-one errors in monitor resize logic 2022-04-08 12:11:14 +01:00
Christopher Pitstick
bd9147d18f Updating to refactor xrdp_client_info
- Eliminate duplicaiton for display_size_description
- monitorCount needs to be uint32_t
- width/height -> session_width/session_height
- Update CLIENT_INFO_CURRENT_VERSION
- Also some misc unit test updates.
- Minor log updates.
2022-03-27 16:38:32 -04:00
Christopher Pitstick
4a0db63be7 Unify monitor processing logic.
There are two places where monitor descriptions are passed through the
RDP protocol:

- TS_UD_CS_MONITOR ([MS-RDPBCGR] 2.2.1.3.6 Client Monitor Data)
- DISPLAYCONTROL_PDU_TYPE_MONITOR_LAYOUT ([MS-RDPEDISP] 2.2.2.2)

The processing logic for both of them is similar enough that they should be unified.

Also update to define the constants for the maximum and minimum desktop width/height for monitors and total area.

Also a large number of clarifications for the constants and protocol
requirements.

Note that this is also the first step to making resizing work with the extension GFX channel as well as an important
foundational step to enable HiDPI compatibility.

Also some misc logging updates.
2022-03-26 23:45:16 -04:00
matt335672
f64c824a78 Set stream size correctly before adding TS_SURFCMD_STREAM_SURF_BITS header 2021-11-30 11:04:57 +00:00
matt335672
94cda679f5 Added libxrdp_get_channel_count() 2021-02-04 10:29:56 +00:00
aquesnel
0ec471b02d
Add detailed logging to libxrdp (#1742)
* Added s_rem(s) for getting the remaining bytes in a stream
* Added s_rem_out() macro
* Fixed 15bpp pointer error checking
* Combined the 512 and 2048 bit certificate sending  code paths
* Other detailed comments and logging added following MS-RDPBCGR
2021-02-04 10:11:54 +00:00
Alexandre Quesnel
87c89f0aa2 Fixing TS_PLAY_SOUND_PDU_DATA to set the correct frequency and duration 2021-01-23 22:57:15 +00:00
metalefty
bba65b3592
Merge pull request #1738 from aquesnel/unify_logging_libxrdp
Unify logging in libxrdp
2020-12-23 09:59:21 +09:00
matt335672
0a1a8f40e5 Moved a lot of string funcs to string_calls module 2020-12-22 11:57:24 +00:00
Alexandre Quesnel
a82ee03d4d Changing LOG_DEVEL to LOG to avoid silent failures. 2020-12-05 19:22:50 +00:00
Alexandre Quesnel
2d6d249f76 Fixing code formatting with astyle 2020-11-30 05:04:11 +00:00
Alexandre Quesnel
51905d765a Migrating logging to LOG() and LOG_DEVEL() in libxrdp/* 2020-11-30 05:04:10 +00:00
matt335672
ebc21fe180 Added -c / --config to xrdp 2020-10-16 10:55:23 +01:00
matt335672
3c4b42b1aa Implemented resize and multimon support for VNC backend 2020-06-04 15:10:35 +01:00
matt335672
81e037e964 Prevent chansrv input channels being scanned during a server reset 2020-06-03 11:57:25 +01:00
matt335672
da3114007c Address possible memory out-of-bounds accesses 2020-04-15 09:57:05 +01:00
matt335672
6f881d47d3 Rationalise ms- constants
Constants from MS documents (MS-RDPBCGR etc) moved out of
common/xrdp_constants.h into includes named after the documents.

Similar includes moved from sesman/chansrv to the common area.
2020-01-06 15:46:37 +00:00
Koichiro IWAO
0e9e25f100
use MS name for PDU types
RDP_PDU_REDIRECT has been removed as it is not found in MS-RDPBCGR and
not used anywhere.
2018-12-12 17:40:58 +09:00
jsorg71
ae1514c167
dynamic virtual channel improvements
remove not used chansrv <-> xrdp messages
move static channel disable control into libxrdp
remove some blocking read, write chansrv calls
add drdynvc calls to libxrdp
add drdynvc calls to chansrv
channel cleanup
2018-10-11 22:09:20 -07:00
daixj
828079b442 libxrdp: fix memory leak 2018-02-13 16:44:37 +09:00
Pavel Roskin
6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin
0bb048d35e Fix several cases of discarding return values 2017-01-25 23:22:29 -08:00
Idan Freiberg
482671fd18 Merge pull request #625 from speidy/proxy_session_info
Pass session info in proxy mode
2017-01-23 08:15:18 +02:00
Jay Sorg
6f74efa70a add session_info
Conflicts:
	libxrdp/libxrdp.h
2017-01-15 08:20:50 +02:00
speidy
6810aa3f79 libxrdp: libxrdp_send_to_channel, improve error message 2017-01-06 08:32:30 +02:00
metalefty
1753f6317c Merge pull request #550 from jsorg71/bitmap_update
fixes for bitmap update
2016-12-20 17:01:32 +09:00
Jay Sorg
74ec00a6a6 some code cleanup 2016-12-15 21:52:05 -08:00
Jay Sorg
81e72fc99c code cleanup, add some comments 2016-12-15 14:47:37 -08:00
Jay Sorg
519359a823 fixes for bitmap update 2016-12-15 00:39:13 -08:00
speidy
d6a470e973 libxrdp: improve messages 2016-12-13 14:31:27 -05:00
speidy
8a0fec5e66 o send RFX tiles as stream (Stream Surface Bits Command)
o silent frame ack logging
o support surface commands in capsets
o fix some wrong constants
2016-12-08 20:12:00 -05:00
Pavel Roskin
aeeb3d2c2e Fix warnings detected by -Wwrite-strings 2016-07-08 04:29:42 +00:00
Pavel Roskin
ae5bb5bf9c Fix incorrect use of "it's" and "its", adjust wording 2016-06-21 16:30:15 -07:00
Pavel Roskin
ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
Jay Sorg
38241f2a0b Fix all format warnings and some unused variable warnings 2016-03-14 17:04:08 -07:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Pavel Roskin
964e860072 Run through codespell 2016-01-14 08:47:50 -08:00
Jay Sorg
914b4acf39 fix for libxrdp_reset 2015-07-11 00:13:50 -07:00
Jay Sorg
33167a7c74 add frame acks and h264 codec mode basics 2015-03-28 18:34:25 -07:00