Mir

Windows sized during creation are rendered incorrectly

Bug #1701308 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Alan Griffiths

Bug Description

Mir 0.27/trunk

Case 1:

$ mir_demo_server --window-manager fullscreen --launch mir_demo_client_egltriangle

Expect: client fills the screen
Actual: client in top left corner

Case 2:

$ miral-app --window-manager tiling
[in miral app session] $ mir_demo_client_eglplasma

Expect: plasma starts in the LH tile.
Actual: plasma starts fullscreen

Related branches

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Running the 0.26.3 client shows at the correct size - so this is probably related to using the RS APIs

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Yes.

With the old APIs we resized the buffer stream in ApplicationSession::create_surface().

With the RS APIs we rely on the client to resize the RS, but we don't generate a resize event when we create the window at a different size than the request.

I'm not sure how much this opens the can of worms entitled: "what layout control does the server have over the layout of buffer streams and render surfaces"?

Changed in mir:
assignee: Alan Griffiths (alan-griffiths) → nobody
Revision history for this message
Chris Halse Rogers (raof) wrote :

So this seems to be two separate bugs:
1) We render windows at incorrect sizes - the size that the shell sets should be the size that the shell renders the window at, regardless of what size buffer the client submits.

2) Our EGL demos fail to respect the size set for them by the shell.

The first seems to be a problem we should fix (even if only in our demo renderer). The second... is a problem, but do we need to fix it? Wayland clients won't be affected by it...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Last time I worked on this problem (and fixed it), I found the initial resize event design was racy and unreliable. So don't rely on that. What you should be able to rely on is the EGL_WIDTH/HEIGHT being consistent with your target buffer, so maybe more work needs to be done on the Mesa/RS side...

For more details, see the fix for bug 1686620:
https://code.launchpad.net/~vanvugt/mir/fix-1686620/+merge/323378

And the first relevant report from last January: bug 1655804

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

@chris

There's been a longstanding debate about how we handle rendering content a client places outside the window area. I think the team now agrees with you, but I don't know if we want to tackle it for 0.27.

The linked MP fixes the second problem, plus the potential deadlock introduced by -c 4150.

Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.27.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.