Merge lp:~chasedouglas/unity/touchy-feely.rounding into lp:~unity-team/unity/touchy-feely

Proposed by Chase Douglas
Status: Merged
Merge reported by: Neil J. Patel
Merged at revision: not available
Proposed branch: lp:~chasedouglas/unity/touchy-feely.rounding
Merge into: lp:~unity-team/unity/touchy-feely
Diff against target: 13 lines (+2/-2)
1 file modified
targets/mutter/plugin.vala (+2/-2)
To merge this branch: bzr merge lp:~chasedouglas/unity/touchy-feely.rounding
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+33727@code.launchpad.net

Description of the change

Correct the rounding of pan deltas so it is balanced. This fixes some window drift to the top and left sides of the screen.

Ideally, the rounded off parts should be stored and used the next time, or the deltas should be calculated based on the original starting position of the gesture. However, this should be a reasonable stop-gap solution.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Makes sense and code looks ok. But I can't test it directly with the right hardware myself.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'targets/mutter/plugin.vala'
2--- targets/mutter/plugin.vala 2010-08-24 22:26:35 +0000
3+++ targets/mutter/plugin.vala 2010-08-26 02:59:39 +0000
4@@ -1143,8 +1143,8 @@
5 }
6 else
7 {
8- start_pan_window.x += Math.floorf (event.pan_event.delta_x);
9- start_pan_window.y += Math.floorf (event.pan_event.delta_y);
10+ start_pan_window.x += Math.floorf (event.pan_event.delta_x + 0.5f);
11+ start_pan_window.y += Math.floorf (event.pan_event.delta_y + 0.5f);
12 start_pan_window.x = float.max (start_pan_window.x, QUICKLAUNCHER_WIDTH);
13 start_pan_window.y = float.max (start_pan_window.y, PANEL_HEIGHT);
14

Subscribers

People subscribed via source and target branches

to all changes: