]> Dogcows Code - chaz/openbox/blobdiff - src/screen.cc
not using any old blackbox classes anymore!
[chaz/openbox] / src / screen.cc
index 845014a9968756b990316ed5a910bda54ed0056f..51e3aa169f34975862ece70d7b6ec7b6cf2f8dca 100644 (file)
@@ -9,6 +9,11 @@ extern "C" {
 #  include <stdio.h>
 #endif // HAVE_STDIO_H
 
+#ifdef    HAVE_UNISTD_H
+#  include <sys/types.h>
+#  include <unistd.h>
+#endif // HAVE_UNISTD_H
+
 #include "gettext.h"
 #define _(str) gettext(str)
 }
@@ -49,12 +54,10 @@ OBScreen::OBScreen(int screen)
   printf(_("Managing screen %d: visual 0x%lx, depth %d\n"),
          _number, XVisualIDFromVisual(_info->getVisual()), _info->getDepth());
 
-#ifdef    HAVE_GETPID
   Openbox::instance->property()->set(_info->getRootWindow(),
                                      otk::OBProperty::openbox_pid,
                                      otk::OBProperty::Atom_Cardinal,
                                      (unsigned long) getpid());
-#endif // HAVE_GETPID
 
   // set the mouse cursor for the root window (the default cursor)
   XDefineCursor(otk::OBDisplay::display, _info->getRootWindow(),
@@ -65,6 +68,8 @@ OBScreen::OBScreen(int screen)
   _image_control->installRootColormap();
   _root_cmap_installed = True;
 
+  _style.setImageControl(_image_control);
+
   
   // Set the netwm atoms for geomtery and viewport
   unsigned long geometry[] = { _size.x(),
@@ -304,4 +309,14 @@ void OBScreen::setWorkArea() {
 }
 
 
+void OBScreen::loadStyle(const otk::Configuration &config)
+{
+  _style.load(config);
+  if (Openbox::instance->state() == Openbox::State_Starting)
+    return;
+
+  // XXX: make stuff redraw!
+}
+
+
 }
This page took 0.026064 seconds and 4 git commands to generate.