Merge lp://qastaging/~dandrader/unity/lp942625 into lp://qastaging/unity

Proposed by Daniel d'Andrada
Status: Superseded
Proposed branch: lp://qastaging/~dandrader/unity/lp942625
Merge into: lp://qastaging/unity
Diff against target: 32 lines (+8/-3)
1 file modified
plugins/unityshell/src/GestureEngine.cpp (+8/-3)
To merge this branch: bzr merge lp://qastaging/~dandrader/unity/lp942625
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Needs Fixing
Review via email: mp+95450@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2012-03-01.

Description of the change

Fixes lp:942625

GestureEngine::FindCompWindow() would enter in an infinite loop if the window passed to it is the root window since its break condition (parent == root) would never be reached as parent would be zero.

Also includes some other safeguards around the same issue.

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) wrote :

8 + Status status;
9
10 XQueryTree(_screen->dpy(), window, &root, &parent, &children, &nchildren);
11 + if (status == 0)
12 + break;

Did you forget to initialize 'status'?

review: Needs Fixing
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

> 8 + Status status;
> 9
> 10 XQueryTree(_screen->dpy(), window, &root, &parent, &children,
> &nchildren);
> 11 + if (status == 0)
> 12 + break;
>
> Did you forget to initialize 'status'?

Yes indeed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.