#include "python.hh"
#include "otk/display.hh"
#include "otk/property.hh"
+#include "otk/util.hh"
extern "C" {
#ifdef HAVE_UNISTD_H
Screen::Screen(int screen)
- : _number(screen)
+ : _number(screen),
+ _config(screen)
{
assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
_info = otk::display->screenInfo(screen);
XDefineCursor(**otk::display, _info->rootWindow(),
openbox->cursors().session);
- // initialize the screen's style
- otk::RenderStyle::setStyle(_number, _config.theme);
- otk::display->renderControl(_number)->
- drawRoot(*otk::RenderStyle::style(_number)->rootColor());
-
// set up notification of netwm support
changeSupportedAtoms();
otk::Property::atoms.net_desktop_geometry,
otk::Property::atoms.cardinal, geometry, 2);
- // Set the net_desktop_names property
- otk::Property::set(_info->rootWindow(),
- otk::Property::atoms.net_desktop_names,
- otk::Property::utf8, _config.desktop_names);
- // the above set() will cause the updateDesktopNames to fire right away so
- // we have a list of desktop names
-
_desktop = 0;
- changeNumDesktops(_config.num_desktops); // set the hint
-
+ changeNumDesktops(1); // set the hint
changeDesktop(0); // set the hint
// don't start in showing-desktop mode