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
1=== modified file 'src/window.cpp'
2--- src/window.cpp 2011-11-07 02:27:18 +0000
3+++ src/window.cpp 2011-12-12 11:56:24 +0000
4@@ -1532,7 +1532,7 @@
5 XConfigureEvent xev;
6 XWindowAttributes attrib;
7 unsigned int nchildren;
8- Window rootRet, parentRet;
9+ Window rootRet, parentRet = 0;
10 Window *children;
11
12 xev.type = ConfigureNotify;
13@@ -1554,25 +1554,9 @@
14 xev.border_width = attrib.border_width;
15 xev.above = None;
16
17- if (priv->frame)
18- {
19- XWindowAttributes fAttrib;
20- XWindowAttributes wAttrib;
21-
22- /* Add offset between wrapper and client */
23- if (XGetWindowAttributes (screen->dpy (), priv->wrapper, &wAttrib))
24- {
25- xev.x += wAttrib.x;
26- xev.y += wAttrib.y;
27- }
28-
29- /* Add offset between frame and client */
30- if (XGetWindowAttributes (screen->dpy (), priv->frame, &fAttrib))
31- {
32- xev.x += fAttrib.x;
33- xev.y += fAttrib.y;
34- }
35- }
36+ /* Translate co-ordinates to root space */
37+ XTranslateCoordinates (screen->dpy (), priv->id, screen->root (), 0, 0,
38+ &xev.x, &xev.y, &parentRet);
39
40 /* We need to ensure that the stacking order is
41 * based on the current server stacking order so

Subscribers

People subscribed via source and target branches