mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
monitor-tiled: Derive the dimension from what was configured
Previously, the size of the logical monitor was derived directly from the tiling information. This works fine until we add transformations, or set modes with a dimension different from the resulting resolution when tiled. Fix this by traversing the assigned CRTC rects, as these are already transformed by the configuration system. https://bugzilla.gnome.org/show_bug.cgi?id=779745
This commit is contained in:
parent
4f386e5131
commit
4cfcd4bce0
@ -702,11 +702,12 @@ meta_monitor_tiled_derive_dimensions (MetaMonitor *monitor,
|
||||
MetaMonitorPrivate *monitor_priv =
|
||||
meta_monitor_get_instance_private (monitor);
|
||||
GList *l;
|
||||
int width;
|
||||
int height;
|
||||
int min_x, min_y, max_x, max_y;
|
||||
|
||||
width = 0;
|
||||
height = 0;
|
||||
min_x = INT_MAX;
|
||||
min_y = INT_MAX;
|
||||
max_x = 0;
|
||||
max_y = 0;
|
||||
for (l = monitor_priv->outputs; l; l = l->next)
|
||||
{
|
||||
MetaOutput *output = l->data;
|
||||
@ -714,15 +715,14 @@ meta_monitor_tiled_derive_dimensions (MetaMonitor *monitor,
|
||||
if (!output->crtc)
|
||||
continue;
|
||||
|
||||
if (output->tile_info.loc_v_tile == 0)
|
||||
width += output->crtc->rect.width;
|
||||
|
||||
if (output->tile_info.loc_h_tile == 0)
|
||||
height += output->crtc->rect.height;
|
||||
min_x = MIN (output->crtc->rect.x, min_x);
|
||||
min_y = MIN (output->crtc->rect.y, min_y);
|
||||
max_x = MAX (output->crtc->rect.x + output->crtc->rect.width, max_x);
|
||||
max_y = MAX (output->crtc->rect.y + output->crtc->rect.height, max_y);
|
||||
}
|
||||
|
||||
*out_width = width;
|
||||
*out_height = height;
|
||||
*out_width = max_x - min_x;
|
||||
*out_height = max_y - min_y;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user