fix(linux): added support for logical screen size with zxdg_output_v1 (#4594)

This commit is contained in:
Julio Sanz
2026-01-18 02:32:24 +01:00
committed by GitHub
parent b0bf510564
commit c313851878
2 changed files with 4 additions and 0 deletions

View File

@ -1542,6 +1542,8 @@ namespace platf {
if (monitor_descriptor.index == index && monitor_descriptor.type == type) { if (monitor_descriptor.index == index && monitor_descriptor.type == type) {
monitor_descriptor.viewport.offset_x = monitor->viewport.offset_x; monitor_descriptor.viewport.offset_x = monitor->viewport.offset_x;
monitor_descriptor.viewport.offset_y = monitor->viewport.offset_y; monitor_descriptor.viewport.offset_y = monitor->viewport.offset_y;
monitor_descriptor.viewport.width = monitor->viewport.width;
monitor_descriptor.viewport.height = monitor->viewport.height;
// A sanity check, it's guesswork after all. // A sanity check, it's guesswork after all.
if ( if (

View File

@ -144,6 +144,8 @@ namespace wl {
} }
void monitor_t::xdg_size(zxdg_output_v1 *, std::int32_t width, std::int32_t height) { void monitor_t::xdg_size(zxdg_output_v1 *, std::int32_t width, std::int32_t height) {
viewport.width = width;
viewport.height = height;
BOOST_LOG(info) << "Logical size: "sv << width << 'x' << height; BOOST_LOG(info) << "Logical size: "sv << width << 'x' << height;
} }