mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Consider scale factor when rendering views
This commit is contained in:
parent
03c0d41ca9
commit
a7446792a1
7 changed files with 32 additions and 6 deletions
|
|
@ -27,6 +27,8 @@ static void render_surface(struct wlr_surface *surface,
|
|||
|
||||
if (wlr_output_layout_intersects(desktop->layout, wlr_output,
|
||||
lx, ly, lx + width, ly + height)) {
|
||||
// TODO: accomodate for mismatched scale, which can happen, for
|
||||
// example, when a view is rendered over two outputs
|
||||
float matrix[16];
|
||||
|
||||
float translate_origin[16];
|
||||
|
|
@ -217,6 +219,7 @@ void output_add_notify(struct wl_listener *listener, void *data) {
|
|||
if (output_config->mode.width) {
|
||||
set_mode(wlr_output, output_config);
|
||||
}
|
||||
wlr_output->scale = output_config->scale;
|
||||
wlr_output_transform(wlr_output, output_config->transform);
|
||||
wlr_output_layout_add(desktop->layout,
|
||||
wlr_output, output_config->x, output_config->y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue