Mir

Comment 4 for bug 1357429

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

I think a better approach (which I've mentioned a few times in the past) is for clients to observe the aspect ratio they've been given by resize events and the current buffer:

   if (width > height)
       display myself in landscape mode
   else
       display myself in portrait mode

And then your compositor does the actual rotation as required. You don't need any "advise_orientation" for that. Just the existing surface/buffer dimensions.

That also works nicely for morphing rotation animations as the visible surfaces get resize events during such a rotation and halfway through one dimension will surpass the other, causing a smooth transition between portrait and landscape modes at just the right time.