ecere/gui/drivers/XInterface: (#537) Fixed trailing on non-compositing WMs
authorJerome St-Louis <jerome@ecere.com>
Wed, 12 Feb 2014 22:38:50 +0000 (07:38 +0900)
committerJerome St-Louis <jerome@ecere.com>
Wed, 12 Feb 2014 22:38:50 +0000 (07:38 +0900)
- This was happening on GNOME Flashback (Metacity)
- Fixed the expose box offset
- For some reason remaining a mystery, calling Update() from the Expose event
  handler was causing trailing. Could not manage to reproduce the problem on
  Windows.
- The problem went away by simply updating from the back buffer
  (Only calling UpdateDirty()).

ecere/src/gui/drivers/XInterface.ec

index 7119cb9..09a363e 100644 (file)
@@ -1758,15 +1758,10 @@ class XInterface : Interface
                {
                   XExposeEvent * event = (XExposeEvent *) thisEvent;
                   Box box;
-                  box.left = event->x - window.clientStart.x;
-                  box.top = event->y - window.clientStart.y;
+                  box.left = event->x;
+                  box.top = event->y;
                   box.right = box.left + event->width - 1;
                   box.bottom = box.top + event->height - 1;
-                  window.Update(box);
-                  box.left   += window.clientStart.x;
-                  box.top    += window.clientStart.y;
-                  box.right  += window.clientStart.x;
-                  box.bottom += window.clientStart.y;
                   window.UpdateDirty(box);
                   break;
                }