"""
// Window manager can give us a final size different from what we asked for
// so let's check what we ended up getting
{ MirSurfaceParameters parameters; mir_surface_get_parameters(d->surface, ¶meters);
DLOG("[ubuntumirclient QPA] created surface has pixel size (%d, %d) and device-pixel size (%d, %d)", parameters.width, parameters.height, geometry.width(), geometry.height());
}
// Assume that the buffer size matches the surface size at creation time
d->bufferSize = geometry.size();
"""
Here bufferSize will be initialized with a scaled size, but it should have the real size.
So bufferSize initialization should probably moved above the line "// Window manager can give us a final size different[...]".
In src/ubuntumircl ient/window. cpp
"""
MirSurfacePara meters parameters;
mir_surface_ get_parameters( d->surface, ¶meters);
// Window manager can give us a final size different from what we asked for
// so let's check what we ended up getting
{
}
// Assume that the buffer size matches the surface size at creation time
d->bufferSize = geometry.size();
"""
Here bufferSize will be initialized with a scaled size, but it should have the real size.
So bufferSize initialization should probably moved above the line "// Window manager can give us a final size different[...]".