diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-11-10 05:54:12 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-11-10 05:54:12 +0000 |
| commit | 9d5865a1603733e62fda7c8d61024cb05bf6792c (patch) | |
| tree | 3a2e3286b789104457b3297c4ed4873bb5b05ac7 /src/xeventhandler.cc | |
| parent | 209b7f212d18078c82f0faab4094dcd7d8e36850 (diff) | |
support for the shape extension works!
Diffstat (limited to 'src/xeventhandler.cc')
| -rw-r--r-- | src/xeventhandler.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/xeventhandler.cc b/src/xeventhandler.cc index ad7d7e27..585f9dbc 100644 --- a/src/xeventhandler.cc +++ b/src/xeventhandler.cc @@ -1,5 +1,9 @@ // -*- mode: C++; indent-tabs-mode: nil; -*- +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "xeventhandler.hh" #include "client.hh" #include "frame.hh" @@ -506,11 +510,14 @@ void OBXEventHandler::focusOut(const XFocusChangeEvent &e) #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 @@ -679,7 +686,7 @@ void OBXEventHandler::handle(const XEvent &e) default: #ifdef SHAPE if (e.type == otk::OBDisplay::shapeEventBase()) - shapeEvent(e); + shapeEvent((*(XShapeEvent*)&e)); #endif // SHAPE break; |
