Merge lp:~unity-team/unity/unity.fix-startup-struts into lp:unity

Proposed by Jason Smith
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: no longer in the source branch.
Merged at revision: 1930
Proposed branch: lp:~unity-team/unity/unity.fix-startup-struts
Merge into: lp:unity
Diff against target: 136 lines (+10/-17)
3 files modified
plugins/unityshell/src/Launcher.cpp (+9/-14)
plugins/unityshell/src/Launcher.h (+0/-2)
plugins/unityshell/src/LauncherOptions.cpp (+1/-1)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-startup-struts
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+91984@code.launchpad.net
To post a comment you must log in.

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-02-08 03:01:18 +0000
3+++ plugins/unityshell/src/Launcher.cpp 2012-02-08 06:56:20 +0000
4@@ -205,7 +205,6 @@
5 _launcher_bottom_y = 0;
6 _folded_z_distance = 10.0f;
7 _launcher_action_state = ACTION_NONE;
8- _hidemode = LAUNCHER_HIDE_NEVER;
9 _icon_under_mouse = NULL;
10 _icon_mouse_down = NULL;
11 _drag_icon = NULL;
12@@ -422,7 +421,7 @@
13 .add("autohide-progress", AutohideProgress(current))
14 .add("dnd-delta", _dnd_delta_y)
15 .add("hovered", _hovered)
16- .add("hidemode", _hidemode)
17+ .add("hidemode", options()->hide_mode)
18 .add("hidden", _hidden)
19 .add("x", abs_geo.x)
20 .add("y", abs_geo.y)
21@@ -1117,7 +1116,7 @@
22
23 float autohide_offset = 0.0f;
24 *launcher_alpha = 1.0f;
25- if (_hidemode != LAUNCHER_HIDE_NEVER || _hide_machine->GetQuirk(LauncherHideMachine::LOCK_HIDE))
26+ if (options()->hide_mode != LAUNCHER_HIDE_NEVER || _hide_machine->GetQuirk(LauncherHideMachine::LOCK_HIDE))
27 {
28
29 float autohide_progress = AutohideProgress(current) * (1.0f - DragOutProgress(current));
30@@ -1137,7 +1136,7 @@
31 }
32
33 float drag_hide_progress = DragHideProgress(current);
34- if (_hidemode != LAUNCHER_HIDE_NEVER && drag_hide_progress > 0.0f)
35+ if (options()->hide_mode != LAUNCHER_HIDE_NEVER && drag_hide_progress > 0.0f)
36 {
37 autohide_offset -= geo.width * 0.25f * drag_hide_progress;
38
39@@ -1148,7 +1147,7 @@
40 // Inform the painter where to paint the box
41 box_geo = geo;
42
43- if (_hidemode != LAUNCHER_HIDE_NEVER || _hide_machine->GetQuirk(LauncherHideMachine::LOCK_HIDE))
44+ if (options()->hide_mode != LAUNCHER_HIDE_NEVER || _hide_machine->GetQuirk(LauncherHideMachine::LOCK_HIDE))
45 box_geo.x += autohide_offset;
46
47 /* Why we need last_geo? It stores the last box_geo (note: as it is a static variable,
48@@ -1504,7 +1503,7 @@
49 void
50 Launcher::OnWindowMaybeIntellihide(guint32 xid)
51 {
52- if (_hidemode != LAUNCHER_HIDE_NEVER)
53+ if (options()->hide_mode != LAUNCHER_HIDE_NEVER)
54 CheckWindowOverLauncher();
55 }
56
57@@ -1515,7 +1514,7 @@
58 * Delay to let the other window taking the focus first (otherwise focuschanged
59 * is emmited with the root window focus
60 */
61- if (_hidemode != LAUNCHER_HIDE_NEVER)
62+ if (options()->hide_mode != LAUNCHER_HIDE_NEVER)
63 g_idle_add((GSourceFunc)CheckWindowOverLauncherSync, this);
64 }
65
66@@ -1532,7 +1531,7 @@
67 _hide_machine->SetQuirk (LauncherHideMachine::EXPO_ACTIVE, WindowManager::Default ()->IsExpoActive ());
68 _hide_machine->SetQuirk (LauncherHideMachine::SCALE_ACTIVE, WindowManager::Default ()->IsScaleActive ());
69
70- if (_hidemode == LAUNCHER_HIDE_NEVER)
71+ if (options()->hide_mode == LAUNCHER_HIDE_NEVER)
72 return;
73 }
74
75@@ -1560,7 +1559,7 @@
76
77 LauncherHideMode Launcher::GetHideMode() const
78 {
79- return _hidemode;
80+ return options()->hide_mode;
81 }
82
83 /* End Launcher Show/Hide logic */
84@@ -1571,7 +1570,7 @@
85 Launcher* self = (Launcher*) data;
86 self->_parent->InputWindowEnableStruts(false);
87
88- if (self->_hidemode == LAUNCHER_HIDE_NEVER)
89+ if (self->options()->hide_mode == LAUNCHER_HIDE_NEVER)
90 self->_parent->InputWindowEnableStruts(true);
91
92 return false;
93@@ -1617,9 +1616,6 @@
94
95 void Launcher::SetHideMode(LauncherHideMode hidemode)
96 {
97- if (_hidemode == hidemode)
98- return;
99-
100 if (hidemode != LAUNCHER_HIDE_NEVER)
101 {
102 _parent->InputWindowEnableStruts(false);
103@@ -1631,7 +1627,6 @@
104 _parent->InputWindowEnableStruts(true);
105 }
106
107- _hidemode = hidemode;
108 _hide_machine->SetMode((LauncherHideMachine::HideMode) hidemode);
109 EnsureAnimation();
110 }
111
112=== modified file 'plugins/unityshell/src/Launcher.h'
113--- plugins/unityshell/src/Launcher.h 2012-02-08 03:01:18 +0000
114+++ plugins/unityshell/src/Launcher.h 2012-02-08 06:56:20 +0000
115@@ -338,8 +338,6 @@
116 float _launcher_bottom_y;
117 float _edge_overcome_pressure;
118
119- LauncherHideMode _hidemode;
120-
121 LauncherActionState _launcher_action_state;
122 LaunchAnimation _launch_animation;
123 UrgentAnimation _urgent_animation;
124
125=== modified file 'plugins/unityshell/src/LauncherOptions.cpp'
126--- plugins/unityshell/src/LauncherOptions.cpp 2012-02-08 01:50:36 +0000
127+++ plugins/unityshell/src/LauncherOptions.cpp 2012-02-08 06:56:20 +0000
128@@ -36,7 +36,7 @@
129 edge_responsiveness = 1.0f;
130 edge_reveal_pressure = 2000;
131 edge_stop_velocity = 4500;
132- hide_mode = LAUNCHER_HIDE_DODGE_WINDOWS;
133+ hide_mode = LAUNCHER_HIDE_NEVER;
134 icon_size = 48;
135 launch_animation = LAUNCH_ANIMATION_PULSE;
136 reveal_trigger = RevealTrigger::EDGE;