kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0001-screen-cast-Fix-monitor-recording-on-HiDPI.patch

776610
From 3fa6a92cc5dda6ab3939c3e982185f6caf453360 Mon Sep 17 00:00:00 2001
776610
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
776610
Date: Fri, 25 Jan 2019 22:06:39 +0100
776610
Subject: [PATCH] screen-cast: Fix monitor recording on HiDPI
776610
776610
It scaled the logical monitor rect with scale to get the stream
776610
dimensions, but that is only valid when having
776610
'scale-monitor-framebuffers' enabled. Even when it was, it didn't work
776610
properly, as clutter_stage_capture_into() doesn't work properly with
776610
scaled monitor framebuffers yet.
776610
776610
https://gitlab.gnome.org/GNOME/mutter/merge_requests/415
776610
---
776610
 src/backends/meta-screen-cast-monitor-stream-src.c | 6 +++++-
776610
 1 file changed, 5 insertions(+), 1 deletion(-)
776610
776610
diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c b/src/backends/meta-screen-cast-monitor-stream-src.c
776610
index 897b86ae6..036c573a5 100644
776610
--- a/src/backends/meta-screen-cast-monitor-stream-src.c
776610
+++ b/src/backends/meta-screen-cast-monitor-stream-src.c
776610
@@ -102,7 +102,11 @@ meta_screen_cast_monitor_stream_src_get_specs (MetaScreenCastStreamSrc *src,
776610
   logical_monitor = meta_monitor_get_logical_monitor (monitor);
776610
   mode = meta_monitor_get_current_mode (monitor);
776610
 
776610
-  scale = logical_monitor->scale;
776610
+  if (meta_is_stage_views_scaled ())
776610
+    scale = logical_monitor->scale;
776610
+  else
776610
+    scale = 1.0;
776610
+
776610
   *width = (int) roundf (logical_monitor->rect.width * scale);
776610
   *height = (int) roundf (logical_monitor->rect.height * scale);
776610
   *frame_rate = meta_monitor_mode_get_refresh_rate (mode);
776610
-- 
776610
2.20.1
776610