]> Dogcows Code - chaz/openbox/commitdiff
more compressing
authorDana Jansens <danakj@orodu.net>
Mon, 2 Dec 2002 22:32:38 +0000 (22:32 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 2 Dec 2002 22:32:38 +0000 (22:32 +0000)
src/client.cc

index 7dd63b2a3f554fd43cc0ecaa665bbdd6616b7e77..a92c1796e9f4699733eb3cbac01f444f66be6fc3 100644 (file)
@@ -504,6 +504,17 @@ void OBClient::propertyHandler(const XPropertyEvent &e)
   
   const otk::OBProperty *property = Openbox::instance->property();
 
+  // compress changes to a single property into a single change
+  XEvent ce;
+  while (XCheckTypedEvent(otk::OBDisplay::display, e.message_type, &ce)) {
+    // XXX: it would be nice to compress ALL changes to a property, not just
+    //      changes in a row without other props between.
+    if (ce.xproperty.atom != e.atom) {
+      XPutBackEvent(otk::OBDisplay::display, &ce);
+      break;
+    }
+  }
+
   if (e.atom == XA_WM_NORMAL_HINTS)
     updateNormalHints();
   else if (e.atom == XA_WM_HINTS)
This page took 0.027847 seconds and 4 git commands to generate.