]> Dogcows Code - chaz/openbox/blobdiff - otk/application.cc
render images properly, minus the scaling
[chaz/openbox] / otk / application.cc
index e4de62c16bc8cf36e83b2a126d73be55b5bec761..94842ca5848dd96617e84a91d6cb20ed54cbfc52 100644 (file)
@@ -1,15 +1,13 @@
 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
 
 #include "application.hh"
 #include "eventhandler.hh"
-#include "widget.hh"
 #include "timer.hh"
 #include "property.hh"
 #include "rendercolor.hh"
+#include "renderstyle.hh"
 
 extern "C" {
 #ifdef HAVE_STDLIB_H
@@ -30,17 +28,19 @@ Application::Application(int argc, char **argv)
   (void)argc;
   (void)argv;
 
+  _screen = DefaultScreen(*_display);
+  
   Timer::initialize();
   RenderColor::initialize();
+  RenderStyle::initialize();
   Property::initialize();
-  _style = new RenderStyle(DefaultScreen(*_display), ""); // XXX: get a path!
 
   loadStyle();
 }
 
 Application::~Application()
 {
-  delete _style;
+  RenderStyle::destroy();
   RenderColor::destroy();
   Timer::destroy();
 }
@@ -63,6 +63,8 @@ void Application::run(void)
 
   while (_appwidget_count > 0) {
     dispatchEvents();
+    if (_appwidget_count <= 0)
+      break;
     Timer::dispatchTimers(); // fire pending events
   }
 }
This page took 0.020974 seconds and 4 git commands to generate.