From f238d62e507861649676b746ff9366ba263503dc Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 17 May 2017 16:46:38 +0200 Subject: Gdk.cairo_create() has been deprecated in GTK 3.22. Use Gdk.Window.begin_draw_frame() instead. --- src/main-window.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main-window.vala') diff --git a/src/main-window.vala b/src/main-window.vala index b818968..13b26ad 100644 --- a/src/main-window.vala +++ b/src/main-window.vala @@ -51,10 +51,13 @@ public class MainWindow : Gtk.Window ArcticaGreeter.add_style_class (this); realize (); - background = new Background (Gdk.cairo_create (get_window ()).get_target ()); + Gdk.DrawingContext background_context; + background_context = get_window().begin_draw_frame(get_window().get_visible_region()); + background = new Background (background_context.get_cairo_context().get_target()); background.draw_grid = AGSettings.get_boolean (AGSettings.KEY_DRAW_GRID); background.default_background = AGSettings.get_string (AGSettings.KEY_BACKGROUND); background.set_logo (AGSettings.get_string (AGSettings.KEY_LOGO), AGSettings.get_string (AGSettings.KEY_BACKGROUND_LOGO)); + get_window().end_draw_frame(background_context); background.show (); add (background); ArcticaGreeter.add_style_class (background); -- cgit v1.2.3