Skip to content

Commit

Permalink
wl: Force a View resize on the output changed
Browse files Browse the repository at this point in the history
The device scale factor could be different and the scale of the exported
image should be also updated.
  • Loading branch information
psaavedra committed Oct 30, 2023
1 parent d212403 commit a39d663
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/wayland/cog-platform-wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,11 @@ output_handle_done(void *data, struct wl_output *output)
if (!display->current_output) {
g_debug("%s: Using %p as initial output", G_STRFUNC, output);
display->current_output = metrics;

// Forces a View resize since the output changed so the device
// scale factor could be different and the scale of the exported
// image should be also updated.
cog_wl_view_resize(platform->view);
}

if (platform->window.should_resize_to_largest_output) {
Expand Down

0 comments on commit a39d663

Please sign in to comment.