Merge lp://staging/~compiz-team/compiz/compiz.fix_1006335 into lp://staging/compiz/0.9.8
Proposed by
Sam Spilsbury
Status: | Merged |
---|---|
Merged at revision: | 3243 |
Proposed branch: | lp://staging/~compiz-team/compiz/compiz.fix_1006335 |
Merge into: | lp://staging/compiz/0.9.8 |
Diff against target: |
303 lines (+98/-47) 4 files modified
src/privatescreen.h (+22/-2) src/privatestackdebugger.h (+9/-4) src/screen.cpp (+37/-30) src/stackdebugger.cpp (+30/-11) |
To merge this branch: | bzr merge lp://staging/~compiz-team/compiz/compiz.fix_1006335 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
Compiz Maintainers | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2012-06-02.
Description of the change
Fixes needless list copying in event queues
To post a comment you must log in.
There's a risk of crashing, by assuming there are still only XEventsQueued by the time we consume them all. The server might have more events ready by then. More than we sized the event vector for, so either:
XNextEvent (dpy, &(*it));
or
it++
will crash. Because it is now past the end of the vector.
But it's a simple fix. Just use reserve() instead of resize() and push_back instead of writing to *it.