// -*- mode: C++; indent-tabs-mode: nil; -*-
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
#include "xeventhandler.hh"
#include "client.hh"
#include "frame.hh"
#ifdef SHAPE
void OBXEventHandler::shapeEvent(const XShapeEvent &e)
{
- XShapeEvent *shape_event = (XShapeEvent *) e;
- BlackboxWindow *win = searchWindow(e->xany.window);
+ printf("ShapeEvent\n");
+ if (e.kind != ShapeBounding) return;
- if (win && shape_event->kind == ShapeBounding)
- win->shapeEvent(shape_event);
+ OBClient *client = Openbox::instance->findClient(e.window);
+ if (!client) return;
+
+ client->update(e);
+ client->frame->shape();
}
#endif // SHAPE
default:
#ifdef SHAPE
if (e.type == otk::OBDisplay::shapeEventBase())
- shapeEvent(e);
+ shapeEvent((*(XShapeEvent*)&e));
#endif // SHAPE
break;