]> Dogcows Code - chaz/openbox/blobdiff - src/xeventhandler.cc
support for the shape extension works!
[chaz/openbox] / src / xeventhandler.cc
index ad7d7e27f22356c85aa6d462429aa5383f8f32cc..585f9dbc516899f4b53c634ae0142aedc546122d 100644 (file)
@@ -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;
     
This page took 0.026671 seconds and 4 git commands to generate.