aboutsummaryrefslogtreecommitdiff
path: root/src/main-window.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main-window.vala')
-rw-r--r--src/main-window.vala21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main-window.vala b/src/main-window.vala
index ac87200..4ffd51f 100644
--- a/src/main-window.vala
+++ b/src/main-window.vala
@@ -50,15 +50,7 @@ public class MainWindow : Gtk.Window
has_resize_grip = false;
ArcticaGreeter.add_style_class (this);
- realize ();
- 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));
- get_window().end_draw_frame(background_context);
- background.show ();
+ background = new Background ();
add (background);
ArcticaGreeter.add_style_class (background);
@@ -207,6 +199,17 @@ public class MainWindow : Gtk.Window
menubar.cleanup();
}
+ public override void realize ()
+ {
+ base.realize ();
+ Gdk.DrawingContext background_context;
+ background_context = get_window().begin_draw_frame(get_window().get_visible_region());
+
+ background.set_surface (background_context.get_cairo_context().get_target());
+
+ get_window().end_draw_frame(background_context);
+ }
+
private void monitors_changed_cb (Gdk.Screen screen)
{
Gdk.Display display;