forked from pool/mutter
Rebased and tweaked OBS-URL: https://build.opensuse.org/request/show/677986 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=310
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From 1c57a5842069735b7bb80846130bf61d0e0a0880 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
Date: Fri, 25 Jan 2019 21:06:39 +0000
|
|
Subject: [PATCH] screen-cast: Fix monitor recording on HiDPI
|
|
|
|
It scaled the logical monitor rect with scale to get the stream
|
|
dimensions, but that is only valid when having
|
|
'scale-monitor-framebuffers' enabled. Even when it was, it didn't work
|
|
properly, as clutter_stage_capture_into() doesn't work properly with
|
|
scaled monitor framebuffers yet.
|
|
|
|
https://gitlab.gnome.org/GNOME/mutter/merge_requests/415
|
|
|
|
|
|
(cherry picked from commit 3fa6a92cc5dda6ab3939c3e982185f6caf453360)
|
|
---
|
|
src/backends/meta-screen-cast-monitor-stream-src.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c b/src/backends/meta-screen-cast-monitor-stream-src.c
|
|
index 382d7d4a2..093e9f236 100644
|
|
--- a/src/backends/meta-screen-cast-monitor-stream-src.c
|
|
+++ b/src/backends/meta-screen-cast-monitor-stream-src.c
|
|
@@ -87,7 +87,11 @@ meta_screen_cast_monitor_stream_src_get_specs (MetaScreenCastStreamSrc *src,
|
|
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
|
mode = meta_monitor_get_current_mode (monitor);
|
|
|
|
- scale = logical_monitor->scale;
|
|
+ if (meta_is_stage_views_scaled ())
|
|
+ scale = logical_monitor->scale;
|
|
+ else
|
|
+ scale = 1.0;
|
|
+
|
|
*width = (int) roundf (logical_monitor->rect.width * scale);
|
|
*height = (int) roundf (logical_monitor->rect.height * scale);
|
|
*frame_rate = meta_monitor_mode_get_refresh_rate (mode);
|
|
--
|
|
2.18.1
|
|
|