EINTERN enum wl_output_transform
e_comp_wl_buffer_window_rotation_get(E_Comp_Wl_Buffer *buffer)
{
- return buffer->transform;
+ /* Ignore the flip value since there is no concept of flip in window
+ * rotation.
+ */
+ return buffer->transform & 0x3;
}
e_surface_buffer_transform_get(E_Surface *surface)
{
E_Comp_Wl_Buffer *buffer;
- enum wl_output_transform buffer_transform;
+ enum wl_output_transform buffer_transform, flip, orientation;
buffer_transform = surface->base.scaler.buffer_viewport.buffer.transform;
buffer = surface->base.buffer_ref.buffer;
* To return the actual buffer transform set by the client, we need to
* subtract the window rotation value from the buffer_transform.
*/
-
- /* ignore the flip value when calculating transform because the screen rotation
- * functionality doesn't consider the flip output transform currently
- */
- return (4 + (buffer_transform & 0x3) - e_comp_wl_buffer_window_rotation_get(buffer)) & 0x3;
+ flip = buffer_transform & ~0x3;
+ orientation = buffer_transform & 0x3;
+ return flip | ((4 + orientation - e_comp_wl_buffer_window_rotation_get(buffer)) & 0x3);
}
EINTERN E_Comp_Wl_Buffer *