frontend::SessionMediator should not bypass the shell::Shell to create buffer streams for surfaces
Bug #1580555 reported by
Alan Griffiths
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Mir is designed for the shell to control placement and sizing of surfaces and buffer streams within the model. With Mir-0.22 this control is partially bypassed in SessionMediator
One place where this causes problems is with the miral-kiosk "splash" internal client. This arbitrarily sets a size of 0x0 as it "knows" that a fullscreen surface will be appropriately sized by the window manager.
Because the buffer stream is created from the request parameters, rather than from the placed parameters this leads to an attempt to mmap() a zero sized buffer, which fails.
To post a comment you must log in.
BufferStreams are client-controlled, so the shell gets to say how big a surface is, but it doesn't get to specify the size of any particular MirBuffer or MirBufferStream.
The problem here is that the client can create a stream with size X, then create a surface with size X, and then the shell can say that the surface is actually size Y. The client would then have to resize its MirBufferStream (or MirBuffers) to be size Y so that no scaling is needed. Needs some thought on how to resolve.