mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
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
This commit is contained in:
parent
3bdfbf97b9
commit
18b68e3a84
@ -102,7 +102,11 @@ meta_screen_cast_monitor_stream_src_get_specs (MetaScreenCastStreamSrc *src,
|
|||||||
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
||||||
mode = meta_monitor_get_current_mode (monitor);
|
mode = meta_monitor_get_current_mode (monitor);
|
||||||
|
|
||||||
|
if (meta_is_stage_views_scaled ())
|
||||||
scale = logical_monitor->scale;
|
scale = logical_monitor->scale;
|
||||||
|
else
|
||||||
|
scale = 1.0;
|
||||||
|
|
||||||
*width = (int) roundf (logical_monitor->rect.width * scale);
|
*width = (int) roundf (logical_monitor->rect.width * scale);
|
||||||
*height = (int) roundf (logical_monitor->rect.height * scale);
|
*height = (int) roundf (logical_monitor->rect.height * scale);
|
||||||
*frame_rate = meta_monitor_mode_get_refresh_rate (mode);
|
*frame_rate = meta_monitor_mode_get_refresh_rate (mode);
|
||||||
|
Loading…
Reference in New Issue
Block a user