// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
#include "client.hh"
-#include "screen.hh"
+#include "bbscreen.hh"
#include "openbox.hh"
#include "otk/display.hh"
#include "otk/property.hh"
namespace ob {
-OBClient::OBClient(Window window)
- : _window(window)
+OBClient::OBClient(int screen, Window window)
+ : _screen(screen), _window(window)
{
assert(window);
+ ignore_unmaps = 0;
+
// update EVERYTHING the first time!!
// the state is kinda assumed to be normal. is this right? XXX
updateIconTitle();
updateClass();
+/*
#ifdef DEBUG
printf("Mapped window: 0x%lx\n"
" title: \t%s\t icon title: \t%s\n"
_floating ? "yes" : "no",
_positioned ? "yes" : "no");
#endif
+*/
}
void OBClient::getArea()
{
XWindowAttributes wattrib;
- assert(XGetWindowAttributes(otk::OBDisplay::display, _window, &wattrib));
+ Status ret;
+
+ ret = XGetWindowAttributes(otk::OBDisplay::display, _window, &wattrib);
+ assert(ret != BadWindow);
_area.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height);
_border_width = wattrib.border_width;
if (otk::OBDisplay::shape()) {
int foo;
unsigned int ufoo;
+ int s;
+
+ XShapeSelectInput(otk::OBDisplay::display, _window, ShapeNotifyMask);
- XShapeQueryExtents(otk::OBDisplay::display, client.window, &_shaped, &foo,
+ XShapeQueryExtents(otk::OBDisplay::display, _window, &s, &foo,
&foo, &ufoo, &ufoo, &foo, &foo, &foo, &ufoo, &ufoo);
+ _shaped = (s != 0);
}
#endif // SHAPE
}
}
+#if defined(SHAPE) || defined(DOXYGEN_IGNORE)
+void OBClient::update(const XShapeEvent &e)
+{
+ _shaped = e.shaped;
+}
+#endif
+
+
void OBClient::setArea(const otk::Rect &area)
{
_area = area;