From 0aabe419f68f18ac51ed162bc06f3079cd464fa3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 27 Oct 2018 16:39:11 +0200 Subject: Draw nodes behind login box --- src/Window.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index 208c616..b1efc20 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -14,19 +14,18 @@ namespace dchat Window::Window() { set_border_width(0); - Gtk::Overlay *overlay = Gtk::manage(new Gtk::Overlay()); WindowNotification *windowNotification = Gtk::manage(new WindowNotification()); - overlay->add_overlay(*windowNotification); - overlay->set_overlay_pass_through(*windowNotification); - overlay->add(stack); - add(*overlay); + overlay.add_overlay(*windowNotification); + overlay.set_overlay_pass_through(*windowNotification); + overlay.add(stack); + add(overlay); stack.set_transition_type(Gtk::StackTransitionType::STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT); stack.set_transition_duration(250); stack.add(loginWindow, "login"); stack.add(chatWindow, "chat"); - overlay->show(); + overlay.show(); windowNotification->show_all(); stack.show(); chatWindow.show_all(); @@ -181,6 +180,7 @@ namespace dchat } prevTimeMillis = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - 5000; drawBackgroundConnection = signal_draw().connect(sigc::mem_fun(*this, &Window::drawBackground)); + set_size_request(640, 480); } Window::~Window() @@ -263,6 +263,7 @@ namespace dchat } } cairo->stroke(); + overlay.draw(cairo); queue_draw(); return true; -- cgit v1.2.3