mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
renderer-native: Use CRTC layout in stage view
The port to per CRTC views was incomplete; we still used the logical monitor layout as the stage view layout, while still using one view per CRTC. This worked fine for most cases, e.g. regular monitors, tiled or non-tiled, transformed or non-transformed. Where it broke, however, was when a monitor consists of multiple CRTCs. We already have the layout a CRTC corresponds to on the stage kept with the CRTC metadata, so use this directly. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1170 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1199`
This commit is contained in:
parent
e8f29a3336
commit
ea546a8b90
@ -3037,6 +3037,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
float scale;
|
||||
int onscreen_width;
|
||||
int onscreen_height;
|
||||
MetaRectangle view_layout;
|
||||
MetaRendererView *view;
|
||||
GError *error = NULL;
|
||||
|
||||
@ -3108,8 +3109,11 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
else
|
||||
scale = 1.0;
|
||||
|
||||
meta_rectangle_from_graphene_rect (&crtc->config->layout,
|
||||
META_ROUNDING_STRATEGY_ROUND,
|
||||
&view_layout);
|
||||
view = g_object_new (META_TYPE_RENDERER_VIEW,
|
||||
"layout", &logical_monitor->rect,
|
||||
"layout", &view_layout,
|
||||
"scale", scale,
|
||||
"framebuffer", onscreen,
|
||||
"offscreen", offscreen,
|
||||
|
Loading…
Reference in New Issue
Block a user