GNOME Bugzilla – Bug 682789
Deprecate ClutterGeometry (and remove it for 2.0)
Last modified: 2021-06-10 11:33:40 UTC
Use ClutterRect or cairo_rectangle_int_t instead.
Created attachment 226009 [details] [review] 2.0: Remove Geometry from ClutterText::cursor-event Instead of passing a Geometry inside a signal handler, we should just notify that the cursor origin or size has been changed, and let the user retrieve the cursor's rectangle using a specific method. This allows us to use ClutterRect.
Created attachment 226010 [details] [review] 2.0: Remove ClutterGeometry Finally, we can remove this bad rectangle type.
there's another route: we can add a ::cursor-changed signal that does not have any argument, add clutter_text_get_cursor_rect(), and deprecate ::cursor-event (which is a pretty gross misnomer) in 1.x; then we can just drop the deprecated signal along with the rest, and presto: we have an upgrade path.
Created attachment 239896 [details] [review] text: Add ::cursor-changed signal Since we are trying to eliminate the ClutterGeometry type, we should replace the only entry point still using it: the ::cursor-event signal of ClutterText. Instead of passing the cursor geometry, we should add an accessor function. The combination of signal and getter for the cursor geometry means that we can deprecate ClutterText::cursor-event, and mark it for removal in Clutter 2.0.
Created attachment 239897 [details] [review] Deprecate ClutterGeometry It's a bad rectangle type, with caveats and gotchas. We have better types, courtesy of Cairo, as well as our own (ClutterRect).
pushed to master; the removal of the Geometry type is now part of the overall 2.0 milestone of removing deprecated types. Attachment 239896 [details] pushed as 1724536 - text: Add ::cursor-changed signal Attachment 239897 [details] pushed as 8c32637 - Deprecate ClutterGeometry
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.