fvwmorg / fvwm3

FVWM version 3 -- the successor to fvwm2
Other
505 stars 79 forks source link

Fsvg.h using deprecated calls. #974

Open somiaj opened 5 months ago

somiaj commented 5 months ago

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.

ThomasAdam commented 5 months ago

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

ThomasAdam commented 5 months ago

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