Skip to content

Get rid of deprecated functions in GTK 3.x #58

@tanuki-no

Description

@tanuki-no

There are next compilation warnings:

display.c: In function ‘update_window’: display.c:153:9: warning: ‘gdk_cairo_create’ is deprecated: Use 'gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context()' instead [-Wdeprecated-declarations] 153 | cairo_t *cr = gdk_cairo_create(drawable); | ^~~~~~~ In file included from /usr/include/gtk-3.0/gdk/gdk.h:33, from /usr/include/gtk-3.0/gtk/gtk.h:30, from display.c:23: /usr/include/gtk-3.0/gdk/gdkcairo.h:35:12: note: declared here 35 | cairo_t * gdk_cairo_create (GdkWindow *window); | ^~~~~~~~~~~~~~~~ display.c: In function ‘button_release_event’: display.c:323:9: warning: ‘gdk_cairo_create’ is deprecated: Use 'gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context()' instead [-Wdeprecated-declarations] 323 | cairo_t *cr = gdk_cairo_create(drawable); | ^~~~~~~ /usr/include/gtk-3.0/gdk/gdkcairo.h:35:12: note: declared here 35 | cairo_t * gdk_cairo_create (GdkWindow *window); | ^~~~~~~~~~~~~~~~ display.c:330:9: warning: ‘gdk_flush’ is deprecated: Use 'gdk_display_flush' instead [-Wdeprecated-declarations] 330 | gdk_flush(); /* force X to actually draw the damn thing. */ | ^~~~~~~~~ In file included from /usr/include/gtk-3.0/gdk/gdk.h:50: /usr/include/gtk-3.0/gdk/gdkmain.h:124:6: note: declared here 124 | void gdk_flush (void);
I propose the fix based on this solution.

driftnet-1.6.0-fix-deprecated-gtk-3.x.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions