]> git.tdb.fi Git - libs/gui.git/commitdiff
Set window title to application name by default
authorMikko Rasa <tdb@tdb.fi>
Wed, 12 Nov 2014 20:45:24 +0000 (22:45 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 12 Nov 2014 20:45:24 +0000 (22:45 +0200)
source/graphics/window.cpp

index 658eb26f5aab722c2b1515a4c64c4f6f9334ec73..ebdc578e14d44524f982c74e29beb2503a7c0c99 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/core/application.h>
 #include "display.h"
 #include "window.h"
 #include "window_private.h"
@@ -43,6 +44,10 @@ void Window::init()
 
        display.add_window(*this);
        display.check_error();
+
+       const string &app_name = Application::get_name();
+       if(!app_name.empty())
+               set_title(app_name);
 }
 
 Window::~Window()