<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -425,7 +425,10 @@ bool CompWindow::x11EventFilter( XEvent* event)
     d-&gt;damage_event = d-&gt;damage_event + XDamageNotify;
     if (event-&gt;type == d-&gt;damage_event ) {
         XDamageNotifyEvent *damage_ev = (XDamageNotifyEvent *) xev;
-        win-&gt;Damaged (&amp;damage_ev-&gt;area);
+        do {
+            win-&gt;Damaged (&amp;damage_ev-&gt;area);
+        } while (XCheckTypedEvent (d-&gt;mDisplay, d-&gt;damage_event + XDamageNotify, xev));
+
         return false;
     }//done
     switch (event-&gt;type) {</diff>
      <filename>plexywm/compwindow.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ public:
     ~Private() {}
     Damage damage;
     Window window;
-    XWindowAttributes * attrib;
+    XWindowAttributes attrib;
     Display * display;
     Pixmap pixmap;
     bool isRedirected;
@@ -54,10 +54,11 @@ PlexyWindows::PlexyWindows(Display* dsp, Window win, XWindowAttributes* attr, QW
     d-&gt;window = win;
     d-&gt;display = dsp;
     d-&gt;pixmap = None;
-    d-&gt;attrib = attr;
+    d-&gt;attrib = *attr;
     d-&gt;damage = XDamageCreate (dsp, win, XDamageReportRawRectangles);
     d-&gt;isRedirected = false;
-    qDebug()&lt;&lt;d-&gt;attrib-&gt;width&lt;&lt;d-&gt;attrib-&gt;height&lt;&lt;d-&gt;attrib-&gt;border_width&lt;&lt;endl;
+
+
     if (attr-&gt;map_state == IsViewable) {
         attr-&gt;map_state == IsUnmapped;
         Mapped(attr-&gt;override_redirect);
@@ -72,11 +73,11 @@ void PlexyWindows::Mapped (bool override_redirect)
 {
 
 
-        if (d-&gt;attrib-&gt;map_state == IsViewable || d-&gt;attrib-&gt;c_class == InputOnly)
+        if (d-&gt;attrib.map_state == IsViewable || d-&gt;attrib.c_class == InputOnly)
         return;
 
-            d-&gt;attrib-&gt;map_state = IsViewable;
-            d-&gt;attrib-&gt;override_redirect = override_redirect;
+            d-&gt;attrib.map_state = IsViewable;
+            d-&gt;attrib.override_redirect = override_redirect;
 
             qDebug()&lt;&lt; Q_FUNC_INFO &lt;&lt;endl;
 
@@ -87,11 +88,14 @@ void PlexyWindows::bind()
 {
     qDebug() &lt;&lt;  Q_FUNC_INFO&lt;&lt;endl;
     RedirectWindow();
-
+   qDebug() &lt;&lt;  Q_FUNC_INFO&lt;&lt; &quot; Try grabbing pixmap &quot; &lt;&lt; d-&gt;window &lt;&lt; endl;
     if (!d-&gt;pixmap) {
         XGrabServer(d-&gt;display);
-        XGetWindowAttributes(d-&gt;display, d-&gt;window, d-&gt;attrib);
-        if (d-&gt;attrib-&gt;map_state == IsViewable) {
+            qDebug() &lt;&lt;  Q_FUNC_INFO&lt;&lt; &quot;Grabbing Xserver &quot; &lt;&lt; endl;
+        XWindowAttributes attr;
+        XGetWindowAttributes(d-&gt;display, d-&gt;window, &amp;d-&gt;attrib);
+        setRect(d-&gt;attrib.x,d-&gt;attrib.y, d-&gt;attrib.width, d-&gt;attrib.height);
+        if (d-&gt;attrib.map_state == IsViewable) {
             d-&gt;pixmap = XCompositeNameWindowPixmap (d-&gt;display, d-&gt;window);
             if (d-&gt;pixmap == None) {
                 qDebug()&lt;&lt;&quot;Bad Pixmap not created&quot;&lt;&lt;endl;
@@ -106,9 +110,10 @@ void PlexyWindows::bind()
 
 void PlexyWindows::RedirectWindow ()
 {
-    if (d-&gt;isRedirected) {
-        return;
-    }
+    qDebug() &lt;&lt;  Q_FUNC_INFO&lt;&lt;endl;
+   // if (d-&gt;isRedirected) {
+     //   return;
+    //}
 
     XCompositeRedirectWindow (d-&gt;display, d-&gt;window, CompositeRedirectManual);
     d-&gt;isRedirected = true;
@@ -116,10 +121,10 @@ void PlexyWindows::RedirectWindow ()
 
 void PlexyWindows::Unmapped ()
 {
-      if (d-&gt;attrib-&gt;map_state != IsViewable)
+      if (d-&gt;attrib.map_state != IsViewable)
         return;
 
-    d-&gt;attrib-&gt;map_state = IsUnmapped;
+    d-&gt;attrib.map_state = IsUnmapped;
     ReleaseWindow ();
 
 }
@@ -129,12 +134,12 @@ void PlexyWindows::PropertyChanged (Atom prop, bool deleted)
 
 void PlexyWindows::Configured (bool isNotify,int x, int y,int width, int height,int border, PlexyWindows *aboveWin, bool override_redirect)
 {
-    d-&gt;attrib-&gt;override_redirect = override_redirect;
+    d-&gt;attrib.override_redirect = override_redirect;
     if (isNotify) {
         Resized (x, y, width, height, border);
         unsigned changeMask =  CWX | CWY | CWWidth| CWHeight;
         XConfigureWindow (d-&gt;display, d-&gt;window, changeMask, &amp;d-&gt;changeSet);
-        if (d-&gt;attrib-&gt;border_width != 0)
+        if (d-&gt;attrib.border_width != 0)
         qDebug()&lt;&lt;Q_FUNC_INFO&lt;&lt;&quot;Resize&quot;&lt;&lt;endl;
     }
 
@@ -144,7 +149,7 @@ void PlexyWindows::Damaged(XRectangle *rect)
 {
     bind();
     if (!rect) {
-        XRectangle allrect = { d-&gt;attrib-&gt;x, d-&gt;attrib-&gt;y, d-&gt;attrib-&gt;width, d-&gt;attrib-&gt;height };
+        XRectangle allrect = { d-&gt;attrib.x, d-&gt;attrib.y, d-&gt;attrib.width, d-&gt;attrib.height };
         Damaged (&amp;allrect);
         return;
     }
@@ -174,9 +179,9 @@ void PlexyWindows::ClientMessaged (Atom type, int format, long *data/*[5]*/)
 void PlexyWindows::Resized(int x, int y, int width, int height, int border)
 {
     qDebug()&lt;&lt;x&lt;&lt;y&lt;&lt;width&lt;&lt;height&lt;&lt;border&lt;&lt;endl;
-    qDebug()&lt;&lt;d-&gt;attrib-&gt;width&lt;&lt;d-&gt;attrib-&gt;height&lt;&lt;d-&gt;attrib-&gt;border_width&lt;&lt;endl;
+    qDebug()&lt;&lt;d-&gt;attrib.width&lt;&lt;d-&gt;attrib.height&lt;&lt;d-&gt;attrib.border_width&lt;&lt;endl;
 
-    if (width != d-&gt;attrib-&gt;width || height != d-&gt;attrib-&gt;height || border != d-&gt;attrib-&gt;border_width || d-&gt;attrib-&gt;override_redirect) {
+    if (width != d-&gt;attrib.width || height != d-&gt;attrib.height || border != d-&gt;attrib.border_width || d-&gt;attrib.override_redirect) {
         qDebug()&lt;&lt;Q_FUNC_INFO&lt;&lt;endl;
         if (d-&gt;isRedirected) {
             qDebug()&lt;&lt;Q_FUNC_INFO&lt;&lt;endl;
@@ -189,11 +194,11 @@ void PlexyWindows::Resized(int x, int y, int width, int height, int border)
             Damaged(NULL);
         }
     }
-    d-&gt;attrib-&gt;height = height;
-    d-&gt;attrib-&gt;width  = width;
-    d-&gt;attrib-&gt;border_width = border;
-    d-&gt;attrib-&gt;x = x;
-    d-&gt;attrib-&gt;y = y;
+    d-&gt;attrib.height = height;
+    d-&gt;attrib.width  = width;
+    d-&gt;attrib.border_width = border;
+    d-&gt;attrib.x = x;
+    d-&gt;attrib.y = y;
 
     d-&gt;changeSet.height = height;
     d-&gt;changeSet.width  = width;</diff>
      <filename>plexywm/plexywindows.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ff4a9daf37d921de2bf17f4898625ac309b6d06d</id>
    </parent>
  </parents>
  <author>
    <name>Siraj Razick</name>
    <email>siraj.razick@collabora.co.uk</email>
  </author>
  <url>http://github.com/siraj/plexydesk/commit/8b7f286a20df1d7f25a868508f2f8aaa8e4a30da</url>
  <id>8b7f286a20df1d7f25a868508f2f8aaa8e4a30da</id>
  <committed-date>2009-10-07T11:19:52-07:00</committed-date>
  <authored-date>2009-10-07T11:19:52-07:00</authored-date>
  <message>* Window Mapping almsot works now</message>
  <tree>c612758c086674e3ee11a3135fe56845642280d6</tree>
  <committer>
    <name>Siraj Razick</name>
    <email>siraj.razick@collabora.co.uk</email>
  </committer>
</commit>
