From 7efcff07ea463bd9ae1d374119540fb8dc508489 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 2 Dec 2002 22:32:38 +0000 Subject: [PATCH] more compressing --- src/client.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client.cc b/src/client.cc index 7dd63b2a..a92c1796 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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) -- 2.45.2