Merge lp:~3v1n0/unity/bfb-drag-fix-5.0 into lp:unity/5.0

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2403
Proposed branch: lp:~3v1n0/unity/bfb-drag-fix-5.0
Merge into: lp:unity/5.0
Diff against target: 45 lines (+23/-1)
2 files modified
manual-tests/Launcher.txt (+15/-0)
plugins/unityshell/src/Launcher.cpp (+8/-1)
To merge this branch: bzr merge lp:~3v1n0/unity/bfb-drag-fix-5.0
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Tim Penhey (community) Approve
Review via email: mp+119242@code.launchpad.net

Commit message

Launcher: start the drag icon request from the original mouse-down position.

Description of the change

When dragging an icon, the start position should be set to the initial mouse position, not to the current mouse position so that it won't happen that an icon different to the one that has been pressed is going to be dragged.

Manual test included.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Can you confirm the revision of lp:unity that this is backporting the fix from?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

The fix has not been pushed in trunk yet, since I'm working on this on a separate branch.

Revision history for this message
Tim Penhey (thumper) wrote :

I think the general process is to wait until in trunk before putting in 5.0.

I'll approve this, but wait for the other to land first :)

review: Approve
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1377/console reported an error when processing this lp:~3v1n0/unity/bfb-drag-fix-5.0 branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'manual-tests/Launcher.txt'
2--- manual-tests/Launcher.txt 2012-08-03 19:55:42 +0000
3+++ manual-tests/Launcher.txt 2012-08-11 12:00:26 +0000
4@@ -169,6 +169,21 @@
5 it, and the any pips for running apps show again.
6
7
8+Dragging fixed icons does not reorder an icon above or below
9+------------------------------------------------------------
10+This test is about not reordering when dragging fixed icons.
11+
12+#. Move the mouse so it is over the BFB launcher icon
13+#. Press and hold the mouse button
14+#. Try to drag the icon to the right of the launcher.
15+#. Move the mouse down at least to the height of the second launcher icon
16+ keeping the mouse pressed.
17+#. Release
18+
19+Outcome:
20+ * No icon should be dragged.
21+
22+
23 Dragged launcher icons out of the launcher are properly drawn
24 -------------------------------------------------------------
25 This test ensures that the launcher icons out of the launcher are properly drawn
26
27=== modified file 'plugins/unityshell/src/Launcher.cpp'
28--- plugins/unityshell/src/Launcher.cpp 2012-08-03 19:55:42 +0000
29+++ plugins/unityshell/src/Launcher.cpp 2012-08-11 12:00:26 +0000
30@@ -2392,7 +2392,14 @@
31 }
32 else
33 {
34- StartIconDragRequest(x, y);
35+ // We we can safely start the icon drag, from the original mouse-down position
36+ if (_start_dragicon_handle > 0)
37+ {
38+ g_source_remove(_start_dragicon_handle);
39+ _start_dragicon_handle = 0;
40+ }
41+
42+ StartIconDragRequest(x - _dnd_delta_x, y - _dnd_delta_y);
43 }
44 }
45 else if (GetActionState() == ACTION_DRAG_LAUNCHER)

Subscribers

People subscribed via source and target branches