GNOME Bugzilla – Bug 761565
actor.get_transformed_size/position work wrong after a change in stage size
Last modified: 2021-06-10 11:33:03 UTC
clutter_actor_get_transformed_size()/position() end up at clutter_stage_real_apply_transform() which does: cogl_matrix_multiply (matrix, matrix, &priv->view); But priv->view is updated in clutter_init() and lazily in _clutter_stage_maybe_setup_viewport(). This is a regression as of 2011 - it looks like it would have worked right before eef9078f892c3 The clean thing seems to do seems to separate out the idea: "The cogl viewport is dirty and needs to be set again" From: "The computed fields like priv->view are dirty and need to be recomputed" And then clutter_stage_real_apply_transform() could get priv->view updated without affecting the cogl state.
We also mark the viewport as dirty when changing the allocation of the stage, and when we do a pick, since it can be clipped and we fudge the viewport in that case. Are there other cases where the viewport should be reset?
(In reply to Emmanuele Bassi (:ebassi) from comment #1) > We also mark the viewport as dirty when changing the allocation of the > stage, and when we do a pick, since it can be clipped and we fudge the > viewport in that case. > > Are there other cases where the viewport should be reset? the pick case is the the only case I know where we would want to mark the viewport dirty without marking the state dirty. For a lot of things both should be marked dirty at once.
Viewport and perspective updated on demand as of b69d2aa6a0e0e8d69354f6eda0bb9ab68a76f2ee.
Realized this was the clutter issue tracker and not mutters, nm.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of clutter, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/clutter/-/issues/ Thank you for your understanding and your help.