Merge lp:~smspillaz/compiz-core/compiz-core.fix_890947 into lp:compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Merged
Approved by: Gord Allott
Approved revision: 2896
Merged at revision: 2898
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.fix_890947
Merge into: lp:compiz-core/0.9.5
Diff against target: 41 lines (+4/-20)
1 file modified
src/window.cpp (+4/-20)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.fix_890947
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+85320@code.launchpad.net

Description of the change

Fix bug 890947

There's a race when sending synthetic configure notify events to clients where just after being reparented the geometry is queried, but we don't offset it correctly since we haven't received the frame reference from the server yet, so use XTranslateCoordinates there directly as we're in synchronous operation.

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/window.cpp'
--- src/window.cpp 2011-11-07 02:27:18 +0000
+++ src/window.cpp 2011-12-12 11:56:24 +0000
@@ -1532,7 +1532,7 @@
1532 XConfigureEvent xev;1532 XConfigureEvent xev;
1533 XWindowAttributes attrib;1533 XWindowAttributes attrib;
1534 unsigned int nchildren;1534 unsigned int nchildren;
1535 Window rootRet, parentRet;1535 Window rootRet, parentRet = 0;
1536 Window *children;1536 Window *children;
15371537
1538 xev.type = ConfigureNotify;1538 xev.type = ConfigureNotify;
@@ -1554,25 +1554,9 @@
1554 xev.border_width = attrib.border_width;1554 xev.border_width = attrib.border_width;
1555 xev.above = None;1555 xev.above = None;
15561556
1557 if (priv->frame)1557 /* Translate co-ordinates to root space */
1558 {1558 XTranslateCoordinates (screen->dpy (), priv->id, screen->root (), 0, 0,
1559 XWindowAttributes fAttrib;1559 &xev.x, &xev.y, &parentRet);
1560 XWindowAttributes wAttrib;
1561
1562 /* Add offset between wrapper and client */
1563 if (XGetWindowAttributes (screen->dpy (), priv->wrapper, &wAttrib))
1564 {
1565 xev.x += wAttrib.x;
1566 xev.y += wAttrib.y;
1567 }
1568
1569 /* Add offset between frame and client */
1570 if (XGetWindowAttributes (screen->dpy (), priv->frame, &fAttrib))
1571 {
1572 xev.x += fAttrib.x;
1573 xev.y += fAttrib.y;
1574 }
1575 }
15761560
1577 /* We need to ensure that the stacking order is1561 /* We need to ensure that the stacking order is
1578 * based on the current server stacking order so1562 * based on the current server stacking order so

Subscribers

People subscribed via source and target branches