[mutter/gnome-3-22] MetaOnscreenNative: fix mirror mode with stage views
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-22] MetaOnscreenNative: fix mirror mode with stage views
- Date: Tue, 18 Oct 2016 12:25:45 +0000 (UTC)
commit 32877118c3d24ca4a7bfbcfaff2ff49c0d0ff5b5
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Oct 17 18:37:31 2016 +0200
MetaOnscreenNative: fix mirror mode with stage views
Using the view's MetaMonitorInfo to find all the crtcs which should be
configured to display a given onscreen doesn't work unfortunately. The
association runs only the other way around, i.e. we need to go through
each crtc and find the ones corresponding to our monitor info.
https://bugzilla.gnome.org/show_bug.cgi?id=773115
src/backends/native/meta-renderer-native.c | 30 ++++++++++++++++-----------
1 files changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index b4c93c4..67bd635 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -466,16 +466,19 @@ meta_onscreen_native_set_crtc_modes (MetaOnscreenNative *onscreen_native)
monitor_info = meta_renderer_view_get_monitor_info (view);
if (monitor_info)
{
- int i;
+ unsigned int i;
- for (i = 0; i < monitor_info->n_outputs; i++)
+ for (i = 0; i < monitor_manager->n_crtcs; i++)
{
- MetaOutput *output = monitor_info->outputs[i];
- int x = output->crtc->rect.x - monitor_info->rect.x;
- int y = output->crtc->rect.y - monitor_info->rect.y;
+ MetaCRTC *crtc = &monitor_manager->crtcs[i];
+ int x = crtc->rect.x - monitor_info->rect.x;
+ int y = crtc->rect.y - monitor_info->rect.y;
+
+ if (crtc->logical_monitor != monitor_info)
+ continue;
meta_monitor_manager_kms_apply_crtc_mode (monitor_manager_kms,
- output->crtc,
+ crtc,
x, y,
next_fb_id);
}
@@ -530,16 +533,19 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
monitor_info = meta_renderer_view_get_monitor_info (view);
if (monitor_info)
{
- int i;
+ unsigned int i;
- for (i = 0; i < monitor_info->n_outputs; i++)
+ for (i = 0; i < monitor_manager->n_crtcs; i++)
{
- MetaOutput *output = monitor_info->outputs[i];
- int x = output->crtc->rect.x - monitor_info->rect.x;
- int y = output->crtc->rect.y - monitor_info->rect.y;
+ MetaCRTC *crtc = &monitor_manager->crtcs[i];
+ int x = crtc->rect.x - monitor_info->rect.x;
+ int y = crtc->rect.y - monitor_info->rect.y;
+
+ if (crtc->logical_monitor != monitor_info)
+ continue;
meta_onscreen_native_flip_crtc (onscreen_native, flip_closure,
- output->crtc, x, y,
+ crtc, x, y,
&fb_in_use);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]