Skip to content

Rootston: fix rotation heading (was: wlr_matrix: fix matrix_rotate)

Dominique Martinet requested to merge github/fork/martinetd/matrix_rotate into master

Fixes #729 (closed).

Change rootston's view->rotation to be computed with normal expectation.

Test plan:

  • Start normally and rotate a window
  • Start rotated and rotate a window
  • Start flipped/rotated and rotate a window

For reference, the old 3d code was this, that seems to agree: The old behaviour was against usual conventions:

        wlr_matrix_identity(mat);
        float _cos = cosf(radians);
        float _sin = sinf(radians);
        mat[mind(1, 1)] = _cos;
        mat[mind(1, 2)] = _sin;
        mat[mind(2, 1)] = -_sin;
        mat[mind(2, 2)] = _cos;

Merge request reports