Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authormatt335672 <30179339+matt335672@users.noreply.github.com>2022-07-06 13:04:44 +0300
committermatt335672 <30179339+matt335672@users.noreply.github.com>2022-07-29 12:48:04 +0300
commitd5445e9dc10c3d78342aa78cd6abd1b71bdba9ea (patch)
tree2a656fedf0b96a6bac3e6303d7ade70c13c26a4d /common
parent682ca95635edd7e388250c612ef7d6b59b7736d5 (diff)
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.
Diffstat (limited to 'common')
-rw-r--r--common/ms-rdpbcgr.h1
-rw-r--r--common/xrdp_client_info.h10
2 files changed, 10 insertions, 1 deletions
diff --git a/common/ms-rdpbcgr.h b/common/ms-rdpbcgr.h
index e993c270..6129f98f 100644
--- a/common/ms-rdpbcgr.h
+++ b/common/ms-rdpbcgr.h
@@ -57,6 +57,7 @@
#define SEC_TAG_CLI_CHANNELS 0xc003 /* CS_CHANNELS? */
#define SEC_TAG_CLI_4 0xc004 /* CS_CLUSTER? */
#define SEC_TAG_CLI_MONITOR 0xc005 /* CS_MONITOR */
+#define SEC_TAG_CLI_MONITOR_EX 0xc008 /* CS_MONITOR_EX */
/* Client Core Data: colorDepth, postBeta2ColorDepth (2.2.1.3.2) */
#define RNS_UD_COLOR_4BPP 0xCA00
diff --git a/common/xrdp_client_info.h b/common/xrdp_client_info.h
index bf57de09..6ba13d3f 100644
--- a/common/xrdp_client_info.h
+++ b/common/xrdp_client_info.h
@@ -38,7 +38,8 @@ struct monitor_info
int bottom;
int flags;
- /* From 2.2.2.2.1 DISPLAYCONTROL_MONITOR_LAYOUT */
+ /* From [MS-RDPEDISP] 2.2.2.2.1 DISPLAYCONTROL_MONITOR_LAYOUT, or
+ * [MS-RDPBCGR] 2.2.1.3.9.1 (TS_MONITOR_ATTRIBUTES) */
unsigned int physical_width;
unsigned int physical_height;
unsigned int orientation;
@@ -205,6 +206,13 @@ struct xrdp_client_info
/* xrdp.override_* values */
struct xrdp_keyboard_overrides xrdp_keyboard_overrides;
+
+ /* These values are optionally send over as part of TS_UD_CS_CORE.
+ * They can be used as a fallback for a single monitor session
+ * if physical sizes are not available in the monitor-specific
+ * data */
+ unsigned int session_physical_width; /* in mm */
+ unsigned int session_physical_height; /* in mm */
};
/* yyyymmdd of last incompatible change to xrdp_client_info */