diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 294330f..89acaae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,3 +3,5 @@ include: project: QubesOS/qubes-continuous-integration - file: /r4.3/gitlab-host.yml project: QubesOS/qubes-continuous-integration +- file: /r4.3/gitlab-vm.yml + project: QubesOS/qubes-continuous-integration diff --git a/.qubesbuilder b/.qubesbuilder index 625e9c2..8bf6f63 100644 --- a/.qubesbuilder +++ b/.qubesbuilder @@ -2,6 +2,10 @@ host: rpm: build: - xorg-x11-server.spec +vm: + rpm: + build: + - xorg-x11-server.spec source: files: - url: https://www.x.org/pub/individual/xserver/xorg-server-@VERSION@.tar.xz diff --git a/0001-Xephyr-fix-setting-physical-output-size.patch b/0001-Xephyr-fix-setting-physical-output-size.patch new file mode 100644 index 0000000..9130a65 --- /dev/null +++ b/0001-Xephyr-fix-setting-physical-output-size.patch @@ -0,0 +1,120 @@ +From 6bd9aec85f329def9ed97956d13f990bb8fbd7eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Wed, 17 Jun 2026 20:22:20 +0200 +Subject: [PATCH] Xephyr: fix setting physical output size +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Providing physical size via RRRegisterSize() is not enough - physical +size is a property of the output, not resolution and needs to be set +separately. Furhermore, get the physical output size using RandR if +-output is used, to match specific output, not the whole screen. + +With this, `Xephyr -output OUTPUT_NAME` properly copies not only +resolution but also physical size of the named output. + +Signed-off-by: Marek Marczykowski-Górecki +--- + hw/kdrive/ephyr/ephyr.c | 8 ++++++++ + hw/kdrive/ephyr/ephyr.h | 1 + + hw/kdrive/ephyr/hostx.c | 15 +++++++++++---- + hw/kdrive/ephyr/hostx.h | 3 ++- + 4 files changed, 22 insertions(+), 5 deletions(-) + +diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c +index 069270219..e62c46912 100644 +--- a/hw/kdrive/ephyr/ephyr.c ++++ b/hw/kdrive/ephyr/ephyr.c +@@ -453,6 +453,14 @@ ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations) + screen->width, + screen->height, screen->width_mm, screen->height_mm); + ++ if (hostx_want_fullscreen()) { ++ RROutputPtr pOutput = RRFirstOutput(pScreen); ++ if (pOutput) ++ RROutputSetPhysicalSize(pOutput, ++ scrpriv->win_width_mm, ++ scrpriv->win_height_mm); ++ } ++ + randr = KdSubRotation(scrpriv->randr, screen->randr); + + RRSetCurrentConfig(pScreen, randr, 0, pSize); +diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h +index 8833de8a9..67e24b3e8 100644 +--- a/hw/kdrive/ephyr/ephyr.h ++++ b/hw/kdrive/ephyr/ephyr.h +@@ -76,6 +76,7 @@ typedef struct _ephyrScrPriv { + Bool win_explicit_position; + int win_x, win_y; + int win_width, win_height; ++ int win_width_mm, win_height_mm; + int server_depth; + const char *output; /* Set via -output option */ + unsigned char *fb_data; /* only used when host bpp != server bpp */ +diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c +index b7ac56d50..78e957176 100644 +--- a/hw/kdrive/ephyr/hostx.c ++++ b/hw/kdrive/ephyr/hostx.c +@@ -238,7 +238,8 @@ hostx_want_preexisting_window(KdScreenInfo *screen) + void + hostx_get_output_geometry(const char *output, + int *x, int *y, +- int *width, int *height) ++ int *width, int *height, ++ int *width_mm, int *height_mm) + { + int i, name_len = 0, output_found = FALSE; + char *name = NULL; +@@ -331,6 +332,8 @@ hostx_get_output_geometry(const char *output, + *y = crtc_info_r->y; + *width = crtc_info_r->width; + *height = crtc_info_r->height; ++ *width_mm = output_info_r->mm_width; ++ *height_mm = output_info_r->mm_height; + + free(crtc_info_r); + } +@@ -628,8 +631,10 @@ hostx_init(void) + "(ctrl+shift grabs mouse and keyboard)"); + + if (HostX.use_fullscreen) { +- scrpriv->win_width = xscreen->width_in_pixels; +- scrpriv->win_height = xscreen->height_in_pixels; ++ scrpriv->win_width = xscreen->width_in_pixels; ++ scrpriv->win_height = xscreen->height_in_pixels; ++ scrpriv->win_width_mm = xscreen->width_in_millimeters; ++ scrpriv->win_height_mm = xscreen->height_in_millimeters; + + hostx_set_fullscreen_hint(); + } +@@ -638,7 +643,9 @@ hostx_init(void) + &scrpriv->win_x, + &scrpriv->win_y, + &scrpriv->win_width, +- &scrpriv->win_height); ++ &scrpriv->win_height, ++ &scrpriv->win_width_mm, ++ &scrpriv->win_height_mm); + + HostX.use_fullscreen = TRUE; + hostx_set_fullscreen_hint(); +diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h +index 8b3caf245..00891a07a 100644 +--- a/hw/kdrive/ephyr/hostx.h ++++ b/hw/kdrive/ephyr/hostx.h +@@ -84,7 +84,8 @@ xcb_cursor_t + void + hostx_get_output_geometry(const char *output, + int *x, int *y, +- int *width, int *height); ++ int *width, int *height, ++ int *width_mm, int *height_mm); + + void + hostx_use_fullscreen(void); +-- +2.54.0 + diff --git a/version b/version index 7ddb47f..51e4dc9 100644 --- a/version +++ b/version @@ -1 +1 @@ -21.1.21 +21.1.23 diff --git a/xorg-server-21.1.21.tar.xz.sha512 b/xorg-server-21.1.21.tar.xz.sha512 deleted file mode 100644 index 5940696..0000000 --- a/xorg-server-21.1.21.tar.xz.sha512 +++ /dev/null @@ -1 +0,0 @@ -bb2eb4e6756eb9e38b61bd47c017da44bcf5f45f2b7a906b4bb3a56b3d791cec64abb9bf37b224efe1e4fab9cc296f3672c9b2f8e00e1cdfc54337bef63cd16c diff --git a/xorg-server-21.1.23.tar.xz.sha512 b/xorg-server-21.1.23.tar.xz.sha512 new file mode 100644 index 0000000..8259aa5 --- /dev/null +++ b/xorg-server-21.1.23.tar.xz.sha512 @@ -0,0 +1 @@ +7eae854af1b5db1f5d1e59cb9d26b86d98fa176d4f80f70935c707f17982d0446a0a8ad8d29c922edbd208435f995b027604fbb72e62a7bf3ba79f2f570aa0bb diff --git a/xorg-x11-server.spec.in b/xorg-x11-server.spec.in index 15e40ca..8cbfaa9 100644 --- a/xorg-x11-server.spec.in +++ b/xorg-x11-server.spec.in @@ -45,6 +45,8 @@ Patch3: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch Patch6: 0001-xfree86-fix-enumerating-resolutions-on-NovaCustom-V5.patch # backport necessary for the above patch to be effective Patch7: 0002-hw-xfree86-re-calculate-the-clock-and-refresh-rate.patch +# needed for proper DPI detection in sys-gui +Patch8: 0001-Xephyr-fix-setting-physical-output-size.patch BuildRequires: bison BuildRequires: flex @@ -346,6 +348,7 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete # Remove unwanted files/dirs find %{buildroot} -type f -name '*.la' -delete +%files %files common %doc COPYING