Merge lp:~mc-return/compiz/compiz.merge-fix1101549-and-fix1101561-missing-break into lp:compiz/0.9.9
Proposed by
MC Return
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Timo Jyrinki | ||||||||
Approved revision: | 3586 | ||||||||
Merged at revision: | 3589 | ||||||||
Proposed branch: | lp:~mc-return/compiz/compiz.merge-fix1101549-and-fix1101561-missing-break | ||||||||
Merge into: | lp:compiz/0.9.9 | ||||||||
Diff against target: |
19 lines (+3/-2) 1 file modified
plugins/annotate/src/annotate.cpp (+3/-2) |
||||||||
To merge this branch: | bzr merge lp:~mc-return/compiz/compiz.merge-fix1101549-and-fix1101561-missing-break | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury | Approve | ||
MC Return | Needs Information | ||
PS Jenkins bot | continuous-integration | Pending | |
Review via email: mp+145161@code.launchpad.net |
Commit message
Fixed the cases MotionNotify == EnterNotify == LeaveNotify
in the AnnoScreen:
Do not call handleMotionEvent (pointerX, pointerY) twice.
Fall-through here is intentional.
Added missing break to not fall-through to default.
Fixed indentation.
Description of the change
Note:
This fix has been tested and the test revealed no obvious changes in the behaviour
of Annotate.
There is still some flickering going on, during drawing of rectangle or ellipse, see
bug 1107818, this still has to be fixed. This did not regress with this MP, but was
there before.
To post a comment you must log in.
4 @@ -964,9 +964,12 @@
5 switch (event->type) {
6 case MotionNotify:
7 handleMotionEvent (pointerX, pointerY);
8 + break;
9 case EnterNotify:
10 + break;
11 case LeaveNotify:
12 handleMotionEvent (pointerX, pointerY);
13 + break;
14 default:
Ouch, an intended fall through caught by coverity as a false positive. I knew this would eventually happen.
Unfortunately this is currently broken (in a very small way). pointerX and pointerY are updated on enter leave and motion events however this code only handles the change on motion and leave.
I think coverity won't complain if you do this:
case EnterNotify: nEvent (pointerX, pointerY);
case LeaveNotify:
case MotionNotify:
handleMotio
break;