mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
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
This commit is contained in:
parent
6567e235a4
commit
32877118c3
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user