Merge lp:~aacid/qtmir/dont_reuse_stale_cookies into lp:qtmir

Proposed by Albert Astals Cid on 2017-03-30
Status: Merged
Approved by: Gerry Boland on 2017-03-30
Approved revision: 626
Merged at revision: 637
Proposed branch: lp:~aacid/qtmir/dont_reuse_stale_cookies
Merge into: lp:qtmir
Diff against target: 12 lines (+2/-0)
1 file modified
src/platforms/mirserver/eventbuilder.cpp (+2/-0)
To merge this branch: bzr merge lp:~aacid/qtmir/dont_reuse_stale_cookies
Reviewer Review Type Date Requested Status
Andreas Pokorny (community) Approve on 2017-03-30
Gerry Boland (community) 2017-03-30 Approve on 2017-03-30
Review via email: mp+321426@code.launchpad.net

Commit message

EventInfo::store: Store an empty cookie for mir events without cookie

Otherwise when the m_eventInfoVector ringbuffer wraps we end up returning a stale cookie for events that had no cookie (e.g. mouse move events)

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

Yes, makes sense.

review: Approve
Andreas Pokorny (andreas-pokorny) wrote :

oh yes..

mea culpa.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/mirserver/eventbuilder.cpp'
2--- src/platforms/mirserver/eventbuilder.cpp 2017-03-03 10:39:24 +0000
3+++ src/platforms/mirserver/eventbuilder.cpp 2017-03-30 09:09:20 +0000
4@@ -293,6 +293,8 @@
5 cookie.resize(mir_cookie_buffer_size(cookie_ptr));
6 mir_cookie_to_buffer(cookie_ptr, cookie.data(), cookie.size());
7 mir_cookie_release(cookie_ptr);
8+ } else {
9+ cookie.resize(0);
10 }
11 if (mir_input_event_type_pointer == mir_input_event_get_type(iev))
12 {

Subscribers

People subscribed via source and target branches