fvwm3 icon indicating copy to clipboard operation
fvwm3 copied to clipboard

Fsvg.h using deprecated calls.

Open somiaj opened this issue 11 months ago • 2 comments

Building fvwm gives the following depreciating warnings.

PictureImageLoader.c:287:9: warning: ‘rsvg_handle_get_dimensions’ is deprecated: Use 'rsvg_handle_get_intrinsic_size_in_pixels' instead [-Wdeprecated-declarations]
  287 |         Frsvg_handle_get_dimensions(rsvg, &dim);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Fsvg.h:9,
                 from PictureImageLoader.c:46:
/usr/include/librsvg-2.0/librsvg/rsvg.h:708:6: note: declared here
  708 | void rsvg_handle_get_dimensions (RsvgHandle *handle, RsvgDimensionData *dimension_data);
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
PictureImageLoader.c:360:9: warning: ‘rsvg_handle_render_cairo’ is deprecated: Use 'rsvg_handle_render_document' instead [-Wdeprecated-declarations]
  360 |         Frsvg_handle_render_cairo(rsvg, cr);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/librsvg-2.0/librsvg/rsvg.h:1452:
/usr/include/librsvg-2.0/librsvg/rsvg-cairo.h:88:10: note: declared here
   88 | gboolean rsvg_handle_render_cairo (RsvgHandle *handle, cairo_t *cr);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~

This will require a little bit of refactoring how fvwm computes SVG sizes.

somiaj avatar Mar 24 '24 21:03 somiaj

Note to self: The SVG version checking will need to be ripped out as well...

ThomasAdam avatar Mar 24 '24 21:03 ThomasAdam

See also this migration guide: https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/doc/migrating.md

ThomasAdam avatar Apr 11 '24 08:04 ThomasAdam

Note to self: The SVG version checking will need to be ripped out as well...

I didn't see this in the PR, though not fully sure what version checking you were talking about.

somiaj avatar Oct 01 '24 21:10 somiaj

Note to self: The SVG version checking will need to be ripped out as well...

I didn't see this in the PR, though not fully sure what version checking you were talking about.

I think that's referring to the abstraction in use around the librsvg API. But that's a much larger change than fixing deprecation warnings.

ThomasAdam avatar Oct 01 '24 21:10 ThomasAdam