Nux

Merge lp:~unity-team/nux/nux.fix-dx-dy-on-enter into lp:nux/2.0

Proposed by Jason Smith
Status: Merged
Approved by: Neil J. Patel
Approved revision: 550
Merged at revision: 550
Proposed branch: lp:~unity-team/nux/nux.fix-dx-dy-on-enter
Merge into: lp:nux/2.0
Diff against target: 24 lines (+3/-1)
1 file modified
Nux/WindowCompositor.cpp (+3/-1)
To merge this branch: bzr merge lp:~unity-team/nux/nux.fix-dx-dy-on-enter
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+90660@code.launchpad.net

Description of the change

UNBLOCK

Fixes events being sent to newly entered widgets having HUGE values for dx,dy

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) wrote :

approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/WindowCompositor.cpp'
2--- Nux/WindowCompositor.cpp 2012-01-20 20:37:11 +0000
3+++ Nux/WindowCompositor.cpp 2012-01-30 08:37:24 +0000
4@@ -417,6 +417,7 @@
5 }
6 else if (hit_view && (event.type == NUX_MOUSE_MOVE))
7 {
8+ bool emit_delta = true;
9 if (hit_view != mouse_over_area_)
10 {
11 if (mouse_over_area_ != NULL)
12@@ -433,10 +434,11 @@
13 // The area we found under the mouse pointer receives a "mouse enter signal".
14 SetMouseOverArea(hit_view);
15 mouse_over_area_->EmitMouseEnterSignal(hit_view_x, hit_view_y, event.GetMouseState(), event.GetKeyState());
16+ emit_delta = false;
17 }
18
19 // Send a "mouse mouse signal".
20- mouse_over_area_->EmitMouseMoveSignal(hit_view_x, hit_view_y, dx, dy, event.GetMouseState(), event.GetKeyState());
21+ mouse_over_area_->EmitMouseMoveSignal(hit_view_x, hit_view_y, emit_delta ? dx : 0, emit_delta ? dy : 0, event.GetMouseState(), event.GetKeyState());
22 }
23 else if (hit_view && ((event.type == NUX_MOUSE_PRESSED) || (event.type == NUX_MOUSE_DOUBLECLICK)))
24 {

Subscribers

People subscribed via source and target branches

to all changes: