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

Proposed by Daniel d'Andrada
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2047
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
Marco Trevisan (Treviño) Approve
Review via email: mp+95457@code.qastaging.launchpad.net

This proposal supersedes 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.

UNBLOCK

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

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 : Posted in a previous version of this proposal

> 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.

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

Patch updated.

Revision history for this message
Andrea Cimitan (cimi) wrote :

Fixes the bug for me

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve

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.