Merge lp:~unity-team/unity/unity.dont-emit-on-id-change into lp:unity
- unity.dont-emit-on-id-change
- Merge into trunk
Proposed by
Jason Smith
Status: | Merged |
---|---|
Approved by: | Jason Smith |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1885 |
Proposed branch: | lp:~unity-team/unity/unity.dont-emit-on-id-change |
Merge into: | lp:unity |
Diff against target: |
658 lines (+84/-224) 9 files modified
plugins/unityshell/src/Launcher.cpp (+34/-106) plugins/unityshell/src/Launcher.h (+4/-17) plugins/unityshell/src/LauncherController.cpp (+0/-13) plugins/unityshell/src/LauncherOptions.cpp (+28/-63) plugins/unityshell/src/LauncherOptions.h (+1/-13) plugins/unityshell/src/PointerBarrier.cpp (+3/-11) plugins/unityshell/src/PointerBarrier.h (+2/-0) plugins/unityshell/src/unityshell.cpp (+4/-1) plugins/unityshell/unityshell.xml.in (+8/-0) |
To merge this branch: | bzr merge lp:~unity-team/unity/unity.dont-emit-on-id-change |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Carr (community) | Approve | ||
Gord Allott (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
UNBLOCK
Fixes launcher reveal for some people
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gord Allott (gordallott) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'plugins/unityshell/src/Launcher.cpp' | |||
2 | --- plugins/unityshell/src/Launcher.cpp 2012-01-31 11:26:07 +0000 | |||
3 | +++ plugins/unityshell/src/Launcher.cpp 2012-02-01 01:11:26 +0000 | |||
4 | @@ -199,9 +199,6 @@ | |||
5 | 199 | _launcher_bottom_y = 0; | 199 | _launcher_bottom_y = 0; |
6 | 200 | _folded_z_distance = 10.0f; | 200 | _folded_z_distance = 10.0f; |
7 | 201 | _launcher_action_state = ACTION_NONE; | 201 | _launcher_action_state = ACTION_NONE; |
8 | 202 | _launch_animation = LAUNCH_ANIMATION_NONE; | ||
9 | 203 | _urgent_animation = URGENT_ANIMATION_NONE; | ||
10 | 204 | _autohide_animation = FADE_AND_SLIDE; | ||
11 | 205 | _hidemode = LAUNCHER_HIDE_NEVER; | 202 | _hidemode = LAUNCHER_HIDE_NEVER; |
12 | 206 | _icon_under_mouse = NULL; | 203 | _icon_under_mouse = NULL; |
13 | 207 | _icon_mouse_down = NULL; | 204 | _icon_mouse_down = NULL; |
14 | @@ -210,7 +207,6 @@ | |||
15 | 210 | _icon_glow_size = 62; | 207 | _icon_glow_size = 62; |
16 | 211 | _icon_image_size_delta = 6; | 208 | _icon_image_size_delta = 6; |
17 | 212 | _icon_size = _icon_image_size + _icon_image_size_delta; | 209 | _icon_size = _icon_image_size + _icon_image_size_delta; |
18 | 213 | _background_alpha = 0.6667; // about 0xAA | ||
19 | 214 | 210 | ||
20 | 215 | _enter_y = 0; | 211 | _enter_y = 0; |
21 | 216 | _launcher_drag_delta = 0; | 212 | _launcher_drag_delta = 0; |
22 | @@ -222,16 +218,15 @@ | |||
23 | 222 | _dnd_check_handle = 0; | 218 | _dnd_check_handle = 0; |
24 | 223 | 219 | ||
25 | 224 | _shortcuts_shown = false; | 220 | _shortcuts_shown = false; |
26 | 225 | _floating = false; | ||
27 | 226 | _hovered = false; | 221 | _hovered = false; |
28 | 227 | _hidden = false; | 222 | _hidden = false; |
29 | 228 | _render_drag_window = false; | 223 | _render_drag_window = false; |
30 | 229 | _drag_edge_touching = false; | 224 | _drag_edge_touching = false; |
31 | 230 | _backlight_mode = BACKLIGHT_NORMAL; | ||
32 | 231 | _last_button_press = 0; | 225 | _last_button_press = 0; |
33 | 232 | _selection_atom = 0; | 226 | _selection_atom = 0; |
34 | 233 | _drag_out_id = 0; | 227 | _drag_out_id = 0; |
35 | 234 | _drag_out_delta_x = 0.0f; | 228 | _drag_out_delta_x = 0.0f; |
36 | 229 | _edge_overcome_pressure = 0.0f; | ||
37 | 235 | 230 | ||
38 | 236 | // FIXME: remove | 231 | // FIXME: remove |
39 | 237 | _initial_drag_animation = false; | 232 | _initial_drag_animation = false; |
40 | @@ -404,7 +399,6 @@ | |||
41 | 404 | .add("dnd-exit-progress", DnDExitProgress(current)) | 399 | .add("dnd-exit-progress", DnDExitProgress(current)) |
42 | 405 | .add("autohide-progress", AutohideProgress(current)) | 400 | .add("autohide-progress", AutohideProgress(current)) |
43 | 406 | .add("dnd-delta", _dnd_delta_y) | 401 | .add("dnd-delta", _dnd_delta_y) |
44 | 407 | .add("floating", _floating) | ||
45 | 408 | .add("hovered", _hovered) | 402 | .add("hovered", _hovered) |
46 | 409 | .add("hidemode", _hidemode) | 403 | .add("hidemode", _hidemode) |
47 | 410 | .add("hidden", _hidden) | 404 | .add("hidden", _hidden) |
48 | @@ -609,7 +603,7 @@ | |||
49 | 609 | /* Min is when you are on the trigger */ | 603 | /* Min is when you are on the trigger */ |
50 | 610 | float Launcher::GetAutohidePositionMin() const | 604 | float Launcher::GetAutohidePositionMin() const |
51 | 611 | { | 605 | { |
53 | 612 | if (_autohide_animation == SLIDE_ONLY || _autohide_animation == FADE_AND_SLIDE) | 606 | if (options()->auto_hide_animation() == SLIDE_ONLY || options()->auto_hide_animation() == FADE_AND_SLIDE) |
54 | 613 | return 0.35f; | 607 | return 0.35f; |
55 | 614 | else | 608 | else |
56 | 615 | return 0.25f; | 609 | return 0.25f; |
57 | @@ -617,7 +611,7 @@ | |||
58 | 617 | /* Max is the initial state over the bfb */ | 611 | /* Max is the initial state over the bfb */ |
59 | 618 | float Launcher::GetAutohidePositionMax() const | 612 | float Launcher::GetAutohidePositionMax() const |
60 | 619 | { | 613 | { |
62 | 620 | if (_autohide_animation == SLIDE_ONLY || _autohide_animation == FADE_AND_SLIDE) | 614 | if (options()->auto_hide_animation() == SLIDE_ONLY || options()->auto_hide_animation() == FADE_AND_SLIDE) |
63 | 621 | return 1.00f; | 615 | return 1.00f; |
64 | 622 | else | 616 | else |
65 | 623 | return 0.75f; | 617 | return 0.75f; |
66 | @@ -684,7 +678,7 @@ | |||
67 | 684 | int urgent_ms = unity::TimeUtil::TimeDelta(¤t, &urgent_time); | 678 | int urgent_ms = unity::TimeUtil::TimeDelta(¤t, &urgent_time); |
68 | 685 | float result; | 679 | float result; |
69 | 686 | 680 | ||
71 | 687 | if (_urgent_animation == URGENT_ANIMATION_WIGGLE) | 681 | if (options()->urgent_animation() == URGENT_ANIMATION_WIGGLE) |
72 | 688 | result = CLAMP((float) urgent_ms / (float)(ANIM_DURATION_SHORT * WIGGLE_CYCLES), 0.0f, 1.0f); | 682 | result = CLAMP((float) urgent_ms / (float)(ANIM_DURATION_SHORT * WIGGLE_CYCLES), 0.0f, 1.0f); |
73 | 689 | else | 683 | else |
74 | 690 | result = CLAMP((float) urgent_ms / (float)(ANIM_DURATION_LONG * URGENT_BLINKS * 2), 0.0f, 1.0f); | 684 | result = CLAMP((float) urgent_ms / (float)(ANIM_DURATION_LONG * URGENT_BLINKS * 2), 0.0f, 1.0f); |
75 | @@ -803,22 +797,22 @@ | |||
76 | 803 | icon->SetQuirk(AbstractLauncherIcon::QUIRK_STARTING, false); | 797 | icon->SetQuirk(AbstractLauncherIcon::QUIRK_STARTING, false); |
77 | 804 | 798 | ||
78 | 805 | float backlight_strength; | 799 | float backlight_strength; |
80 | 806 | if (_backlight_mode == BACKLIGHT_ALWAYS_ON) | 800 | if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) |
81 | 807 | backlight_strength = BACKLIGHT_STRENGTH; | 801 | backlight_strength = BACKLIGHT_STRENGTH; |
82 | 808 | else if (IsBackLightModeToggles()) | 802 | else if (IsBackLightModeToggles()) |
83 | 809 | backlight_strength = BACKLIGHT_STRENGTH * running_progress; | 803 | backlight_strength = BACKLIGHT_STRENGTH * running_progress; |
84 | 810 | else | 804 | else |
85 | 811 | backlight_strength = 0.0f; | 805 | backlight_strength = 0.0f; |
86 | 812 | 806 | ||
88 | 813 | switch (_launch_animation) | 807 | switch (options()->launch_animation()) |
89 | 814 | { | 808 | { |
90 | 815 | case LAUNCH_ANIMATION_NONE: | 809 | case LAUNCH_ANIMATION_NONE: |
91 | 816 | result = backlight_strength; | 810 | result = backlight_strength; |
92 | 817 | break; | 811 | break; |
93 | 818 | case LAUNCH_ANIMATION_BLINK: | 812 | case LAUNCH_ANIMATION_BLINK: |
95 | 819 | if (_backlight_mode == BACKLIGHT_ALWAYS_ON) | 813 | if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) |
96 | 820 | result = IconStartingBlinkValue(icon, current); | 814 | result = IconStartingBlinkValue(icon, current); |
98 | 821 | else if (_backlight_mode == BACKLIGHT_ALWAYS_OFF) | 815 | else if (options()->backlight_mode() == BACKLIGHT_ALWAYS_OFF) |
99 | 822 | result = 1.0f - IconStartingBlinkValue(icon, current); | 816 | result = 1.0f - IconStartingBlinkValue(icon, current); |
100 | 823 | else | 817 | else |
101 | 824 | result = backlight_strength; // The blink concept is a failure in this case (it just doesn't work right) | 818 | result = backlight_strength; // The blink concept is a failure in this case (it just doesn't work right) |
102 | @@ -828,7 +822,7 @@ | |||
103 | 828 | icon->ResetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); | 822 | icon->ResetQuirkTime(AbstractLauncherIcon::QUIRK_STARTING); |
104 | 829 | 823 | ||
105 | 830 | result = backlight_strength; | 824 | result = backlight_strength; |
107 | 831 | if (_backlight_mode == BACKLIGHT_ALWAYS_ON) | 825 | if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) |
108 | 832 | result *= CLAMP(running_progress + IconStartingPulseValue(icon, current), 0.0f, 1.0f); | 826 | result *= CLAMP(running_progress + IconStartingPulseValue(icon, current), 0.0f, 1.0f); |
109 | 833 | else if (IsBackLightModeToggles()) | 827 | else if (IsBackLightModeToggles()) |
110 | 834 | result += (BACKLIGHT_STRENGTH - result) * (1.0f - IconStartingPulseValue(icon, current)); | 828 | result += (BACKLIGHT_STRENGTH - result) * (1.0f - IconStartingPulseValue(icon, current)); |
111 | @@ -839,16 +833,16 @@ | |||
112 | 839 | 833 | ||
113 | 840 | if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_PULSE_ONCE)) | 834 | if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_PULSE_ONCE)) |
114 | 841 | { | 835 | { |
116 | 842 | if (_backlight_mode == BACKLIGHT_ALWAYS_ON) | 836 | if (options()->backlight_mode() == BACKLIGHT_ALWAYS_ON) |
117 | 843 | result *= CLAMP(running_progress + IconPulseOnceValue(icon, current), 0.0f, 1.0f); | 837 | result *= CLAMP(running_progress + IconPulseOnceValue(icon, current), 0.0f, 1.0f); |
119 | 844 | else if (_backlight_mode == BACKLIGHT_NORMAL) | 838 | else if (options()->backlight_mode() == BACKLIGHT_NORMAL) |
120 | 845 | result += (BACKLIGHT_STRENGTH - result) * (1.0f - IconPulseOnceValue(icon, current)); | 839 | result += (BACKLIGHT_STRENGTH - result) * (1.0f - IconPulseOnceValue(icon, current)); |
121 | 846 | else | 840 | else |
122 | 847 | result = 1.0f - CLAMP(running_progress + IconPulseOnceValue(icon, current), 0.0f, 1.0f); | 841 | result = 1.0f - CLAMP(running_progress + IconPulseOnceValue(icon, current), 0.0f, 1.0f); |
123 | 848 | } | 842 | } |
124 | 849 | 843 | ||
125 | 850 | // urgent serves to bring the total down only | 844 | // urgent serves to bring the total down only |
127 | 851 | if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT) && _urgent_animation == URGENT_ANIMATION_PULSE) | 845 | if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT) && options()->urgent_animation() == URGENT_ANIMATION_PULSE) |
128 | 852 | result *= 0.2f + 0.8f * IconUrgentPulseValue(icon, current); | 846 | result *= 0.2f + 0.8f * IconUrgentPulseValue(icon, current); |
129 | 853 | 847 | ||
130 | 854 | return result; | 848 | return result; |
131 | @@ -868,10 +862,10 @@ | |||
132 | 868 | 862 | ||
133 | 869 | bool Launcher::IconDrawEdgeOnly(AbstractLauncherIcon* icon) const | 863 | bool Launcher::IconDrawEdgeOnly(AbstractLauncherIcon* icon) const |
134 | 870 | { | 864 | { |
136 | 871 | if (_backlight_mode == BACKLIGHT_EDGE_TOGGLE) | 865 | if (options()->backlight_mode() == BACKLIGHT_EDGE_TOGGLE) |
137 | 872 | return true; | 866 | return true; |
138 | 873 | 867 | ||
140 | 874 | if (_backlight_mode == BACKLIGHT_NORMAL_EDGE_TOGGLE && !icon->WindowVisibleOnMonitor(monitor)) | 868 | if (options()->backlight_mode() == BACKLIGHT_NORMAL_EDGE_TOGGLE && !icon->WindowVisibleOnMonitor(monitor)) |
141 | 875 | return true; | 869 | return true; |
142 | 876 | 870 | ||
143 | 877 | return false; | 871 | return false; |
144 | @@ -938,7 +932,7 @@ | |||
145 | 938 | urgent_progress = CLAMP(urgent_progress * 3.0f - 2.0f, 0.0f, 1.0f); // we want to go 3x faster than the urgent normal cycle | 932 | urgent_progress = CLAMP(urgent_progress * 3.0f - 2.0f, 0.0f, 1.0f); // we want to go 3x faster than the urgent normal cycle |
146 | 939 | arg.glow_intensity = urgent_progress; | 933 | arg.glow_intensity = urgent_progress; |
147 | 940 | 934 | ||
149 | 941 | if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT) && _urgent_animation == URGENT_ANIMATION_WIGGLE) | 935 | if (icon->GetQuirk(AbstractLauncherIcon::QUIRK_URGENT) && options()->urgent_animation() == URGENT_ANIMATION_WIGGLE) |
150 | 942 | { | 936 | { |
151 | 943 | arg.z_rotation = IconUrgentWiggleValue(icon, current); | 937 | arg.z_rotation = IconUrgentWiggleValue(icon, current); |
152 | 944 | } | 938 | } |
153 | @@ -1101,7 +1095,7 @@ | |||
154 | 1101 | { | 1095 | { |
155 | 1102 | 1096 | ||
156 | 1103 | float autohide_progress = AutohideProgress(current) * (1.0f - DragOutProgress(current)); | 1097 | float autohide_progress = AutohideProgress(current) * (1.0f - DragOutProgress(current)); |
158 | 1104 | if (_autohide_animation == FADE_ONLY) | 1098 | if (options()->auto_hide_animation() == FADE_ONLY) |
159 | 1105 | { | 1099 | { |
160 | 1106 | *launcher_alpha = 1.0f - autohide_progress; | 1100 | *launcher_alpha = 1.0f - autohide_progress; |
161 | 1107 | } | 1101 | } |
162 | @@ -1110,7 +1104,7 @@ | |||
163 | 1110 | if (autohide_progress > 0.0f) | 1104 | if (autohide_progress > 0.0f) |
164 | 1111 | { | 1105 | { |
165 | 1112 | autohide_offset -= geo.width * autohide_progress; | 1106 | autohide_offset -= geo.width * autohide_progress; |
167 | 1113 | if (_autohide_animation == FADE_AND_SLIDE) | 1107 | if (options()->auto_hide_animation() == FADE_AND_SLIDE) |
168 | 1114 | *launcher_alpha = 1.0f - 0.5f * autohide_progress; | 1108 | *launcher_alpha = 1.0f - 0.5f * autohide_progress; |
169 | 1115 | } | 1109 | } |
170 | 1116 | } | 1110 | } |
171 | @@ -1554,20 +1548,24 @@ | |||
172 | 1554 | Launcher::UpdateOptions(Options::Ptr options) | 1548 | Launcher::UpdateOptions(Options::Ptr options) |
173 | 1555 | { | 1549 | { |
174 | 1556 | SetHideMode(options->hide_mode); | 1550 | SetHideMode(options->hide_mode); |
175 | 1557 | SetAutoHideAnimation(options->auto_hide_animation); | ||
176 | 1558 | SetFloating(options->floating); | ||
177 | 1559 | SetBacklightMode(options->backlight_mode); | ||
178 | 1560 | SetLaunchAnimation(options->launch_animation); | ||
179 | 1561 | SetUrgentAnimation(options->urgent_animation); | ||
180 | 1562 | SetIconSize(options->tile_size, options->icon_size); | 1551 | SetIconSize(options->tile_size, options->icon_size); |
182 | 1563 | decaymulator_->rate_of_decay = options->edge_decay_rate(); | 1552 | |
183 | 1553 | // make the effect half as strong as specified as other values shouldn't scale | ||
184 | 1554 | // as quickly as the max velocity multiplier | ||
185 | 1555 | float responsiveness_mult = ((options->edge_responsiveness() - 1) * .025) + 1; | ||
186 | 1556 | |||
187 | 1557 | decaymulator_->rate_of_decay = options->edge_decay_rate() * responsiveness_mult; | ||
188 | 1558 | _edge_overcome_pressure = options->edge_overcome_pressure() * responsiveness_mult; | ||
189 | 1564 | 1559 | ||
190 | 1565 | _pointer_barrier->threshold = options->edge_stop_velocity(); | 1560 | _pointer_barrier->threshold = options->edge_stop_velocity(); |
191 | 1561 | _pointer_barrier->max_velocity_multiplier = options->edge_responsiveness(); | ||
192 | 1566 | _pointer_barrier->DestroyBarrier(); | 1562 | _pointer_barrier->DestroyBarrier(); |
193 | 1567 | _pointer_barrier->ConstructBarrier(); | 1563 | _pointer_barrier->ConstructBarrier(); |
194 | 1568 | 1564 | ||
197 | 1569 | _hide_machine->reveal_pressure = options->edge_reveal_pressure(); | 1565 | _hide_machine->reveal_pressure = options->edge_reveal_pressure() * responsiveness_mult; |
198 | 1570 | _hide_machine->edge_decay_rate = options->edge_decay_rate(); | 1566 | _hide_machine->edge_decay_rate = options->edge_decay_rate() * responsiveness_mult; |
199 | 1567 | |||
200 | 1568 | EnsureAnimation(); | ||
201 | 1571 | } | 1569 | } |
202 | 1572 | 1570 | ||
203 | 1573 | void Launcher::SetHideMode(LauncherHideMode hidemode) | 1571 | void Launcher::SetHideMode(LauncherHideMode hidemode) |
204 | @@ -1591,45 +1589,14 @@ | |||
205 | 1591 | EnsureAnimation(); | 1589 | EnsureAnimation(); |
206 | 1592 | } | 1590 | } |
207 | 1593 | 1591 | ||
208 | 1594 | AutoHideAnimation Launcher::GetAutoHideAnimation() const | ||
209 | 1595 | { | ||
210 | 1596 | return _autohide_animation; | ||
211 | 1597 | } | ||
212 | 1598 | |||
213 | 1599 | void Launcher::SetAutoHideAnimation(AutoHideAnimation animation) | ||
214 | 1600 | { | ||
215 | 1601 | if (_autohide_animation == animation) | ||
216 | 1602 | return; | ||
217 | 1603 | |||
218 | 1604 | _autohide_animation = animation; | ||
219 | 1605 | } | ||
220 | 1606 | |||
221 | 1607 | void Launcher::SetFloating(bool floating) | ||
222 | 1608 | { | ||
223 | 1609 | if (_floating == floating) | ||
224 | 1610 | return; | ||
225 | 1611 | |||
226 | 1612 | _floating = floating; | ||
227 | 1613 | EnsureAnimation(); | ||
228 | 1614 | } | ||
229 | 1615 | |||
230 | 1616 | void Launcher::SetBacklightMode(BacklightMode mode) | ||
231 | 1617 | { | ||
232 | 1618 | if (_backlight_mode == mode) | ||
233 | 1619 | return; | ||
234 | 1620 | |||
235 | 1621 | _backlight_mode = mode; | ||
236 | 1622 | EnsureAnimation(); | ||
237 | 1623 | } | ||
238 | 1624 | |||
239 | 1625 | BacklightMode Launcher::GetBacklightMode() const | 1592 | BacklightMode Launcher::GetBacklightMode() const |
240 | 1626 | { | 1593 | { |
242 | 1627 | return _backlight_mode; | 1594 | return options()->backlight_mode(); |
243 | 1628 | } | 1595 | } |
244 | 1629 | 1596 | ||
245 | 1630 | bool Launcher::IsBackLightModeToggles() const | 1597 | bool Launcher::IsBackLightModeToggles() const |
246 | 1631 | { | 1598 | { |
248 | 1632 | switch (_backlight_mode) { | 1599 | switch (options()->backlight_mode()) { |
249 | 1633 | case BACKLIGHT_NORMAL: | 1600 | case BACKLIGHT_NORMAL: |
250 | 1634 | case BACKLIGHT_EDGE_TOGGLE: | 1601 | case BACKLIGHT_EDGE_TOGGLE: |
251 | 1635 | case BACKLIGHT_NORMAL_EDGE_TOGGLE: | 1602 | case BACKLIGHT_NORMAL_EDGE_TOGGLE: |
252 | @@ -1640,36 +1607,6 @@ | |||
253 | 1640 | } | 1607 | } |
254 | 1641 | 1608 | ||
255 | 1642 | void | 1609 | void |
256 | 1643 | Launcher::SetLaunchAnimation(LaunchAnimation animation) | ||
257 | 1644 | { | ||
258 | 1645 | if (_launch_animation == animation) | ||
259 | 1646 | return; | ||
260 | 1647 | |||
261 | 1648 | _launch_animation = animation; | ||
262 | 1649 | } | ||
263 | 1650 | |||
264 | 1651 | LaunchAnimation | ||
265 | 1652 | Launcher::GetLaunchAnimation() const | ||
266 | 1653 | { | ||
267 | 1654 | return _launch_animation; | ||
268 | 1655 | } | ||
269 | 1656 | |||
270 | 1657 | void | ||
271 | 1658 | Launcher::SetUrgentAnimation(UrgentAnimation animation) | ||
272 | 1659 | { | ||
273 | 1660 | if (_urgent_animation == animation) | ||
274 | 1661 | return; | ||
275 | 1662 | |||
276 | 1663 | _urgent_animation = animation; | ||
277 | 1664 | } | ||
278 | 1665 | |||
279 | 1666 | UrgentAnimation | ||
280 | 1667 | Launcher::GetUrgentAnimation() const | ||
281 | 1668 | { | ||
282 | 1669 | return _urgent_animation; | ||
283 | 1670 | } | ||
284 | 1671 | |||
285 | 1672 | void | ||
286 | 1673 | Launcher::SetActionState(LauncherActionState actionstate) | 1610 | Launcher::SetActionState(LauncherActionState actionstate) |
287 | 1674 | { | 1611 | { |
288 | 1675 | if (_launcher_action_state == actionstate) | 1612 | if (_launcher_action_state == actionstate) |
289 | @@ -1812,15 +1749,6 @@ | |||
290 | 1812 | 1749 | ||
291 | 1813 | } | 1750 | } |
292 | 1814 | 1751 | ||
293 | 1815 | void Launcher::SetBackgroundAlpha(float background_alpha) | ||
294 | 1816 | { | ||
295 | 1817 | if (_background_alpha == background_alpha) | ||
296 | 1818 | return; | ||
297 | 1819 | |||
298 | 1820 | _background_alpha = background_alpha; | ||
299 | 1821 | NeedRedraw(); | ||
300 | 1822 | } | ||
301 | 1823 | |||
302 | 1824 | void Launcher::OnIconAdded(AbstractLauncherIcon* icon) | 1752 | void Launcher::OnIconAdded(AbstractLauncherIcon* icon) |
303 | 1825 | { | 1753 | { |
304 | 1826 | EnsureAnimation(); | 1754 | EnsureAnimation(); |
305 | @@ -2008,7 +1936,7 @@ | |||
306 | 2008 | else | 1936 | else |
307 | 2009 | { | 1937 | { |
308 | 2010 | nux::Color color = _background_color; | 1938 | nux::Color color = _background_color; |
310 | 2011 | color.alpha = _background_alpha; | 1939 | color.alpha = options()->background_alpha; |
311 | 2012 | gPainter.Paint2DQuadColor(GfxContext, bkg_box, color); | 1940 | gPainter.Paint2DQuadColor(GfxContext, bkg_box, color); |
312 | 2013 | } | 1941 | } |
313 | 2014 | 1942 | ||
314 | @@ -2386,10 +2314,10 @@ | |||
315 | 2386 | _hide_machine->AddRevealPressure(event->velocity); | 2314 | _hide_machine->AddRevealPressure(event->velocity); |
316 | 2387 | decaymulator_->value = 0; | 2315 | decaymulator_->value = 0; |
317 | 2388 | } | 2316 | } |
319 | 2389 | else | 2317 | else if (abs_geo.x > 0) |
320 | 2390 | { | 2318 | { |
321 | 2391 | decaymulator_->value = decaymulator_->value + event->velocity; | 2319 | decaymulator_->value = decaymulator_->value + event->velocity; |
323 | 2392 | if (decaymulator_->value > options()->edge_overcome_pressure) | 2320 | if (decaymulator_->value > _edge_overcome_pressure) |
324 | 2393 | { | 2321 | { |
325 | 2394 | _pointer_barrier->ReleaseBarrier(event->event_id); | 2322 | _pointer_barrier->ReleaseBarrier(event->event_id); |
326 | 2395 | } | 2323 | } |
327 | 2396 | 2324 | ||
328 | === modified file 'plugins/unityshell/src/Launcher.h' | |||
329 | --- plugins/unityshell/src/Launcher.h 2012-01-29 05:07:56 +0000 | |||
330 | +++ plugins/unityshell/src/Launcher.h 2012-02-01 01:11:26 +0000 | |||
331 | @@ -78,7 +78,6 @@ | |||
332 | 78 | AbstractLauncherIcon* GetSelectedMenuIcon() const; | 78 | AbstractLauncherIcon* GetSelectedMenuIcon() const; |
333 | 79 | 79 | ||
334 | 80 | void SetIconSize(int tile_size, int icon_size); | 80 | void SetIconSize(int tile_size, int icon_size); |
335 | 81 | void SetBackgroundAlpha(float background_alpha); | ||
336 | 82 | 81 | ||
337 | 83 | LauncherHideMachine* HideMachine() { return _hide_machine; } | 82 | LauncherHideMachine* HideMachine() { return _hide_machine; } |
338 | 84 | 83 | ||
339 | @@ -93,11 +92,6 @@ | |||
340 | 93 | void SetModel(LauncherModel* model); | 92 | void SetModel(LauncherModel* model); |
341 | 94 | LauncherModel* GetModel() const; | 93 | LauncherModel* GetModel() const; |
342 | 95 | 94 | ||
343 | 96 | void SetFloating(bool floating); | ||
344 | 97 | |||
345 | 98 | void SetHideMode(LauncherHideMode hidemode); | ||
346 | 99 | LauncherHideMode GetHideMode() const; | ||
347 | 100 | |||
348 | 101 | void StartKeyShowLauncher(); | 95 | void StartKeyShowLauncher(); |
349 | 102 | void EndKeyShowLauncher(); | 96 | void EndKeyShowLauncher(); |
350 | 103 | 97 | ||
351 | @@ -107,15 +101,6 @@ | |||
352 | 107 | BacklightMode GetBacklightMode() const; | 101 | BacklightMode GetBacklightMode() const; |
353 | 108 | bool IsBackLightModeToggles() const; | 102 | bool IsBackLightModeToggles() const; |
354 | 109 | 103 | ||
355 | 110 | void SetLaunchAnimation(LaunchAnimation animation); | ||
356 | 111 | LaunchAnimation GetLaunchAnimation() const; | ||
357 | 112 | |||
358 | 113 | void SetUrgentAnimation(UrgentAnimation animation); | ||
359 | 114 | UrgentAnimation GetUrgentAnimation() const; | ||
360 | 115 | |||
361 | 116 | void SetAutoHideAnimation(AutoHideAnimation animation); | ||
362 | 117 | AutoHideAnimation GetAutoHideAnimation() const; | ||
363 | 118 | |||
364 | 119 | nux::BaseWindow* GetParent() const | 104 | nux::BaseWindow* GetParent() const |
365 | 120 | { | 105 | { |
366 | 121 | return _parent; | 106 | return _parent; |
367 | @@ -166,6 +151,9 @@ | |||
368 | 166 | private: | 151 | private: |
369 | 167 | typedef nux::ObjectPtr<nux::BaseTexture> BaseTexturePtr; | 152 | typedef nux::ObjectPtr<nux::BaseTexture> BaseTexturePtr; |
370 | 168 | 153 | ||
371 | 154 | LauncherHideMode GetHideMode() const; | ||
372 | 155 | void SetHideMode(LauncherHideMode hidemode); | ||
373 | 156 | |||
374 | 169 | typedef enum | 157 | typedef enum |
375 | 170 | { | 158 | { |
376 | 171 | ACTION_NONE, | 159 | ACTION_NONE, |
377 | @@ -343,7 +331,6 @@ | |||
378 | 343 | QuicklistView* _active_quicklist; | 331 | QuicklistView* _active_quicklist; |
379 | 344 | 332 | ||
380 | 345 | bool _hovered; | 333 | bool _hovered; |
381 | 346 | bool _floating; | ||
382 | 347 | bool _hidden; | 334 | bool _hidden; |
383 | 348 | bool _render_drag_window; | 335 | bool _render_drag_window; |
384 | 349 | bool _check_window_over_launcher; | 336 | bool _check_window_over_launcher; |
385 | @@ -357,13 +344,13 @@ | |||
386 | 357 | float _folded_z_distance; | 344 | float _folded_z_distance; |
387 | 358 | float _launcher_top_y; | 345 | float _launcher_top_y; |
388 | 359 | float _launcher_bottom_y; | 346 | float _launcher_bottom_y; |
389 | 347 | float _edge_overcome_pressure; | ||
390 | 360 | 348 | ||
391 | 361 | LauncherHideMode _hidemode; | 349 | LauncherHideMode _hidemode; |
392 | 362 | 350 | ||
393 | 363 | LauncherActionState _launcher_action_state; | 351 | LauncherActionState _launcher_action_state; |
394 | 364 | LaunchAnimation _launch_animation; | 352 | LaunchAnimation _launch_animation; |
395 | 365 | UrgentAnimation _urgent_animation; | 353 | UrgentAnimation _urgent_animation; |
396 | 366 | AutoHideAnimation _autohide_animation; | ||
397 | 367 | 354 | ||
398 | 368 | nux::ObjectPtr<nux::IOpenGLBaseTexture> _offscreen_drag_texture; | 355 | nux::ObjectPtr<nux::IOpenGLBaseTexture> _offscreen_drag_texture; |
399 | 369 | 356 | ||
400 | 370 | 357 | ||
401 | === modified file 'plugins/unityshell/src/LauncherController.cpp' | |||
402 | --- plugins/unityshell/src/LauncherController.cpp 2012-01-30 18:48:50 +0000 | |||
403 | +++ plugins/unityshell/src/LauncherController.cpp 2012-02-01 01:11:26 +0000 | |||
404 | @@ -763,19 +763,6 @@ | |||
405 | 763 | Controller::Controller(Display* display) | 763 | Controller::Controller(Display* display) |
406 | 764 | { | 764 | { |
407 | 765 | options = Options::Ptr(new Options()); | 765 | options = Options::Ptr(new Options()); |
408 | 766 | |||
409 | 767 | // defaults must match XML file | ||
410 | 768 | options()->tile_size = 54; | ||
411 | 769 | options()->icon_size = 48; | ||
412 | 770 | options()->backlight_mode = BACKLIGHT_ALWAYS_ON; | ||
413 | 771 | options()->hide_mode = LAUNCHER_HIDE_DODGE_WINDOWS; | ||
414 | 772 | options()->launch_animation = LAUNCH_ANIMATION_PULSE; | ||
415 | 773 | options()->urgent_animation = URGENT_ANIMATION_WIGGLE; | ||
416 | 774 | options()->edge_reveal_pressure = 2000; | ||
417 | 775 | options()->edge_overcome_pressure = 2000; | ||
418 | 776 | options()->edge_decay_rate = 1500; | ||
419 | 777 | options()->edge_stop_velocity = 4500; | ||
420 | 778 | |||
421 | 779 | // options must be set before creating pimpl which loads launchers | 766 | // options must be set before creating pimpl which loads launchers |
422 | 780 | pimpl = new Impl(display, this); | 767 | pimpl = new Impl(display, this); |
423 | 781 | } | 768 | } |
424 | 782 | 769 | ||
425 | === modified file 'plugins/unityshell/src/LauncherOptions.cpp' | |||
426 | --- plugins/unityshell/src/LauncherOptions.cpp 2012-01-26 03:41:09 +0000 | |||
427 | +++ plugins/unityshell/src/LauncherOptions.cpp 2012-02-01 01:11:26 +0000 | |||
428 | @@ -27,69 +27,34 @@ | |||
429 | 27 | 27 | ||
430 | 28 | Options::Options() | 28 | Options::Options() |
431 | 29 | { | 29 | { |
495 | 30 | hide_mode.changed.connect(sigc::mem_fun (this, &Options::OnHideModeChanged)); | 30 | // defaults from XML file |
496 | 31 | launch_animation.changed.connect(sigc::mem_fun (this, &Options::OnLaunchAnimationChanged)); | 31 | auto_hide_animation = FADE_AND_SLIDE; |
497 | 32 | urgent_animation.changed.connect(sigc::mem_fun (this, &Options::OnUrgentAnimationChanged)); | 32 | background_alpha = 0.6667; |
498 | 33 | auto_hide_animation.changed.connect(sigc::mem_fun (this, &Options::OnAutoHideAnimationChanged)); | 33 | backlight_mode = BACKLIGHT_ALWAYS_ON; |
499 | 34 | backlight_mode.changed.connect(sigc::mem_fun (this, &Options::OnBacklightModeChanged)); | 34 | edge_decay_rate = 1500; |
500 | 35 | icon_size.changed.connect(sigc::mem_fun (this, &Options::OnIconSizeChanged)); | 35 | edge_overcome_pressure = 2000; |
501 | 36 | tile_size.changed.connect(sigc::mem_fun (this, &Options::OnTileSizeChanged)); | 36 | edge_responsiveness = 1.0f; |
502 | 37 | floating.changed.connect(sigc::mem_fun (this, &Options::OnFloatingChanged)); | 37 | edge_reveal_pressure = 2000; |
503 | 38 | background_alpha.changed.connect(sigc::mem_fun (this, &Options::OnBackgroundAlphaChanged)); | 38 | edge_stop_velocity = 4500; |
504 | 39 | edge_decay_rate.changed.connect(sigc::mem_fun (this, &Options::OnEdgeOptionChanged)); | 39 | hide_mode = LAUNCHER_HIDE_DODGE_WINDOWS; |
505 | 40 | edge_overcome_pressure.changed.connect(sigc::mem_fun (this, &Options::OnEdgeOptionChanged)); | 40 | icon_size = 48; |
506 | 41 | edge_stop_velocity.changed.connect(sigc::mem_fun (this, &Options::OnEdgeOptionChanged)); | 41 | launch_animation = LAUNCH_ANIMATION_PULSE; |
507 | 42 | edge_reveal_pressure.changed.connect(sigc::mem_fun (this, &Options::OnEdgeOptionChanged)); | 42 | tile_size = 54; |
508 | 43 | } | 43 | urgent_animation = URGENT_ANIMATION_WIGGLE; |
509 | 44 | 44 | ||
510 | 45 | void Options::OnEdgeOptionChanged(int value) | 45 | auto_hide_animation.changed.connect ([&] (AutoHideAnimation value)-> void { option_changed.emit(); }); |
511 | 46 | { | 46 | background_alpha.changed.connect ([&] (float value) -> void { option_changed.emit(); }); |
512 | 47 | option_changed.emit(); | 47 | backlight_mode.changed.connect ([&] (BacklightMode value) -> void { option_changed.emit(); }); |
513 | 48 | } | 48 | edge_decay_rate.changed.connect ([&] (int value) -> void { option_changed.emit(); }); |
514 | 49 | 49 | edge_overcome_pressure.changed.connect([&] (int value) -> void { option_changed.emit(); }); | |
515 | 50 | void Options::OnHideModeChanged(LauncherHideMode value) | 50 | edge_responsiveness.changed.connect ([&] (float value) -> void { option_changed.emit(); }); |
516 | 51 | { | 51 | edge_reveal_pressure.changed.connect ([&] (int value) -> void { option_changed.emit(); }); |
517 | 52 | option_changed.emit(); | 52 | edge_stop_velocity.changed.connect ([&] (int value) -> void { option_changed.emit(); }); |
518 | 53 | } | 53 | hide_mode.changed.connect ([&] (LauncherHideMode value) -> void { option_changed.emit(); }); |
519 | 54 | 54 | icon_size.changed.connect ([&] (int value) -> void { option_changed.emit(); }); | |
520 | 55 | void Options::OnLaunchAnimationChanged(LaunchAnimation value) | 55 | launch_animation.changed.connect ([&] (LaunchAnimation value) -> void { option_changed.emit(); }); |
521 | 56 | { | 56 | tile_size.changed.connect ([&] (int value) -> void { option_changed.emit(); }); |
522 | 57 | option_changed.emit(); | 57 | urgent_animation.changed.connect ([&] (UrgentAnimation value) -> void { option_changed.emit(); }); |
460 | 58 | } | ||
461 | 59 | |||
462 | 60 | void Options::OnUrgentAnimationChanged(UrgentAnimation value) | ||
463 | 61 | { | ||
464 | 62 | option_changed.emit(); | ||
465 | 63 | } | ||
466 | 64 | |||
467 | 65 | void Options::OnAutoHideAnimationChanged(AutoHideAnimation value) | ||
468 | 66 | { | ||
469 | 67 | option_changed.emit(); | ||
470 | 68 | } | ||
471 | 69 | |||
472 | 70 | void Options::OnBacklightModeChanged(BacklightMode value) | ||
473 | 71 | { | ||
474 | 72 | option_changed.emit(); | ||
475 | 73 | } | ||
476 | 74 | |||
477 | 75 | void Options::OnIconSizeChanged(int value) | ||
478 | 76 | { | ||
479 | 77 | option_changed.emit(); | ||
480 | 78 | } | ||
481 | 79 | |||
482 | 80 | void Options::OnTileSizeChanged(int value) | ||
483 | 81 | { | ||
484 | 82 | option_changed.emit(); | ||
485 | 83 | } | ||
486 | 84 | |||
487 | 85 | void Options::OnFloatingChanged(bool value) | ||
488 | 86 | { | ||
489 | 87 | option_changed.emit(); | ||
490 | 88 | } | ||
491 | 89 | |||
492 | 90 | void Options::OnBackgroundAlphaChanged(float value) | ||
493 | 91 | { | ||
494 | 92 | option_changed.emit(); | ||
523 | 93 | } | 58 | } |
524 | 94 | 59 | ||
525 | 95 | 60 | ||
526 | 96 | 61 | ||
527 | === modified file 'plugins/unityshell/src/LauncherOptions.h' | |||
528 | --- plugins/unityshell/src/LauncherOptions.h 2012-01-26 03:41:09 +0000 | |||
529 | +++ plugins/unityshell/src/LauncherOptions.h 2012-02-01 01:11:26 +0000 | |||
530 | @@ -86,26 +86,14 @@ | |||
531 | 86 | nux::Property<BacklightMode> backlight_mode; | 86 | nux::Property<BacklightMode> backlight_mode; |
532 | 87 | nux::Property<int> icon_size; | 87 | nux::Property<int> icon_size; |
533 | 88 | nux::Property<int> tile_size; | 88 | nux::Property<int> tile_size; |
534 | 89 | nux::Property<bool> floating; | ||
535 | 90 | nux::Property<float> background_alpha; | 89 | nux::Property<float> background_alpha; |
536 | 91 | nux::Property<int> edge_decay_rate; | 90 | nux::Property<int> edge_decay_rate; |
537 | 92 | nux::Property<int> edge_overcome_pressure; | 91 | nux::Property<int> edge_overcome_pressure; |
538 | 93 | nux::Property<int> edge_stop_velocity; | 92 | nux::Property<int> edge_stop_velocity; |
539 | 94 | nux::Property<int> edge_reveal_pressure; | 93 | nux::Property<int> edge_reveal_pressure; |
540 | 94 | nux::Property<float> edge_responsiveness; | ||
541 | 95 | 95 | ||
542 | 96 | sigc::signal<void> option_changed; | 96 | sigc::signal<void> option_changed; |
543 | 97 | |||
544 | 98 | private: | ||
545 | 99 | void OnHideModeChanged(LauncherHideMode value); | ||
546 | 100 | void OnLaunchAnimationChanged(LaunchAnimation value); | ||
547 | 101 | void OnUrgentAnimationChanged(UrgentAnimation value); | ||
548 | 102 | void OnAutoHideAnimationChanged(AutoHideAnimation value); | ||
549 | 103 | void OnBacklightModeChanged(BacklightMode value); | ||
550 | 104 | void OnIconSizeChanged(int value); | ||
551 | 105 | void OnEdgeOptionChanged(int value); | ||
552 | 106 | void OnTileSizeChanged(int value); | ||
553 | 107 | void OnFloatingChanged(bool value); | ||
554 | 108 | void OnBackgroundAlphaChanged(float value); | ||
555 | 109 | }; | 97 | }; |
556 | 110 | 98 | ||
557 | 111 | } | 99 | } |
558 | 112 | 100 | ||
559 | === modified file 'plugins/unityshell/src/PointerBarrier.cpp' | |||
560 | --- plugins/unityshell/src/PointerBarrier.cpp 2012-01-30 18:38:12 +0000 | |||
561 | +++ plugins/unityshell/src/PointerBarrier.cpp 2012-02-01 01:11:26 +0000 | |||
562 | @@ -44,6 +44,8 @@ | |||
563 | 44 | smoothing = 75; | 44 | smoothing = 75; |
564 | 45 | smoothing_count_ = 0; | 45 | smoothing_count_ = 0; |
565 | 46 | smoothing_accum_ = 0; | 46 | smoothing_accum_ = 0; |
566 | 47 | smoothing_handle_ = 0; | ||
567 | 48 | max_velocity_multiplier = 1.0f; | ||
568 | 47 | } | 49 | } |
569 | 48 | 50 | ||
570 | 49 | void PointerBarrierWrapper::ConstructBarrier() | 51 | void PointerBarrierWrapper::ConstructBarrier() |
571 | @@ -108,7 +110,7 @@ | |||
572 | 108 | BarrierEvent::Ptr event (new BarrierEvent()); | 110 | BarrierEvent::Ptr event (new BarrierEvent()); |
573 | 109 | event->x = last_x_; | 111 | event->x = last_x_; |
574 | 110 | event->y = last_y_; | 112 | event->y = last_y_; |
576 | 111 | event->velocity = std::min<int> (600, smoothing_accum_ / smoothing_count_); | 113 | event->velocity = std::min<int> (600 * max_velocity_multiplier, smoothing_accum_ / smoothing_count_); |
577 | 112 | event->event_id = last_event_; | 114 | event->event_id = last_event_; |
578 | 113 | 115 | ||
579 | 114 | barrier_event.emit(this, event); | 116 | barrier_event.emit(this, event); |
580 | @@ -125,16 +127,6 @@ | |||
581 | 125 | 127 | ||
582 | 126 | if (notify_event->barrier == barrier && notify_event->subtype == XFixesBarrierHitNotify) | 128 | if (notify_event->barrier == barrier && notify_event->subtype == XFixesBarrierHitNotify) |
583 | 127 | { | 129 | { |
584 | 128 | if (notify_event->event_id != last_event_) | ||
585 | 129 | { | ||
586 | 130 | EmitCurrentData(); | ||
587 | 131 | if (smoothing_handle_) | ||
588 | 132 | { | ||
589 | 133 | g_source_remove(smoothing_handle_); | ||
590 | 134 | smoothing_handle_ = 0; | ||
591 | 135 | } | ||
592 | 136 | } | ||
593 | 137 | |||
594 | 138 | last_x_ = notify_event->x; | 130 | last_x_ = notify_event->x; |
595 | 139 | last_y_ = notify_event->y; | 131 | last_y_ = notify_event->y; |
596 | 140 | last_event_ = notify_event->event_id; | 132 | last_event_ = notify_event->event_id; |
597 | 141 | 133 | ||
598 | === modified file 'plugins/unityshell/src/PointerBarrier.h' | |||
599 | --- plugins/unityshell/src/PointerBarrier.h 2012-01-27 03:28:20 +0000 | |||
600 | +++ plugins/unityshell/src/PointerBarrier.h 2012-02-01 01:11:26 +0000 | |||
601 | @@ -57,6 +57,8 @@ | |||
602 | 57 | 57 | ||
603 | 58 | nux::Property<int> smoothing; | 58 | nux::Property<int> smoothing; |
604 | 59 | 59 | ||
605 | 60 | nux::Property<float> max_velocity_multiplier; | ||
606 | 61 | |||
607 | 60 | PointerBarrierWrapper(); | 62 | PointerBarrierWrapper(); |
608 | 61 | 63 | ||
609 | 62 | void ConstructBarrier(); | 64 | void ConstructBarrier(); |
610 | 63 | 65 | ||
611 | === modified file 'plugins/unityshell/src/unityshell.cpp' | |||
612 | --- plugins/unityshell/src/unityshell.cpp 2012-01-29 22:41:55 +0000 | |||
613 | +++ plugins/unityshell/src/unityshell.cpp 2012-02-01 01:11:26 +0000 | |||
614 | @@ -309,6 +309,7 @@ | |||
615 | 309 | 309 | ||
616 | 310 | optionSetStopVelocityNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); | 310 | optionSetStopVelocityNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); |
617 | 311 | optionSetRevealPressureNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); | 311 | optionSetRevealPressureNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); |
618 | 312 | optionSetEdgeResponsivenessNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); | ||
619 | 312 | optionSetOvercomePressureNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); | 313 | optionSetOvercomePressureNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); |
620 | 313 | optionSetDecayRateNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); | 314 | optionSetDecayRateNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); |
621 | 314 | optionSetShowMinimizedWindowsNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); | 315 | optionSetShowMinimizedWindowsNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); |
622 | @@ -2165,7 +2166,7 @@ | |||
623 | 2165 | { | 2166 | { |
624 | 2166 | nux::Geometry geo = launcher->GetAbsoluteGeometry(); | 2167 | nux::Geometry geo = launcher->GetAbsoluteGeometry(); |
625 | 2167 | 2168 | ||
627 | 2168 | if (launcher->Hidden() || launcher->GetHideMode() == LAUNCHER_HIDE_NEVER || launcher->GetHideMode() == LAUNCHER_HIDE_AUTOHIDE) | 2169 | if (launcher->Hidden() || launcher->options()->hide_mode == LAUNCHER_HIDE_NEVER || launcher->options()->hide_mode == LAUNCHER_HIDE_AUTOHIDE) |
628 | 2169 | continue; | 2170 | continue; |
629 | 2170 | 2171 | ||
630 | 2171 | if (geo.IsInside(result)) | 2172 | if (geo.IsInside(result)) |
631 | @@ -2368,6 +2369,8 @@ | |||
632 | 2368 | break; | 2369 | break; |
633 | 2369 | case UnityshellOptions::RevealPressure: | 2370 | case UnityshellOptions::RevealPressure: |
634 | 2370 | launcher_options->edge_reveal_pressure = optionGetRevealPressure() * 100; | 2371 | launcher_options->edge_reveal_pressure = optionGetRevealPressure() * 100; |
635 | 2372 | case UnityshellOptions::EdgeResponsiveness: | ||
636 | 2373 | launcher_options->edge_responsiveness = optionGetEdgeResponsiveness(); | ||
637 | 2371 | break; | 2374 | break; |
638 | 2372 | default: | 2375 | default: |
639 | 2373 | break; | 2376 | break; |
640 | 2374 | 2377 | ||
641 | === modified file 'plugins/unityshell/unityshell.xml.in' | |||
642 | --- plugins/unityshell/unityshell.xml.in 2012-01-30 18:40:04 +0000 | |||
643 | +++ plugins/unityshell/unityshell.xml.in 2012-02-01 01:11:26 +0000 | |||
644 | @@ -268,6 +268,14 @@ | |||
645 | 268 | <max>64</max> | 268 | <max>64</max> |
646 | 269 | <precision>1</precision> | 269 | <precision>1</precision> |
647 | 270 | </option> | 270 | </option> |
648 | 271 | <option name="edge_responsiveness" type="float"> | ||
649 | 272 | <_short>Launcher Reveal Edge Responsiveness</_short> | ||
650 | 273 | <_long>A conglomerate setting that modifies the overall responsiveness of the launcher reveal</_long> | ||
651 | 274 | <default>1.0</default> | ||
652 | 275 | <min>0.2</min> | ||
653 | 276 | <max>8.0</max> | ||
654 | 277 | <precision>0.1</precision> | ||
655 | 278 | </option> | ||
656 | 271 | <option name="reveal_pressure" type="int"> | 279 | <option name="reveal_pressure" type="int"> |
657 | 272 | <_short>Launcher Reveal Pressure</_short> | 280 | <_short>Launcher Reveal Pressure</_short> |
658 | 273 | <_long>Amount of mouse pressure required to reveal launcher</_long> | 281 | <_long>Amount of mouse pressure required to reveal launcher</_long> |
+1