Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#3259) buffer size should be the possibly-inverted extents size so that the final image is correct #3292

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/server/frontend_wayland/wlr_screencopy_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ void mf::WlrScreencopyManagerV1::capture_output(
(void)overlay_cursor;
auto const& output_config = OutputGlobal::from_or_throw(output).current_config();
auto const extents = output_config.extents();
auto const buffer_size = output_config.modes[output_config.current_mode_index].size;
new WlrScreencopyFrameV1{frame, this, ctx, {output, extents, buffer_size}};
new WlrScreencopyFrameV1{frame, this, ctx, {output, extents, extents.size}};
}

void mf::WlrScreencopyManagerV1::capture_output_region(
Expand All @@ -393,8 +392,7 @@ void mf::WlrScreencopyManagerV1::capture_output_region(
auto const& output_config = OutputGlobal::from_or_throw(output).current_config();
auto const extents = output_config.extents();
auto const intersection = intersection_of({{x, y}, {width, height}}, extents);
auto const output_size = output_config.modes[output_config.current_mode_index].size;
auto const buffer_size = translate_and_scale(intersection, extents, {{}, output_size}).size;
auto const buffer_size = translate_and_scale(intersection, extents, {{}, extents.size}).size;
new WlrScreencopyFrameV1{frame, this, ctx, {output, intersection, buffer_size}};
}

Expand Down
Loading