From c7138bca7ea7d007198c544b2d8bc27ae414d2e2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Nov 2018 22:49:29 +0100 Subject: Start with gif/image widget --- src/Window.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index 8b23aa9..b5a9f26 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -43,7 +43,7 @@ namespace dchat { fprintf(stderr, "Trying to login with username %s\n", username.raw().c_str()); rooms->loginUser(username.raw(), password.raw()); - windowNotification->show(Glib::ustring("Successfully logged in as ") + username); + //windowNotification->show(Glib::ustring("Successfully logged in as ") + username); drawBackgroundConnection.disconnect(); chatWindow.show_all(); stack.set_visible_child(chatWindow); @@ -260,7 +260,10 @@ namespace dchat //cairo->paint(); */ - overlay.draw(cairo); + Gtk::Allocation alloc = overlay.get_allocation(); + // For some reason gtk sometimes needs time to allocate the overlay, and it freezes the application if you do not wait for it + if(!alloc.has_zero_area()) + overlay.draw(cairo); queue_draw(); return true; } -- cgit v1.2.3