Merge lp:~aacid/unity-2d/unity-2d-shell-bring_back_do_not_hide_immediately_after_removing_icon into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 916
Merged at revision: 919
Proposed branch: lp:~aacid/unity-2d/unity-2d-shell-bring_back_do_not_hide_immediately_after_removing_icon
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 45 lines (+15/-0)
3 files modified
shell/common/BaseBehavior.qml (+1/-0)
shell/launcher/IntelliHideBehavior.qml (+8/-0)
shell/launcher/LauncherLoader.qml (+6/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d-shell-bring_back_do_not_hide_immediately_after_removing_icon
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Review via email: mp+89046@code.launchpad.net

Description of the change

[launcher] Bring back revision 803 from lp:unity-2d ([launcher] Do not hide the launcher immediately after removing an icon. Fixes: https://bugs.launchpad.net/bugs/884410.)

The code is different since we've moved to QML since then, but the idea is similar, once the visibility forcing has ended give 1 sec more before hiding the launcher

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :
914. By Albert Astals Cid

Use a variable instead of a function as suggested by Michał

Revision history for this message
Michał Sawicz (saviq) wrote :

Please use "target: launcherBehavior.item", otherwise if you change the behavior itself, the binding will break. Can you see if we can get rid of the "when:" after that change? Should work fine when item is the target.

review: Needs Fixing
915. By Albert Astals Cid

merge bzr+ssh://bazaar.launchpad.net/~unity-2d-team/unity-2d/unity-2d-shell/

916. By Albert Astals Cid

Target the loader item not the loader as suggested by Michał

Revision history for this message
Michał Sawicz (saviq) wrote :

Looks good. And works, too!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/common/BaseBehavior.qml'
2--- shell/common/BaseBehavior.qml 2011-11-29 19:24:56 +0000
3+++ shell/common/BaseBehavior.qml 2012-01-19 08:20:29 +0000
4@@ -3,4 +3,5 @@
5 Item {
6 property bool shown
7 property variant target
8+ property bool forcedVisible: false
9 }
10
11=== modified file 'shell/launcher/IntelliHideBehavior.qml'
12--- shell/launcher/IntelliHideBehavior.qml 2012-01-17 15:55:43 +0000
13+++ shell/launcher/IntelliHideBehavior.qml 2012-01-19 08:20:29 +0000
14@@ -9,6 +9,14 @@
15
16 shown: target !== undefined && (target.activeFocus || shownBecauseOfMousePosition || !windows.intersects)
17
18+ onForcedVisibleChanged:
19+ {
20+ if (!forcedVisible) {
21+ shownBecauseOfMousePosition = true
22+ mouseLeaveTimer.restart()
23+ }
24+ }
25+
26 Timer {
27 id: edgeHitTimer
28 interval: 500
29
30=== modified file 'shell/launcher/LauncherLoader.qml'
31--- shell/launcher/LauncherLoader.qml 2011-12-21 18:42:06 +0000
32+++ shell/launcher/LauncherLoader.qml 2012-01-19 08:20:29 +0000
33@@ -30,6 +30,12 @@
34 when: launcherBehavior.status == Loader.Ready
35 }
36
37+ Binding {
38+ target: launcherBehavior.item
39+ property: "forcedVisible"
40+ value: visibilityController.forceVisible
41+ }
42+
43 Connections {
44 target: declarativeView
45 onSuperKeyHeldChanged: {

Subscribers

People subscribed via source and target branches