diff options
author | Joel Bosveld <Joel.Bosveld@gmail.com> | 2009-07-08 10:49:23 +0800 |
---|---|---|
committer | Joel Bosveld <Joel.Bosveld@gmail.com> | 2009-07-08 10:49:23 +0800 |
commit | a0662523fc5aed725a9a409a948606f90dba5782 (patch) | |
tree | 63982a190dab850f101b00d127b7efc93172ddc3 | |
parent | d033e24e0541fc413e4ecfbae2a19d71c1a0638b (diff) |
plugin: correctly handle the reparenting of the window
Previously it was setting the mesh on the window as well as the frame, due to
the way reparenting works
-rw-r--r-- | plugin/src/ir.cpp | 15 | ||||
-rw-r--r-- | plugin/src/ir.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/plugin/src/ir.cpp b/plugin/src/ir.cpp index f1c2a2a..c07dcb6 100644 --- a/plugin/src/ir.cpp +++ b/plugin/src/ir.cpp @@ -173,6 +173,21 @@ IrWindow::resizeNotify (int dx, int dy, int dwidth, int dheight) window->resizeNotify (dx, dy, dwidth, dheight); } +void +IrWindow::windowNotify (CompWindowNotify n) +{ + if (n == CompWindowNotifyReparent) + XCompositeSetTriangularCoordinateMesh (screen->dpy (), + window->id (), NULL, 0, 0); + if (n == CompWindowNotifyUnreparent) + XCompositeSetTriangularCoordinateMesh (screen->dpy (), + window->id (), NULL, 0, 0); + if (n == CompWindowNotifyReparent || n == CompWindowNotifyUnreparent) + updateMesh (); + + window->windowNotify (n); +} + bool IrWindow::damageRect (bool initial, const CompRect& rect) diff --git a/plugin/src/ir.h b/plugin/src/ir.h index 0a9294e..c99ccb4 100644 --- a/plugin/src/ir.h +++ b/plugin/src/ir.h @@ -88,6 +88,7 @@ class IrWindow : void moveNotify (int dx, int dy, bool immediate); void resizeNotify (int dx, int dy, int dwidth, int dheight); + void windowNotify (CompWindowNotify n); bool damageRect (bool, const CompRect &); |