Merge lp:~unity-team/unity/x-sru1 into lp:unity/7.4
- x-sru1
- Merge into xenial
Proposed by
Marco Trevisan (Treviño)
Status: | Merged |
---|---|
Approved by: | Andrea Azzarone |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4107 |
Proposed branch: | lp:~unity-team/unity/x-sru1 |
Merge into: | lp:unity/7.4 |
Diff against target: |
1113 lines (+301/-245) 19 files modified
debian/changelog (+29/-1) launcher/ExpoLauncherIcon.cpp (+2/-1) launcher/LauncherController.cpp (+1/-1) launcher/LauncherIcon.cpp (+2/-0) launcher/SoftwareCenterLauncherIcon.cpp (+1/-1) launcher/SwitcherController.cpp (+4/-5) launcher/SwitcherView.cpp (+8/-10) launcher/SwitcherView.h (+0/-4) plugins/unityshell/src/WindowMinimizeSpeedController.cpp (+1/-0) plugins/unityshell/src/inputremover.cpp (+1/-1) plugins/unityshell/src/unityshell.cpp (+68/-28) plugins/unityshell/src/unityshell.h (+163/-187) tests/test_gnome_session_manager.cpp (+10/-0) tests/test_switcher_controller.cpp (+2/-3) unity-shared/DashStyle.cpp (+1/-1) unity-shared/DecorationStyle.cpp (+1/-0) unity-shared/DecorationStyle.h (+1/-0) unity-shared/GnomeKeyGrabber.cpp (+5/-2) unity-shared/PanelStyle.cpp (+1/-0) |
To merge this branch: | bzr merge lp:~unity-team/unity/x-sru1 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Azzarone (community) | Approve | ||
Review via email: mp+295779@code.launchpad.net |
Commit message
Releasing unity SRU1 for Xenial
Description of the change
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 'debian/changelog' | |||
2 | --- debian/changelog 2016-05-14 23:01:37 +0000 | |||
3 | +++ debian/changelog 2016-05-26 00:00:49 +0000 | |||
4 | @@ -1,7 +1,35 @@ | |||
6 | 1 | unity (7.4.0-0ubuntu1) UNRELEASED; urgency=medium | 1 | unity (7.4.0+16.04.20160526-0ubuntu1) UNRELEASED; urgency=medium |
7 | 2 | 2 | ||
8 | 3 | [ Marco Trevisan (Treviño) ] | ||
9 | 3 | * Releasing Unity 7.4.0 | 4 | * Releasing Unity 7.4.0 |
10 | 4 | 5 | ||
11 | 6 | [ Andrea Azzarone ] | ||
12 | 7 | * Properly remove SoftwareCenterLauncherIcon in case of failure. (LP: | ||
13 | 8 | #1553165) | ||
14 | 9 | * Update ExpoLauncherIcon in case the quicklist is used to switch vp. | ||
15 | 10 | (LP: #1525685) | ||
16 | 11 | * GnomeKeyGrabber: do not activate an action if it's a repeated one. | ||
17 | 12 | (LP: #1572241) | ||
18 | 13 | * Properly calculate array indexes to avoid crashes. (LP: #1570843) | ||
19 | 14 | * Fallback to "background" class in case no background is specified | ||
20 | 15 | for title bars and top panel. (LP: #1575527) | ||
21 | 16 | * Do not reset the shortcut for icons that have their own shortcut. | ||
22 | 17 | (LP: #1562847) | ||
23 | 18 | |||
24 | 19 | [ Marco Trevisan (Treviño) ] | ||
25 | 20 | * SwitcherView: close the mouse-selected application on middle-click | ||
26 | 21 | (LP: #1574689) | ||
27 | 22 | * UnityScreen, UnityWindow: cleanup a little the code, and ensure | ||
28 | 23 | overridden CompositeWindow functions get actually called | ||
29 | 24 | * SwitcherController: don't try to get a window from empty selections | ||
30 | 25 | (LP: #1580211) | ||
31 | 26 | * DashStyle: ensure LazyLoadTexture disconnects from signals on | ||
32 | 27 | destruction (LP: #1580212) | ||
33 | 28 | |||
34 | 29 | [ handsome_feng ] | ||
35 | 30 | * Change the x_offset of expo when launcher position changed. (LP: | ||
36 | 31 | #1562348, LP: #1573897) | ||
37 | 32 | |||
38 | 5 | -- Marco Trevisan (Treviño) <marco@ubuntu.com> Sun, 15 May 2016 01:00:09 +0200 | 33 | -- Marco Trevisan (Treviño) <marco@ubuntu.com> Sun, 15 May 2016 01:00:09 +0200 |
39 | 6 | 34 | ||
40 | 7 | unity (7.4.0+16.04.20160415-0ubuntu1) xenial; urgency=medium | 35 | unity (7.4.0+16.04.20160415-0ubuntu1) xenial; urgency=medium |
41 | 8 | 36 | ||
42 | === modified file 'launcher/ExpoLauncherIcon.cpp' | |||
43 | --- launcher/ExpoLauncherIcon.cpp 2015-11-20 11:35:08 +0000 | |||
44 | +++ launcher/ExpoLauncherIcon.cpp 2016-05-26 00:00:49 +0000 | |||
45 | @@ -127,8 +127,9 @@ | |||
46 | 127 | dbusmenu_menuitem_property_set_int(menu_item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED); | 127 | dbusmenu_menuitem_property_set_int(menu_item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED); |
47 | 128 | } | 128 | } |
48 | 129 | 129 | ||
50 | 130 | signals_.Add(new ItemSignal(menu_item, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, [h, v] (DbusmenuMenuitem*, int) { | 130 | signals_.Add(new ItemSignal(menu_item, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, [this, h, v] (DbusmenuMenuitem*, int) { |
51 | 131 | WindowManager::Default().SetCurrentViewport({h, v}); | 131 | WindowManager::Default().SetCurrentViewport({h, v}); |
52 | 132 | UpdateIcon(); | ||
53 | 132 | })); | 133 | })); |
54 | 133 | result.push_back(menu_item); | 134 | result.push_back(menu_item); |
55 | 134 | } | 135 | } |
56 | 135 | 136 | ||
57 | === modified file 'launcher/LauncherController.cpp' | |||
58 | --- launcher/LauncherController.cpp 2016-03-18 01:47:08 +0000 | |||
59 | +++ launcher/LauncherController.cpp 2016-05-26 00:00:49 +0000 | |||
60 | @@ -555,7 +555,7 @@ | |||
61 | 555 | icon->SetShortcut(std::to_string(shortcut % 10)[0]); | 555 | icon->SetShortcut(std::to_string(shortcut % 10)[0]); |
62 | 556 | ++shortcut; | 556 | ++shortcut; |
63 | 557 | } | 557 | } |
65 | 558 | else | 558 | else if (isdigit(icon->GetShortcut())) |
66 | 559 | { | 559 | { |
67 | 560 | // reset shortcut | 560 | // reset shortcut |
68 | 561 | icon->SetShortcut(0); | 561 | icon->SetShortcut(0); |
69 | 562 | 562 | ||
70 | === modified file 'launcher/LauncherIcon.cpp' | |||
71 | --- launcher/LauncherIcon.cpp 2016-03-18 01:47:08 +0000 | |||
72 | +++ launcher/LauncherIcon.cpp 2016-05-26 00:00:49 +0000 | |||
73 | @@ -42,6 +42,8 @@ | |||
74 | 42 | #include <UnityCore/GLibWrapper.h> | 42 | #include <UnityCore/GLibWrapper.h> |
75 | 43 | #include <UnityCore/Variant.h> | 43 | #include <UnityCore/Variant.h> |
76 | 44 | 44 | ||
77 | 45 | #include <numeric> | ||
78 | 46 | |||
79 | 45 | namespace unity | 47 | namespace unity |
80 | 46 | { | 48 | { |
81 | 47 | namespace launcher | 49 | namespace launcher |
82 | 48 | 50 | ||
83 | === modified file 'launcher/SoftwareCenterLauncherIcon.cpp' | |||
84 | --- launcher/SoftwareCenterLauncherIcon.cpp 2016-03-18 01:47:08 +0000 | |||
85 | +++ launcher/SoftwareCenterLauncherIcon.cpp 2016-05-26 00:00:49 +0000 | |||
86 | @@ -133,7 +133,7 @@ | |||
87 | 133 | else | 133 | else |
88 | 134 | { | 134 | { |
89 | 135 | // failure condition, remove icon again | 135 | // failure condition, remove icon again |
91 | 136 | UnStick(); | 136 | Remove(); |
92 | 137 | } | 137 | } |
93 | 138 | 138 | ||
94 | 139 | aptdaemon_trans_.reset(); | 139 | aptdaemon_trans_.reset(); |
95 | 140 | 140 | ||
96 | === modified file 'launcher/SwitcherController.cpp' | |||
97 | --- launcher/SwitcherController.cpp 2016-03-21 15:38:17 +0000 | |||
98 | +++ launcher/SwitcherController.cpp 2016-05-26 00:00:49 +0000 | |||
99 | @@ -453,10 +453,6 @@ | |||
100 | 453 | view_->background_color = WindowManager::Default().average_color(); | 453 | view_->background_color = WindowManager::Default().average_color(); |
101 | 454 | view_->monitor = obj_->monitor_; | 454 | view_->monitor = obj_->monitor_; |
102 | 455 | view_->hide_request.connect(sigc::mem_fun(this, &Controller::Impl::Hide)); | 455 | view_->hide_request.connect(sigc::mem_fun(this, &Controller::Impl::Hide)); |
103 | 456 | view_->switcher_mouse_up.connect([this] (int icon_index, int button) { | ||
104 | 457 | if (button == 3) | ||
105 | 458 | InitiateDetail(true); | ||
106 | 459 | }); | ||
107 | 460 | 456 | ||
108 | 461 | view_->switcher_mouse_move.connect([this] (int icon_index) { | 457 | view_->switcher_mouse_move.connect([this] (int icon_index) { |
109 | 462 | if (icon_index >= 0) | 458 | if (icon_index >= 0) |
110 | @@ -690,7 +686,10 @@ | |||
111 | 690 | } | 686 | } |
112 | 691 | else if (model_->SelectionIsActive()) | 687 | else if (model_->SelectionIsActive()) |
113 | 692 | { | 688 | { |
115 | 693 | window = model_->SelectionWindows().front(); | 689 | auto const& selection_windows = model_->SelectionWindows(); |
116 | 690 | |||
117 | 691 | if (!selection_windows.empty()) | ||
118 | 692 | window = selection_windows.front(); | ||
119 | 694 | } | 693 | } |
120 | 695 | } | 694 | } |
121 | 696 | } | 695 | } |
122 | 697 | 696 | ||
123 | === modified file 'launcher/SwitcherView.cpp' | |||
124 | --- launcher/SwitcherView.cpp 2016-03-21 15:38:17 +0000 | |||
125 | +++ launcher/SwitcherView.cpp 2016-05-26 00:00:49 +0000 | |||
126 | @@ -381,8 +381,6 @@ | |||
127 | 381 | int detail_icon_index = DetailIconIdexAt(mouse_pos.x, mouse_pos.y); | 381 | int detail_icon_index = DetailIconIdexAt(mouse_pos.x, mouse_pos.y); |
128 | 382 | 382 | ||
129 | 383 | last_detail_icon_selected_ = detail_icon_index; | 383 | last_detail_icon_selected_ = detail_icon_index; |
130 | 384 | |||
131 | 385 | switcher_mouse_down.emit(detail_icon_index, button); | ||
132 | 386 | } | 384 | } |
133 | 387 | 385 | ||
134 | 388 | void SwitcherView::HandleMouseDown(int x, int y, int button) | 386 | void SwitcherView::HandleMouseDown(int x, int y, int button) |
135 | @@ -390,8 +388,6 @@ | |||
136 | 390 | int icon_index = IconIndexAt(x,y); | 388 | int icon_index = IconIndexAt(x,y); |
137 | 391 | 389 | ||
138 | 392 | last_icon_selected_ = icon_index; | 390 | last_icon_selected_ = icon_index; |
139 | 393 | |||
140 | 394 | switcher_mouse_down.emit(icon_index, button); | ||
141 | 395 | } | 391 | } |
142 | 396 | 392 | ||
143 | 397 | void SwitcherView::RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long /*key_flags*/) | 393 | void SwitcherView::RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long /*key_flags*/) |
144 | @@ -413,8 +409,6 @@ | |||
145 | 413 | nux::Point const& mouse_pos = CalculateMouseMonitorOffset(x, y); | 409 | nux::Point const& mouse_pos = CalculateMouseMonitorOffset(x, y); |
146 | 414 | int detail_icon_index = DetailIconIdexAt(mouse_pos.x, mouse_pos.y); | 410 | int detail_icon_index = DetailIconIdexAt(mouse_pos.x, mouse_pos.y); |
147 | 415 | 411 | ||
148 | 416 | switcher_mouse_up.emit(detail_icon_index, button); | ||
149 | 417 | |||
150 | 418 | if (button == 1) | 412 | if (button == 1) |
151 | 419 | { | 413 | { |
152 | 420 | if (detail_icon_index >= 0 && detail_icon_index == last_detail_icon_selected_) | 414 | if (detail_icon_index >= 0 && detail_icon_index == last_detail_icon_selected_) |
153 | @@ -437,14 +431,18 @@ | |||
154 | 437 | { | 431 | { |
155 | 438 | int icon_index = IconIndexAt(x,y); | 432 | int icon_index = IconIndexAt(x,y); |
156 | 439 | 433 | ||
160 | 440 | switcher_mouse_up.emit(icon_index, button); | 434 | if (button == 1 || button == 2 || button == 3) |
158 | 441 | |||
159 | 442 | if (button == 1) | ||
161 | 443 | { | 435 | { |
162 | 444 | if (icon_index >= 0 && icon_index == last_icon_selected_) | 436 | if (icon_index >= 0 && icon_index == last_icon_selected_) |
163 | 445 | { | 437 | { |
164 | 446 | model_->Select(icon_index); | 438 | model_->Select(icon_index); |
166 | 447 | hide_request.emit(true); | 439 | |
167 | 440 | if (button == 1) | ||
168 | 441 | hide_request.emit(true); | ||
169 | 442 | else if (button == 2) | ||
170 | 443 | switcher_close_current.emit(); | ||
171 | 444 | else if (button == 3) | ||
172 | 445 | switcher_start_detail.emit(); | ||
173 | 448 | } | 446 | } |
174 | 449 | } | 447 | } |
175 | 450 | } | 448 | } |
176 | 451 | 449 | ||
177 | === modified file 'launcher/SwitcherView.h' | |||
178 | --- launcher/SwitcherView.h 2015-11-02 18:28:31 +0000 | |||
179 | +++ launcher/SwitcherView.h 2016-05-26 00:00:49 +0000 | |||
180 | @@ -73,10 +73,6 @@ | |||
181 | 73 | int IconIndexAt(int x, int y) const; | 73 | int IconIndexAt(int x, int y) const; |
182 | 74 | int DetailIconIdexAt(int x, int y) const; | 74 | int DetailIconIdexAt(int x, int y) const; |
183 | 75 | 75 | ||
184 | 76 | /* void; int icon_index, int button*/ | ||
185 | 77 | sigc::signal<void, int, int> switcher_mouse_down; | ||
186 | 78 | sigc::signal<void, int, int> switcher_mouse_up; | ||
187 | 79 | |||
188 | 80 | /* void; int icon_index */ | 76 | /* void; int icon_index */ |
189 | 81 | sigc::signal<void, int> switcher_mouse_move; | 77 | sigc::signal<void, int> switcher_mouse_move; |
190 | 82 | 78 | ||
191 | 83 | 79 | ||
192 | === modified file 'plugins/unityshell/src/WindowMinimizeSpeedController.cpp' | |||
193 | --- plugins/unityshell/src/WindowMinimizeSpeedController.cpp 2013-11-14 03:00:29 +0000 | |||
194 | +++ plugins/unityshell/src/WindowMinimizeSpeedController.cpp 2016-05-26 00:00:49 +0000 | |||
195 | @@ -19,6 +19,7 @@ | |||
196 | 19 | * not be able to re-use it if you want to use a different licence. | 19 | * not be able to re-use it if you want to use a different licence. |
197 | 20 | */ | 20 | */ |
198 | 21 | 21 | ||
199 | 22 | #include <cmath> | ||
200 | 22 | #include <gio/gio.h> | 23 | #include <gio/gio.h> |
201 | 23 | #include <NuxCore/Logger.h> | 24 | #include <NuxCore/Logger.h> |
202 | 24 | 25 | ||
203 | 25 | 26 | ||
204 | === modified file 'plugins/unityshell/src/inputremover.cpp' | |||
205 | --- plugins/unityshell/src/inputremover.cpp 2016-03-09 17:25:16 +0000 | |||
206 | +++ plugins/unityshell/src/inputremover.cpp 2016-05-26 00:00:49 +0000 | |||
207 | @@ -354,7 +354,7 @@ | |||
208 | 354 | 354 | ||
209 | 355 | for (int i = 0; i < nInput; ++i) | 355 | for (int i = 0; i < nInput; ++i) |
210 | 356 | { | 356 | { |
212 | 357 | const unsigned int position = dataSize + (i * 4); | 357 | const unsigned int position = headerSize + (i * 4); |
213 | 358 | 358 | ||
214 | 359 | data[position + 0] = input[i].x; | 359 | data[position + 0] = input[i].x; |
215 | 360 | data[position + 1] = input[i].y; | 360 | data[position + 1] = input[i].y; |
216 | 361 | 361 | ||
217 | === modified file 'plugins/unityshell/src/unityshell.cpp' | |||
218 | --- plugins/unityshell/src/unityshell.cpp 2016-03-31 05:57:11 +0000 | |||
219 | +++ plugins/unityshell/src/unityshell.cpp 2016-05-26 00:00:49 +0000 | |||
220 | @@ -203,8 +203,7 @@ | |||
221 | 203 | , doShellRepaint(false) | 203 | , doShellRepaint(false) |
222 | 204 | , didShellRepaint(false) | 204 | , didShellRepaint(false) |
223 | 205 | , allowWindowPaint(false) | 205 | , allowWindowPaint(false) |
226 | 206 | , _key_nav_mode_requested(false) | 206 | , last_output_(nullptr) |
225 | 207 | , _last_output(nullptr) | ||
227 | 208 | , force_draw_countdown_(0) | 207 | , force_draw_countdown_(0) |
228 | 209 | , firstWindowAboveShell(nullptr) | 208 | , firstWindowAboveShell(nullptr) |
229 | 210 | , onboard_(nullptr) | 209 | , onboard_(nullptr) |
230 | @@ -215,12 +214,13 @@ | |||
231 | 215 | , first_menu_keypress_time_(0) | 214 | , first_menu_keypress_time_(0) |
232 | 216 | , paint_panel_under_dash_(false) | 215 | , paint_panel_under_dash_(false) |
233 | 217 | , scale_just_activated_(false) | 216 | , scale_just_activated_(false) |
234 | 218 | , big_tick_(0) | ||
235 | 219 | , screen_introspection_(screen) | 217 | , screen_introspection_(screen) |
236 | 220 | , ignore_redraw_request_(false) | 218 | , ignore_redraw_request_(false) |
237 | 221 | , dirty_helpers_on_this_frame_(false) | 219 | , dirty_helpers_on_this_frame_(false) |
238 | 220 | , is_desktop_active_(false) | ||
239 | 221 | , key_nav_mode_requested_(false) | ||
240 | 222 | , big_tick_(0) | ||
241 | 222 | , back_buffer_age_(0) | 223 | , back_buffer_age_(0) |
242 | 223 | , is_desktop_active_(false) | ||
243 | 224 | { | 224 | { |
244 | 225 | Timer timer; | 225 | Timer timer; |
245 | 226 | #ifndef USE_GLES | 226 | #ifndef USE_GLES |
246 | @@ -341,7 +341,7 @@ | |||
247 | 341 | tick_source_.reset(new na::TickSource); | 341 | tick_source_.reset(new na::TickSource); |
248 | 342 | animation_controller_.reset(new na::AnimationController(*tick_source_)); | 342 | animation_controller_.reset(new na::AnimationController(*tick_source_)); |
249 | 343 | 343 | ||
251 | 344 | wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::onRedrawRequested)); | 344 | wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::OnRedrawRequested)); |
252 | 345 | 345 | ||
253 | 346 | unity_a11y_init(wt.get()); | 346 | unity_a11y_init(wt.get()); |
254 | 347 | 347 | ||
255 | @@ -692,7 +692,7 @@ | |||
256 | 692 | /* In some unknown place inside nux drawing we change the viewport without | 692 | /* In some unknown place inside nux drawing we change the viewport without |
257 | 693 | * setting it back to the default one, so we need to restore it before allowing | 693 | * setting it back to the default one, so we need to restore it before allowing |
258 | 694 | * compiz to take the scene */ | 694 | * compiz to take the scene */ |
260 | 695 | auto* o = _last_output; | 695 | auto* o = last_output_; |
261 | 696 | glViewport(o->x(), screen->height() - o->y2(), o->width(), o->height()); | 696 | glViewport(o->x(), screen->height() - o->y2(), o->width(), o->height()); |
262 | 697 | 697 | ||
263 | 698 | glDepthRange(0, 1); | 698 | glDepthRange(0, 1); |
264 | @@ -748,7 +748,7 @@ | |||
265 | 748 | if (WM.IsExpoActive()) | 748 | if (WM.IsExpoActive()) |
266 | 749 | return; | 749 | return; |
267 | 750 | 750 | ||
269 | 751 | CompOutput* output = _last_output; | 751 | CompOutput* output = last_output_; |
270 | 752 | 752 | ||
271 | 753 | if (fullscreenRegion.contains(*output)) | 753 | if (fullscreenRegion.contains(*output)) |
272 | 754 | return; | 754 | return; |
273 | @@ -863,7 +863,7 @@ | |||
274 | 863 | 863 | ||
275 | 864 | void UnityScreen::paintDisplay() | 864 | void UnityScreen::paintDisplay() |
276 | 865 | { | 865 | { |
278 | 866 | CompOutput *output = _last_output; | 866 | CompOutput *output = last_output_; |
279 | 867 | 867 | ||
280 | 868 | DrawPanelUnderDash(); | 868 | DrawPanelUnderDash(); |
281 | 869 | 869 | ||
282 | @@ -990,7 +990,7 @@ | |||
283 | 990 | 990 | ||
284 | 991 | auto const& output_dev = screen->currentOutputDev(); | 991 | auto const& output_dev = screen->currentOutputDev(); |
285 | 992 | 992 | ||
287 | 993 | if (_last_output->id() != output_dev.id()) | 993 | if (last_output_->id() != output_dev.id()) |
288 | 994 | return; | 994 | return; |
289 | 995 | 995 | ||
290 | 996 | auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); | 996 | auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); |
291 | @@ -1485,7 +1485,7 @@ | |||
292 | 1485 | ); | 1485 | ); |
293 | 1486 | 1486 | ||
294 | 1487 | allowWindowPaint = true; | 1487 | allowWindowPaint = true; |
296 | 1488 | _last_output = output; | 1488 | last_output_ = output; |
297 | 1489 | paint_panel_under_dash_ = false; | 1489 | paint_panel_under_dash_ = false; |
298 | 1490 | 1490 | ||
299 | 1491 | // CompRegion has no clear() method. So this is the fastest alternative. | 1491 | // CompRegion has no clear() method. So this is the fastest alternative. |
300 | @@ -1522,7 +1522,7 @@ | |||
301 | 1522 | * this output. | 1522 | * this output. |
302 | 1523 | * | 1523 | * |
303 | 1524 | * However, damaging nux has a side effect of notifying compiz | 1524 | * However, damaging nux has a side effect of notifying compiz |
305 | 1525 | * through onRedrawRequested that we need to queue another frame. | 1525 | * through OnRedrawRequested that we need to queue another frame. |
306 | 1526 | * In most cases that would be desirable, and in the case where | 1526 | * In most cases that would be desirable, and in the case where |
307 | 1527 | * we did that in damageCutoff, it would not be a problem as compiz | 1527 | * we did that in damageCutoff, it would not be a problem as compiz |
308 | 1528 | * does not queue up new frames for damage that can be processed | 1528 | * does not queue up new frames for damage that can be processed |
309 | @@ -1687,7 +1687,7 @@ | |||
310 | 1687 | wt->ForeignFrameEnded(); | 1687 | wt->ForeignFrameEnded(); |
311 | 1688 | 1688 | ||
312 | 1689 | if (animation_controller_->HasRunningAnimations()) | 1689 | if (animation_controller_->HasRunningAnimations()) |
314 | 1690 | onRedrawRequested(); | 1690 | OnRedrawRequested(); |
315 | 1691 | 1691 | ||
316 | 1692 | for (auto it = ShowdesktopHandler::animating_windows.begin(); it != ShowdesktopHandler::animating_windows.end();) | 1692 | for (auto it = ShowdesktopHandler::animating_windows.begin(); it != ShowdesktopHandler::animating_windows.end();) |
317 | 1693 | { | 1693 | { |
318 | @@ -1813,7 +1813,7 @@ | |||
319 | 1813 | else if (!screen->grabbed() && event->xfocus.mode == NotifyWhileGrabbed) | 1813 | else if (!screen->grabbed() && event->xfocus.mode == NotifyWhileGrabbed) |
320 | 1814 | wm.OnScreenGrabbed(); | 1814 | wm.OnScreenGrabbed(); |
321 | 1815 | 1815 | ||
323 | 1816 | if (_key_nav_mode_requested) | 1816 | if (key_nav_mode_requested_) |
324 | 1817 | { | 1817 | { |
325 | 1818 | // Close any overlay that is open. | 1818 | // Close any overlay that is open. |
326 | 1819 | if (launcher_controller_->IsOverlayOpen()) | 1819 | if (launcher_controller_->IsOverlayOpen()) |
327 | @@ -1821,7 +1821,7 @@ | |||
328 | 1821 | dash_controller_->HideDash(); | 1821 | dash_controller_->HideDash(); |
329 | 1822 | hud_controller_->HideHud(); | 1822 | hud_controller_->HideHud(); |
330 | 1823 | } | 1823 | } |
332 | 1824 | _key_nav_mode_requested = false; | 1824 | key_nav_mode_requested_ = false; |
333 | 1825 | launcher_controller_->KeyNavGrab(); | 1825 | launcher_controller_->KeyNavGrab(); |
334 | 1826 | } | 1826 | } |
335 | 1827 | break; | 1827 | break; |
336 | @@ -2343,7 +2343,7 @@ | |||
337 | 2343 | else if (WM.IsExpoActive()) | 2343 | else if (WM.IsExpoActive()) |
338 | 2344 | WM.TerminateExpo(); | 2344 | WM.TerminateExpo(); |
339 | 2345 | 2345 | ||
341 | 2346 | _key_nav_mode_requested = true; | 2346 | key_nav_mode_requested_ = true; |
342 | 2347 | return true; | 2347 | return true; |
343 | 2348 | } | 2348 | } |
344 | 2349 | 2349 | ||
345 | @@ -3542,7 +3542,7 @@ | |||
346 | 3542 | LOG_INFO(logger) << "UnityScreen::InitNuxThread: " << timer.ElapsedSeconds() << "s"; | 3542 | LOG_INFO(logger) << "UnityScreen::InitNuxThread: " << timer.ElapsedSeconds() << "s"; |
347 | 3543 | } | 3543 | } |
348 | 3544 | 3544 | ||
350 | 3545 | void UnityScreen::onRedrawRequested() | 3545 | void UnityScreen::OnRedrawRequested() |
351 | 3546 | { | 3546 | { |
352 | 3547 | if (!ignore_redraw_request_) | 3547 | if (!ignore_redraw_request_) |
353 | 3548 | cScreen->damagePending(); | 3548 | cScreen->damagePending(); |
354 | @@ -3623,7 +3623,17 @@ | |||
355 | 3623 | 3623 | ||
356 | 3624 | int scale_offset = (launcher_options->hide_mode == LAUNCHER_HIDE_NEVER) ? 0 : launcher_controller_->launcher().GetWidth(); | 3624 | int scale_offset = (launcher_options->hide_mode == LAUNCHER_HIDE_NEVER) ? 0 : launcher_controller_->launcher().GetWidth(); |
357 | 3625 | CompOption::Value v(scale_offset); | 3625 | CompOption::Value v(scale_offset); |
359 | 3626 | screen->setOptionForPlugin("scale", "x_offset", v); | 3626 | CompOption::Value bv(0); |
360 | 3627 | if (Settings::Instance().launcher_position() == LauncherPosition::LEFT) | ||
361 | 3628 | { | ||
362 | 3629 | screen->setOptionForPlugin("scale", "x_offset", v); | ||
363 | 3630 | screen->setOptionForPlugin("scale", "y_bottom_offset", bv); | ||
364 | 3631 | } | ||
365 | 3632 | else | ||
366 | 3633 | { | ||
367 | 3634 | screen->setOptionForPlugin("scale", "x_offset", bv); | ||
368 | 3635 | screen->setOptionForPlugin("scale", "y_bottom_offset", v); | ||
369 | 3636 | } | ||
370 | 3627 | break; | 3637 | break; |
371 | 3628 | } | 3638 | } |
372 | 3629 | case UnityshellOptions::BacklightMode: | 3639 | case UnityshellOptions::BacklightMode: |
373 | @@ -3834,11 +3844,19 @@ | |||
374 | 3834 | } | 3844 | } |
375 | 3835 | 3845 | ||
376 | 3836 | auto max_bounds = NuxGeometryFromCompRect(output.workArea()); | 3846 | auto max_bounds = NuxGeometryFromCompRect(output.workArea()); |
378 | 3837 | if (launcher_controller_->options()->hide_mode != LAUNCHER_HIDE_NEVER && Settings::Instance().launcher_position() == LauncherPosition::LEFT) | 3847 | if (launcher_controller_->options()->hide_mode != LAUNCHER_HIDE_NEVER) |
379 | 3838 | { | 3848 | { |
383 | 3839 | int monitor_width = unity_settings_.LauncherSize(monitor); | 3849 | if (Settings::Instance().launcher_position() == LauncherPosition::LEFT) |
384 | 3840 | max_bounds.x += monitor_width; | 3850 | { |
385 | 3841 | max_bounds.width -= monitor_width; | 3851 | int monitor_width = unity_settings_.LauncherSize(monitor); |
386 | 3852 | max_bounds.x += monitor_width; | ||
387 | 3853 | max_bounds.width -= monitor_width; | ||
388 | 3854 | } | ||
389 | 3855 | else if (Settings::Instance().launcher_position() == LauncherPosition::BOTTOM) | ||
390 | 3856 | { | ||
391 | 3857 | int launcher_size = unity_settings_.LauncherSize(monitor); | ||
392 | 3858 | max_bounds.height -= launcher_size; | ||
393 | 3859 | } | ||
394 | 3842 | } | 3860 | } |
395 | 3843 | 3861 | ||
396 | 3844 | nux::Geometry final_bounds; | 3862 | nux::Geometry final_bounds; |
397 | @@ -4098,14 +4116,31 @@ | |||
398 | 4098 | adjustment_x = launcher_size; | 4116 | adjustment_x = launcher_size; |
399 | 4099 | shortcut_controller_->SetAdjustment(adjustment_x, panel_style_.PanelHeight(launcher->monitor)); | 4117 | shortcut_controller_->SetAdjustment(adjustment_x, panel_style_.PanelHeight(launcher->monitor)); |
400 | 4100 | 4118 | ||
401 | 4119 | CompOption::Value v(launcher_size); | ||
402 | 4101 | if (launcher_position == LauncherPosition::LEFT) | 4120 | if (launcher_position == LauncherPosition::LEFT) |
403 | 4102 | { | 4121 | { |
410 | 4103 | CompOption::Value v(launcher_size); | 4122 | screen->setOptionForPlugin("expo", "x_offset", v); |
411 | 4104 | screen->setOptionForPlugin("expo", "x_offset", v); | 4123 | |
412 | 4105 | 4124 | if (launcher_controller_->options()->hide_mode == LAUNCHER_HIDE_NEVER) | |
413 | 4106 | if (launcher_controller_->options()->hide_mode == LAUNCHER_HIDE_NEVER) | 4125 | v.set(0); |
414 | 4107 | v.set(0); | 4126 | |
415 | 4108 | 4127 | screen->setOptionForPlugin("scale", "x_offset", v); | |
416 | 4128 | |||
417 | 4129 | v.set(0); | ||
418 | 4130 | screen->setOptionForPlugin("expo", "y_bottom_offset", v); | ||
419 | 4131 | screen->setOptionForPlugin("scale", "y_bottom_offset", v); | ||
420 | 4132 | } | ||
421 | 4133 | else | ||
422 | 4134 | { | ||
423 | 4135 | screen->setOptionForPlugin("expo", "y_bottom_offset", v); | ||
424 | 4136 | |||
425 | 4137 | if (launcher_controller_->options()->hide_mode == LAUNCHER_HIDE_NEVER) | ||
426 | 4138 | v.set(0); | ||
427 | 4139 | |||
428 | 4140 | screen->setOptionForPlugin("scale", "y_bottom_offset", v); | ||
429 | 4141 | |||
430 | 4142 | v.set(0); | ||
431 | 4143 | screen->setOptionForPlugin("expo", "x_offset", v); | ||
432 | 4109 | screen->setOptionForPlugin("scale", "x_offset", v); | 4144 | screen->setOptionForPlugin("scale", "x_offset", v); |
433 | 4110 | } | 4145 | } |
434 | 4111 | }; | 4146 | }; |
435 | @@ -4124,6 +4159,10 @@ | |||
436 | 4124 | check_launchers_size(); | 4159 | check_launchers_size(); |
437 | 4125 | }); | 4160 | }); |
438 | 4126 | 4161 | ||
439 | 4162 | Settings::Instance().launcher_position.changed.connect([this, check_launchers_size] (LauncherPosition const&) { | ||
440 | 4163 | check_launchers_size(); | ||
441 | 4164 | }); | ||
442 | 4165 | |||
443 | 4127 | check_launchers_size(); | 4166 | check_launchers_size(); |
444 | 4128 | 4167 | ||
445 | 4129 | launcher_controller_->options()->scroll_inactive_icons = optionGetScrollInactiveIcons(); | 4168 | launcher_controller_->options()->scroll_inactive_icons = optionGetScrollInactiveIcons(); |
446 | @@ -4243,6 +4282,7 @@ | |||
447 | 4243 | { | 4282 | { |
448 | 4244 | WindowInterface::setHandler(window); | 4283 | WindowInterface::setHandler(window); |
449 | 4245 | GLWindowInterface::setHandler(gWindow); | 4284 | GLWindowInterface::setHandler(gWindow); |
450 | 4285 | CompositeWindowInterface::setHandler(cWindow); | ||
451 | 4246 | ScaleWindowInterface::setHandler(ScaleWindow::get(window)); | 4286 | ScaleWindowInterface::setHandler(ScaleWindow::get(window)); |
452 | 4247 | 4287 | ||
453 | 4248 | PluginAdapter::Default().OnLeaveDesktop(); | 4288 | PluginAdapter::Default().OnLeaveDesktop(); |
454 | @@ -4608,7 +4648,7 @@ | |||
455 | 4608 | void UnityWindow::paintThumbnail(nux::Geometry const& geo, float alpha, float parent_alpha, float scale_ratio, unsigned deco_height, bool selected) | 4648 | void UnityWindow::paintThumbnail(nux::Geometry const& geo, float alpha, float parent_alpha, float scale_ratio, unsigned deco_height, bool selected) |
456 | 4609 | { | 4649 | { |
457 | 4610 | GLMatrix matrix; | 4650 | GLMatrix matrix; |
459 | 4611 | matrix.toScreenSpace(uScreen->_last_output, -DEFAULT_Z_CAMERA); | 4651 | matrix.toScreenSpace(uScreen->last_output_, -DEFAULT_Z_CAMERA); |
460 | 4612 | last_bound = geo; | 4652 | last_bound = geo; |
461 | 4613 | 4653 | ||
462 | 4614 | GLWindowPaintAttrib attrib = gWindow->lastPaintAttrib(); | 4654 | GLWindowPaintAttrib attrib = gWindow->lastPaintAttrib(); |
463 | 4615 | 4655 | ||
464 | === modified file 'plugins/unityshell/src/unityshell.h' | |||
465 | --- plugins/unityshell/src/unityshell.h 2016-03-31 03:59:33 +0000 | |||
466 | +++ plugins/unityshell/src/unityshell.h 2016-05-26 00:00:49 +0000 | |||
467 | @@ -2,7 +2,7 @@ | |||
468 | 2 | /* Compiz unity plugin | 2 | /* Compiz unity plugin |
469 | 3 | * unity.h | 3 | * unity.h |
470 | 4 | * | 4 | * |
472 | 5 | * Copyright (c) 2010-11 Canonical Ltd. | 5 | * Copyright (c) 2010-16 Canonical Ltd. |
473 | 6 | * | 6 | * |
474 | 7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
475 | 8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
476 | @@ -120,11 +120,58 @@ | |||
477 | 120 | UnityScreen(CompScreen* s); | 120 | UnityScreen(CompScreen* s); |
478 | 121 | ~UnityScreen(); | 121 | ~UnityScreen(); |
479 | 122 | 122 | ||
485 | 123 | /* We store these to avoid unecessary calls to ::get */ | 123 | switcher::Controller::Ptr switcher_controller(); |
486 | 124 | CompScreen* screen; | 124 | launcher::Controller::Ptr launcher_controller(); |
487 | 125 | CompositeScreen* cScreen; | 125 | lockscreen::Controller::Ptr lockscreen_controller(); |
488 | 126 | GLScreen* gScreen; | 126 | |
489 | 127 | ScaleScreen* sScreen; | 127 | void SetUpAndShowSwitcher(switcher::ShowMode show_mode = switcher::ShowMode::CURRENT_VIEWPORT); |
490 | 128 | |||
491 | 129 | protected: | ||
492 | 130 | void damageCutoff() override; | ||
493 | 131 | void preparePaint(int ms) override; | ||
494 | 132 | void donePaint() override; | ||
495 | 133 | |||
496 | 134 | void handleCompizEvent(const char *pluginName, const char *eventName, CompOption::Vector &o) override; | ||
497 | 135 | void damageRegion(const CompRegion ®ion) override; | ||
498 | 136 | |||
499 | 137 | /* paint on top of all windows if we could not find a window | ||
500 | 138 | * to paint underneath */ | ||
501 | 139 | bool glPaintOutput(const GLScreenPaintAttrib&, const GLMatrix&, const CompRegion&, CompOutput*, unsigned int) override; | ||
502 | 140 | |||
503 | 141 | /* paint in the special case that the output is transformed */ | ||
504 | 142 | void glPaintTransformedOutput(const GLScreenPaintAttrib&, const GLMatrix&, const CompRegion&, CompOutput*, unsigned int) override; | ||
505 | 143 | |||
506 | 144 | /* handle X11 events */ | ||
507 | 145 | void handleEvent(XEvent*) override; | ||
508 | 146 | void addSupportedAtoms(std::vector<Atom>&) override; | ||
509 | 147 | |||
510 | 148 | /* handle showdesktop */ | ||
511 | 149 | void enterShowDesktopMode() override; | ||
512 | 150 | void leaveShowDesktopMode(CompWindow *w) override; | ||
513 | 151 | |||
514 | 152 | /* window scaling */ | ||
515 | 153 | bool layoutSlotsAndAssignWindows() override; | ||
516 | 154 | bool getMipmap() override { return false; } | ||
517 | 155 | |||
518 | 156 | /* Handle changes in the number of workspaces by showing the switcher | ||
519 | 157 | * or not showing the switcher */ | ||
520 | 158 | bool setOptionForPlugin(const char* plugin, const char* name, CompOption::Value& v) override; | ||
521 | 159 | |||
522 | 160 | /* init plugin actions for screen */ | ||
523 | 161 | bool initPluginForScreen(CompPlugin* p) override; | ||
524 | 162 | |||
525 | 163 | void outputChangeNotify() override; | ||
526 | 164 | |||
527 | 165 | CompAction::Vector& getActions() override; | ||
528 | 166 | |||
529 | 167 | std::string GetName() const override; | ||
530 | 168 | void AddProperties(debug::IntrospectionData&) override; | ||
531 | 169 | |||
532 | 170 | private: | ||
533 | 171 | static void InitNuxThread(nux::NThread* thread, void* data); | ||
534 | 172 | void InitUnityComponents(); | ||
535 | 173 | bool InitPluginActions(); | ||
536 | 174 | void InitAltTabNextWindow(); | ||
537 | 128 | 175 | ||
538 | 129 | /* prepares nux for drawing */ | 176 | /* prepares nux for drawing */ |
539 | 130 | void nuxPrologue(); | 177 | void nuxPrologue(); |
540 | @@ -135,46 +182,7 @@ | |||
541 | 135 | void paintDisplay(); | 182 | void paintDisplay(); |
542 | 136 | void paintPanelShadow(CompRegion const& clip); | 183 | void paintPanelShadow(CompRegion const& clip); |
543 | 137 | void setPanelShadowMatrix(const GLMatrix& matrix); | 184 | void setPanelShadowMatrix(const GLMatrix& matrix); |
544 | 138 | |||
545 | 139 | void updateBlurDamage(); | 185 | void updateBlurDamage(); |
546 | 140 | void damageCutoff(); | ||
547 | 141 | void preparePaint (int ms); | ||
548 | 142 | void donePaint (); | ||
549 | 143 | |||
550 | 144 | void RaiseInputWindows(); | ||
551 | 145 | |||
552 | 146 | void | ||
553 | 147 | handleCompizEvent (const char *pluginName, | ||
554 | 148 | const char *eventName, | ||
555 | 149 | CompOption::Vector &o); | ||
556 | 150 | |||
557 | 151 | void damageRegion(const CompRegion ®ion); | ||
558 | 152 | |||
559 | 153 | /* paint on top of all windows if we could not find a window | ||
560 | 154 | * to paint underneath */ | ||
561 | 155 | bool glPaintOutput(const GLScreenPaintAttrib&, | ||
562 | 156 | const GLMatrix&, | ||
563 | 157 | const CompRegion&, | ||
564 | 158 | CompOutput*, | ||
565 | 159 | unsigned int); | ||
566 | 160 | |||
567 | 161 | /* paint in the special case that the output is transformed */ | ||
568 | 162 | void glPaintTransformedOutput(const GLScreenPaintAttrib&, | ||
569 | 163 | const GLMatrix&, | ||
570 | 164 | const CompRegion&, | ||
571 | 165 | CompOutput*, | ||
572 | 166 | unsigned int); | ||
573 | 167 | |||
574 | 168 | /* handle X11 events */ | ||
575 | 169 | void handleEvent(XEvent*); | ||
576 | 170 | void addSupportedAtoms(std::vector<Atom>&); | ||
577 | 171 | |||
578 | 172 | /* handle showdesktop */ | ||
579 | 173 | void enterShowDesktopMode (); | ||
580 | 174 | void leaveShowDesktopMode (CompWindow *w); | ||
581 | 175 | |||
582 | 176 | /* window scaling */ | ||
583 | 177 | bool layoutSlotsAndAssignWindows(); | ||
584 | 178 | 186 | ||
585 | 179 | bool showMenuBarInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 187 | bool showMenuBarInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
586 | 180 | bool showMenuBarTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 188 | bool showMenuBarTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
587 | @@ -190,9 +198,7 @@ | |||
588 | 190 | bool setKeyboardFocusKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 198 | bool setKeyboardFocusKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
589 | 191 | 199 | ||
590 | 192 | bool altTabInitiateCommon(CompAction* action, switcher::ShowMode mode); | 200 | bool altTabInitiateCommon(CompAction* action, switcher::ShowMode mode); |
594 | 193 | bool altTabTerminateCommon(CompAction* action, | 201 | bool altTabTerminateCommon(CompAction* action, CompAction::State state, CompOption::Vector& options); |
592 | 194 | CompAction::State state, | ||
593 | 195 | CompOption::Vector& options); | ||
595 | 196 | 202 | ||
596 | 197 | bool altTabForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 203 | bool altTabForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
597 | 198 | bool altTabPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 204 | bool altTabPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
598 | @@ -201,10 +207,9 @@ | |||
599 | 201 | bool altTabNextWindowInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 207 | bool altTabNextWindowInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
600 | 202 | bool altTabPrevWindowInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 208 | bool altTabPrevWindowInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
601 | 203 | 209 | ||
602 | 204 | bool ShowHud(); | ||
603 | 205 | /* handle hud key activations */ | ||
604 | 206 | bool ShowHudInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 210 | bool ShowHudInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
605 | 207 | bool ShowHudTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 211 | bool ShowHudTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
606 | 212 | |||
607 | 208 | bool launcherSwitcherForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 213 | bool launcherSwitcherForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
608 | 209 | bool launcherSwitcherPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 214 | bool launcherSwitcherPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
609 | 210 | bool launcherSwitcherTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options); | 215 | bool launcherSwitcherTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options); |
610 | @@ -214,56 +219,28 @@ | |||
611 | 214 | /* handle option changes and change settings inside of the | 219 | /* handle option changes and change settings inside of the |
612 | 215 | * panel and dock views */ | 220 | * panel and dock views */ |
613 | 216 | void optionChanged(CompOption*, Options num); | 221 | void optionChanged(CompOption*, Options num); |
624 | 217 | 222 | void OnMinimizeDurationChanged(); | |
625 | 218 | /* Handle changes in the number of workspaces by showing the switcher | 223 | |
616 | 219 | * or not showing the switcher */ | ||
617 | 220 | bool setOptionForPlugin(const char* plugin, const char* name, | ||
618 | 221 | CompOption::Value& v); | ||
619 | 222 | |||
620 | 223 | /* init plugin actions for screen */ | ||
621 | 224 | bool initPluginForScreen(CompPlugin* p); | ||
622 | 225 | |||
623 | 226 | void outputChangeNotify(); | ||
626 | 227 | void NeedsRelayout(); | 224 | void NeedsRelayout(); |
627 | 228 | void ScheduleRelayout(guint timeout); | 225 | void ScheduleRelayout(guint timeout); |
628 | 229 | 226 | ||
634 | 230 | bool forcePaintOnTop (); | 227 | bool forcePaintOnTop(); |
630 | 231 | |||
631 | 232 | void SetUpAndShowSwitcher(switcher::ShowMode show_mode = switcher::ShowMode::CURRENT_VIEWPORT); | ||
632 | 233 | |||
633 | 234 | void OnMinimizeDurationChanged(); | ||
635 | 235 | 228 | ||
636 | 236 | void OnLockScreenRequested(); | 229 | void OnLockScreenRequested(); |
637 | 237 | void OnScreenLocked(); | 230 | void OnScreenLocked(); |
638 | 238 | void OnScreenUnlocked(); | 231 | void OnScreenUnlocked(); |
639 | 239 | void SaveLockStamp(bool); | 232 | void SaveLockStamp(bool); |
640 | 240 | 233 | ||
641 | 241 | switcher::Controller::Ptr switcher_controller(); | ||
642 | 242 | launcher::Controller::Ptr launcher_controller(); | ||
643 | 243 | lockscreen::Controller::Ptr lockscreen_controller(); | ||
644 | 244 | |||
645 | 245 | bool DoesPointIntersectUnityGeos(nux::Point const& pt); | 234 | bool DoesPointIntersectUnityGeos(nux::Point const& pt); |
646 | 246 | 235 | ||
647 | 247 | ui::LayoutWindow::Ptr GetSwitcherDetailLayoutWindow(Window window) const; | 236 | ui::LayoutWindow::Ptr GetSwitcherDetailLayoutWindow(Window window) const; |
648 | 248 | 237 | ||
649 | 249 | CompAction::Vector& getActions(); | ||
650 | 250 | |||
651 | 251 | protected: | ||
652 | 252 | std::string GetName() const; | ||
653 | 253 | void AddProperties(debug::IntrospectionData&); | ||
654 | 254 | |||
655 | 255 | private: | ||
656 | 256 | enum CancelActionTarget | 238 | enum CancelActionTarget |
657 | 257 | { | 239 | { |
658 | 258 | LAUNCHER_SWITCHER, | 240 | LAUNCHER_SWITCHER, |
659 | 259 | SHORTCUT_HINT | 241 | SHORTCUT_HINT |
660 | 260 | }; | 242 | }; |
661 | 261 | 243 | ||
662 | 262 | static void InitNuxThread(nux::NThread* thread, void* data); | ||
663 | 263 | void InitUnityComponents(); | ||
664 | 264 | bool InitPluginActions(); | ||
665 | 265 | void InitAltTabNextWindow(); | ||
666 | 266 | |||
667 | 267 | void SendExecuteCommand(); | 244 | void SendExecuteCommand(); |
668 | 268 | 245 | ||
669 | 269 | void EnsureSuperKeybindings(); | 246 | void EnsureSuperKeybindings(); |
670 | @@ -273,21 +250,22 @@ | |||
671 | 273 | void compizDamageNux(CompRegion const& region); | 250 | void compizDamageNux(CompRegion const& region); |
672 | 274 | void determineNuxDamage(CompRegion &nux_damage); | 251 | void determineNuxDamage(CompRegion &nux_damage); |
673 | 275 | 252 | ||
674 | 276 | void onRedrawRequested(); | ||
675 | 277 | void Relayout(); | 253 | void Relayout(); |
676 | 254 | void RaiseInputWindows(); | ||
677 | 278 | 255 | ||
678 | 279 | static void OnStartKeyNav(GVariant* data, void* value); | 256 | static void OnStartKeyNav(GVariant* data, void* value); |
679 | 280 | static void OnExitKeyNav(GVariant* data, void* value); | 257 | static void OnExitKeyNav(GVariant* data, void* value); |
680 | 281 | 258 | ||
681 | 282 | void restartLauncherKeyNav(); | 259 | void restartLauncherKeyNav(); |
682 | 283 | 260 | ||
685 | 284 | void OnDashRealized (); | 261 | bool ShowHud(); |
684 | 285 | |||
686 | 286 | void RaiseOSK(); | 262 | void RaiseOSK(); |
687 | 287 | 263 | ||
688 | 264 | void OnDashRealized(); | ||
689 | 288 | void OnLauncherStartKeyNav(GVariant* data); | 265 | void OnLauncherStartKeyNav(GVariant* data); |
690 | 289 | void OnLauncherEndKeyNav(GVariant* data); | 266 | void OnLauncherEndKeyNav(GVariant* data); |
691 | 290 | void OnSwitcherDetailChanged(bool detail); | 267 | void OnSwitcherDetailChanged(bool detail); |
692 | 268 | void OnRedrawRequested(); | ||
693 | 291 | 269 | ||
694 | 292 | void OnInitiateSpread(); | 270 | void OnInitiateSpread(); |
695 | 293 | void OnTerminateSpread(); | 271 | void OnTerminateSpread(); |
696 | @@ -307,20 +285,24 @@ | |||
697 | 307 | 285 | ||
698 | 308 | void DrawPanelUnderDash(); | 286 | void DrawPanelUnderDash(); |
699 | 309 | 287 | ||
702 | 310 | void FillShadowRectForOutput(CompRect &shadowRect, | 288 | void FillShadowRectForOutput(CompRect &shadowRect, CompOutput const &output); |
701 | 311 | CompOutput const &output); | ||
703 | 312 | unsigned CompizModifiersToNux(unsigned input) const; | 289 | unsigned CompizModifiersToNux(unsigned input) const; |
704 | 313 | unsigned XModifiersToNux(unsigned input) const; | 290 | unsigned XModifiersToNux(unsigned input) const; |
705 | 314 | 291 | ||
706 | 315 | void UpdateCloseWindowKey(CompAction::KeyBinding const&); | 292 | void UpdateCloseWindowKey(CompAction::KeyBinding const&); |
707 | 316 | void UpdateActivateIndicatorsKey(); | 293 | void UpdateActivateIndicatorsKey(); |
708 | 317 | 294 | ||
709 | 318 | bool getMipmap () override { return false; } | ||
710 | 319 | |||
711 | 320 | void DamageBlurUpdateRegion(nux::Geometry const&); | 295 | void DamageBlurUpdateRegion(nux::Geometry const&); |
712 | 321 | 296 | ||
713 | 322 | void ShowFirstRunHints(); | 297 | void ShowFirstRunHints(); |
714 | 323 | void SpreadAppWindows(bool anywhere); | 298 | void SpreadAppWindows(bool anywhere); |
715 | 299 | bool queryForShader(); | ||
716 | 300 | |||
717 | 301 | /* We store these to avoid unecessary calls to ::get */ | ||
718 | 302 | CompScreen* screen; | ||
719 | 303 | CompositeScreen* cScreen; | ||
720 | 304 | GLScreen* gScreen; | ||
721 | 305 | ScaleScreen* sScreen; | ||
722 | 324 | 306 | ||
723 | 325 | std::unique_ptr<na::TickSource> tick_source_; | 307 | std::unique_ptr<na::TickSource> tick_source_; |
724 | 326 | std::unique_ptr<na::AnimationController> animation_controller_; | 308 | std::unique_ptr<na::AnimationController> animation_controller_; |
725 | @@ -365,8 +347,8 @@ | |||
726 | 365 | /* Subscription for gestures that manipulate windows. */ | 347 | /* Subscription for gestures that manipulate windows. */ |
727 | 366 | std::unique_ptr<nux::GesturesSubscription> gestures_sub_windows_; | 348 | std::unique_ptr<nux::GesturesSubscription> gestures_sub_windows_; |
728 | 367 | 349 | ||
731 | 368 | bool needsRelayout; | 350 | bool needsRelayout; |
732 | 369 | bool super_keypressed_; | 351 | bool super_keypressed_; |
733 | 370 | typedef std::shared_ptr<CompAction> CompActionPtr; | 352 | typedef std::shared_ptr<CompAction> CompActionPtr; |
734 | 371 | typedef std::vector<CompActionPtr> ShortcutActions; | 353 | typedef std::vector<CompActionPtr> ShortcutActions; |
735 | 372 | ShortcutActions _shortcut_actions; | 354 | ShortcutActions _shortcut_actions; |
736 | @@ -380,11 +362,10 @@ | |||
737 | 380 | GLTexture::List _shadow_texture; | 362 | GLTexture::List _shadow_texture; |
738 | 381 | 363 | ||
739 | 382 | /* handle paint order */ | 364 | /* handle paint order */ |
745 | 383 | bool doShellRepaint; | 365 | bool doShellRepaint; |
746 | 384 | bool didShellRepaint; | 366 | bool didShellRepaint; |
747 | 385 | bool allowWindowPaint; | 367 | bool allowWindowPaint; |
748 | 386 | bool _key_nav_mode_requested; | 368 | CompOutput* last_output_; |
744 | 387 | CompOutput* _last_output; | ||
749 | 388 | 369 | ||
750 | 389 | /* a small count-down work-a-around | 370 | /* a small count-down work-a-around |
751 | 390 | * to force full redraws of the shell | 371 | * to force full redraws of the shell |
752 | @@ -400,16 +381,14 @@ | |||
753 | 400 | 381 | ||
754 | 401 | ::GLFramebufferObject *oldFbo; | 382 | ::GLFramebufferObject *oldFbo; |
755 | 402 | 383 | ||
756 | 403 | bool queryForShader (); | ||
757 | 404 | |||
758 | 405 | int overlay_monitor_; | 384 | int overlay_monitor_; |
759 | 406 | CompScreen::GrabHandle grab_index_; | 385 | CompScreen::GrabHandle grab_index_; |
766 | 407 | CompWindowList fullscreen_windows_; | 386 | CompWindowList fullscreen_windows_; |
767 | 408 | bool painting_tray_; | 387 | bool painting_tray_; |
768 | 409 | unsigned int tray_paint_mask_; | 388 | unsigned int tray_paint_mask_; |
769 | 410 | unsigned int last_scroll_event_; | 389 | unsigned int last_scroll_event_; |
770 | 411 | int hud_keypress_time_; | 390 | int hud_keypress_time_; |
771 | 412 | int first_menu_keypress_time_; | 391 | int first_menu_keypress_time_; |
772 | 413 | 392 | ||
773 | 414 | GLMatrix panel_shadow_matrix_; | 393 | GLMatrix panel_shadow_matrix_; |
774 | 415 | 394 | ||
775 | @@ -418,9 +397,6 @@ | |||
776 | 418 | 397 | ||
777 | 419 | bool scale_just_activated_; | 398 | bool scale_just_activated_; |
778 | 420 | WindowMinimizeSpeedController minimize_speed_controller_; | 399 | WindowMinimizeSpeedController minimize_speed_controller_; |
779 | 421 | |||
780 | 422 | uint64_t big_tick_; | ||
781 | 423 | |||
782 | 424 | debug::ScreenIntrospection screen_introspection_; | 400 | debug::ScreenIntrospection screen_introspection_; |
783 | 425 | 401 | ||
784 | 426 | UBusManager ubus_manager_; | 402 | UBusManager ubus_manager_; |
785 | @@ -430,13 +406,13 @@ | |||
786 | 430 | 406 | ||
787 | 431 | CompRegion buffered_compiz_damage_this_frame_; | 407 | CompRegion buffered_compiz_damage_this_frame_; |
788 | 432 | CompRegion buffered_compiz_damage_last_frame_; | 408 | CompRegion buffered_compiz_damage_last_frame_; |
792 | 433 | bool ignore_redraw_request_; | 409 | bool ignore_redraw_request_; |
793 | 434 | bool dirty_helpers_on_this_frame_; | 410 | bool dirty_helpers_on_this_frame_; |
794 | 435 | 411 | bool is_desktop_active_; | |
795 | 412 | bool key_nav_mode_requested_; | ||
796 | 413 | uint64_t big_tick_; | ||
797 | 436 | unsigned int back_buffer_age_; | 414 | unsigned int back_buffer_age_; |
798 | 437 | 415 | ||
799 | 438 | bool is_desktop_active_; | ||
800 | 439 | |||
801 | 440 | friend class UnityWindow; | 416 | friend class UnityWindow; |
802 | 441 | friend class debug::ScreenIntrospection; | 417 | friend class debug::ScreenIntrospection; |
803 | 442 | friend class decoration::Manager; | 418 | friend class decoration::Manager; |
804 | @@ -445,6 +421,7 @@ | |||
805 | 445 | class UnityWindow : | 421 | class UnityWindow : |
806 | 446 | public WindowInterface, | 422 | public WindowInterface, |
807 | 447 | public GLWindowInterface, | 423 | public GLWindowInterface, |
808 | 424 | public CompositeWindowInterface, | ||
809 | 448 | public ShowdesktopHandlerWindowInterface, | 425 | public ShowdesktopHandlerWindowInterface, |
810 | 449 | public compiz::WindowInputRemoverLockAcquireInterface, | 426 | public compiz::WindowInputRemoverLockAcquireInterface, |
811 | 450 | public WrapableHandler<ScaleWindowInterface, 4>, | 427 | public WrapableHandler<ScaleWindowInterface, 4>, |
812 | @@ -457,98 +434,91 @@ | |||
813 | 457 | UnityWindow(CompWindow*); | 434 | UnityWindow(CompWindow*); |
814 | 458 | ~UnityWindow(); | 435 | ~UnityWindow(); |
815 | 459 | 436 | ||
830 | 460 | CompWindow* window; | 437 | void minimize() override; |
831 | 461 | CompositeWindow* cWindow; | 438 | void unminimize() override; |
832 | 462 | GLWindow* gWindow; | 439 | bool minimized() const override; |
833 | 463 | 440 | bool focus() override; | |
834 | 464 | nux::Geometry last_bound; | 441 | void activate() override; |
835 | 465 | 442 | ||
836 | 466 | void minimize(); | 443 | //! Emited when CompWindowNotifyBeforeDestroy is received |
837 | 467 | void unminimize(); | 444 | sigc::signal<void> being_destroyed; |
838 | 468 | bool minimized() const; | 445 | |
839 | 469 | bool focus(); | 446 | protected: |
840 | 470 | void activate(); | 447 | void updateFrameRegion(CompRegion ®ion) override; |
841 | 471 | 448 | void getOutputExtents(CompWindowExtents& output) override; | |
828 | 472 | void updateFrameRegion(CompRegion ®ion); | ||
829 | 473 | void getOutputExtents(CompWindowExtents& output); | ||
842 | 474 | 449 | ||
843 | 475 | /* occlusion detection | 450 | /* occlusion detection |
844 | 476 | * and window hiding */ | 451 | * and window hiding */ |
846 | 477 | bool glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask); | 452 | bool glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask) override; |
847 | 478 | 453 | ||
848 | 479 | /* basic window draw function */ | 454 | /* basic window draw function */ |
860 | 480 | bool glDraw(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask); | 455 | bool glDraw(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask) override; |
861 | 481 | 456 | bool damageRect(bool initial, CompRect const&) override; | |
862 | 482 | bool damageRect(bool initial, CompRect const&); | 457 | |
863 | 483 | 458 | void updateIconPos(int &wx, int &wy, int x, int y, float width, float height) override; | |
864 | 484 | void updateIconPos (int &wx, int &wy, int x, int y, float width, float height); | 459 | void windowNotify(CompWindowNotify n) override; |
865 | 485 | void windowNotify(CompWindowNotify n); | 460 | void moveNotify(int x, int y, bool immediate) override; |
866 | 486 | void moveNotify(int x, int y, bool immediate); | 461 | void resizeNotify(int x, int y, int w, int h) override; |
867 | 487 | void resizeNotify(int x, int y, int w, int h); | 462 | void stateChangeNotify(unsigned int lastState) override; |
868 | 488 | void stateChangeNotify(unsigned int lastState); | 463 | |
869 | 489 | 464 | bool place(CompPoint& pos) override; | |
870 | 490 | bool place(CompPoint& pos); | 465 | void scalePaintDecoration(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask) override; |
871 | 466 | |||
872 | 467 | std::string GetName() const override; | ||
873 | 468 | void AddProperties(debug::IntrospectionData&) override; | ||
874 | 469 | |||
875 | 470 | private: | ||
876 | 471 | typedef compiz::CompizMinimizedWindowHandler<UnityScreen, UnityWindow> UnityMinimizedHandler; | ||
877 | 472 | typedef std::shared_ptr<compiz_utils::PixmapTexture> PixmapTexturePtr; | ||
878 | 473 | |||
879 | 474 | void DoEnableFocus(); | ||
880 | 475 | void DoDisableFocus(); | ||
881 | 476 | |||
882 | 477 | bool IsOverrideRedirect(); | ||
883 | 478 | bool IsManaged(); | ||
884 | 479 | bool IsGrabbed(); | ||
885 | 480 | bool IsDesktopOrDock(); | ||
886 | 481 | bool IsSkipTaskbarOrPager(); | ||
887 | 482 | bool IsHidden(); | ||
888 | 483 | bool IsInShowdesktopMode(); | ||
889 | 484 | bool IsShaded(); | ||
890 | 485 | bool IsMinimized(); | ||
891 | 486 | bool CanBypassLockScreen() const; | ||
892 | 487 | void DoOverrideFrameRegion(CompRegion &r); | ||
893 | 488 | |||
894 | 489 | void DoHide(); | ||
895 | 490 | void DoNotifyHidden(); | ||
896 | 491 | void DoShow(); | ||
897 | 492 | void DoNotifyShown(); | ||
898 | 493 | |||
899 | 494 | void OnInitiateSpread(); | ||
900 | 495 | void OnTerminateSpread(); | ||
901 | 496 | |||
902 | 491 | CompPoint tryNotIntersectUI(CompPoint& pos); | 497 | CompPoint tryNotIntersectUI(CompPoint& pos); |
903 | 492 | nux::Geometry GetScaledGeometry(); | 498 | nux::Geometry GetScaledGeometry(); |
904 | 493 | nux::Geometry GetLayoutWindowGeometry(); | 499 | nux::Geometry GetLayoutWindowGeometry(); |
905 | 494 | 500 | ||
906 | 495 | void paintThumbnail(nux::Geometry const& bounding, float parent_alpha, float alpha, float scale_ratio, unsigned deco_height, bool selected); | ||
907 | 496 | |||
908 | 497 | void enterShowDesktop(); | 501 | void enterShowDesktop(); |
909 | 498 | void leaveShowDesktop(); | 502 | void leaveShowDesktop(); |
910 | 499 | bool HandleAnimations(unsigned int ms); | 503 | bool HandleAnimations(unsigned int ms); |
911 | 500 | 504 | ||
912 | 501 | bool handleEvent(XEvent *event); | 505 | bool handleEvent(XEvent *event); |
960 | 502 | void scalePaintDecoration(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask); | 506 | void paintThumbnail(nux::Geometry const& bounding, float parent_alpha, float alpha, float scale_ratio, unsigned deco_height, bool selected); |
961 | 503 | 507 | ||
962 | 504 | //! Emited when CompWindowNotifyBeforeDestroy is received | 508 | void DoAddDamage(); |
963 | 505 | sigc::signal<void> being_destroyed; | 509 | ShowdesktopHandlerWindowInterface::PostPaintAction DoHandleAnimations(unsigned int ms); |
964 | 506 | 510 | ||
965 | 507 | 511 | void DoMoveFocusAway(); | |
966 | 508 | protected: | 512 | |
967 | 509 | std::string GetName() const; | 513 | void DoDeleteHandler(); |
968 | 510 | void AddProperties(debug::IntrospectionData&); | 514 | |
969 | 511 | 515 | unsigned int GetNoCoreInstanceMask(); | |
970 | 512 | private: | 516 | |
971 | 513 | typedef compiz::CompizMinimizedWindowHandler<UnityScreen, UnityWindow> UnityMinimizedHandler; | 517 | compiz::WindowInputRemoverLock::Ptr GetInputRemover(); |
925 | 514 | typedef std::shared_ptr<compiz_utils::PixmapTexture> PixmapTexturePtr; | ||
926 | 515 | |||
927 | 516 | void DoEnableFocus (); | ||
928 | 517 | void DoDisableFocus (); | ||
929 | 518 | |||
930 | 519 | bool IsOverrideRedirect (); | ||
931 | 520 | bool IsManaged (); | ||
932 | 521 | bool IsGrabbed (); | ||
933 | 522 | bool IsDesktopOrDock (); | ||
934 | 523 | bool IsSkipTaskbarOrPager (); | ||
935 | 524 | bool IsHidden (); | ||
936 | 525 | bool IsInShowdesktopMode (); | ||
937 | 526 | bool IsShaded (); | ||
938 | 527 | bool IsMinimized (); | ||
939 | 528 | bool CanBypassLockScreen() const; | ||
940 | 529 | void DoOverrideFrameRegion (CompRegion &r); | ||
941 | 530 | |||
942 | 531 | void DoHide (); | ||
943 | 532 | void DoNotifyHidden (); | ||
944 | 533 | void DoShow (); | ||
945 | 534 | void DoNotifyShown (); | ||
946 | 535 | |||
947 | 536 | void OnInitiateSpread(); | ||
948 | 537 | void OnTerminateSpread(); | ||
949 | 538 | |||
950 | 539 | void DoAddDamage (); | ||
951 | 540 | ShowdesktopHandlerWindowInterface::PostPaintAction DoHandleAnimations (unsigned int ms); | ||
952 | 541 | |||
953 | 542 | void DoMoveFocusAway (); | ||
954 | 543 | |||
955 | 544 | void DoDeleteHandler (); | ||
956 | 545 | |||
957 | 546 | unsigned int GetNoCoreInstanceMask (); | ||
958 | 547 | |||
959 | 548 | compiz::WindowInputRemoverLock::Ptr GetInputRemover (); | ||
972 | 549 | 518 | ||
973 | 550 | void RenderDecoration(compiz_utils::CairoContext const&, double aspect = 1.0f); | 519 | void RenderDecoration(compiz_utils::CairoContext const&, double aspect = 1.0f); |
975 | 551 | void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, int height, double aspect = 1.0f); | 520 | void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, |
976 | 521 | int height, double aspect = 1.0f); | ||
977 | 552 | void DrawTexture(GLTexture::List const& textures, GLWindowPaintAttrib const&, | 522 | void DrawTexture(GLTexture::List const& textures, GLWindowPaintAttrib const&, |
978 | 553 | GLMatrix const&, unsigned mask, int x, int y, double aspect = 1.0f); | 523 | GLMatrix const&, unsigned mask, int x, int y, double aspect = 1.0f); |
979 | 554 | 524 | ||
980 | @@ -565,7 +535,12 @@ | |||
981 | 565 | std::unique_ptr <UnityMinimizedHandler> mMinimizeHandler; | 535 | std::unique_ptr <UnityMinimizedHandler> mMinimizeHandler; |
982 | 566 | 536 | ||
983 | 567 | private: | 537 | private: |
984 | 538 | CompWindow* window; | ||
985 | 539 | CompositeWindow* cWindow; | ||
986 | 540 | GLWindow* gWindow; | ||
987 | 541 | |||
988 | 568 | std::unique_ptr <ShowdesktopHandler> mShowdesktopHandler; | 542 | std::unique_ptr <ShowdesktopHandler> mShowdesktopHandler; |
989 | 543 | nux::Geometry last_bound; | ||
990 | 569 | PixmapTexturePtr decoration_tex_; | 544 | PixmapTexturePtr decoration_tex_; |
991 | 570 | PixmapTexturePtr decoration_selected_tex_; | 545 | PixmapTexturePtr decoration_selected_tex_; |
992 | 571 | std::string decoration_title_; | 546 | std::string decoration_title_; |
993 | @@ -579,6 +554,7 @@ | |||
994 | 579 | glib::Source::UniquePtr focus_desktop_timeout_; | 554 | glib::Source::UniquePtr focus_desktop_timeout_; |
995 | 580 | 555 | ||
996 | 581 | friend class UnityScreen; | 556 | friend class UnityScreen; |
997 | 557 | friend UnityMinimizedHandler; | ||
998 | 582 | }; | 558 | }; |
999 | 583 | 559 | ||
1000 | 584 | 560 | ||
1001 | 585 | 561 | ||
1002 | === modified file 'tests/test_gnome_session_manager.cpp' | |||
1003 | --- tests/test_gnome_session_manager.cpp 2015-11-23 09:24:10 +0000 | |||
1004 | +++ tests/test_gnome_session_manager.cpp 2016-05-26 00:00:49 +0000 | |||
1005 | @@ -256,9 +256,19 @@ | |||
1006 | 256 | 256 | ||
1007 | 257 | void TearDown() | 257 | void TearDown() |
1008 | 258 | { | 258 | { |
1009 | 259 | manager->have_other_open_sessions.changed.clear(); | ||
1010 | 260 | manager->is_locked.changed.clear(); | ||
1011 | 261 | manager->is_session_active.changed.clear(); | ||
1012 | 262 | manager->lock_requested.clear(); | ||
1013 | 263 | manager->unlock_requested.clear(); | ||
1014 | 264 | manager->prompt_lock_requested.clear(); | ||
1015 | 265 | manager->locked.clear(); | ||
1016 | 266 | manager->unlocked.clear(); | ||
1017 | 259 | manager->logout_requested.clear(); | 267 | manager->logout_requested.clear(); |
1018 | 260 | manager->reboot_requested.clear(); | 268 | manager->reboot_requested.clear(); |
1019 | 261 | manager->shutdown_requested.clear(); | 269 | manager->shutdown_requested.clear(); |
1020 | 270 | manager->presence_status_changed.clear(); | ||
1021 | 271 | manager->screensaver_requested.clear(); | ||
1022 | 262 | manager->cancel_requested.clear(); | 272 | manager->cancel_requested.clear(); |
1023 | 263 | shell_proxy_->DisconnectSignal(); | 273 | shell_proxy_->DisconnectSignal(); |
1024 | 264 | 274 | ||
1025 | 265 | 275 | ||
1026 | === modified file 'tests/test_switcher_controller.cpp' | |||
1027 | --- tests/test_switcher_controller.cpp 2015-11-04 09:42:55 +0000 | |||
1028 | +++ tests/test_switcher_controller.cpp 2016-05-26 00:00:49 +0000 | |||
1029 | @@ -278,7 +278,7 @@ | |||
1030 | 278 | Mock::VerifyAndClearExpectations(mock_window_.GetPointer()); | 278 | Mock::VerifyAndClearExpectations(mock_window_.GetPointer()); |
1031 | 279 | } | 279 | } |
1032 | 280 | 280 | ||
1034 | 281 | TEST_F(TestSwitcherController, TestRightClickedReceived) | 281 | TEST_F(TestSwitcherController, TestDetailActivationRequest) |
1035 | 282 | { | 282 | { |
1036 | 283 | controller_->Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, icons_); | 283 | controller_->Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, icons_); |
1037 | 284 | 284 | ||
1038 | @@ -287,8 +287,7 @@ | |||
1039 | 287 | 287 | ||
1040 | 288 | ASSERT_FALSE(model->detail_selection()); | 288 | ASSERT_FALSE(model->detail_selection()); |
1041 | 289 | 289 | ||
1044 | 290 | view->switcher_mouse_up.emit(-1, 3); | 290 | view->switcher_start_detail.emit(); |
1043 | 291 | view->switcher_mouse_down.emit(-1, 3); | ||
1045 | 292 | 291 | ||
1046 | 293 | ASSERT_TRUE(model->detail_selection()); | 292 | ASSERT_TRUE(model->detail_selection()); |
1047 | 294 | } | 293 | } |
1048 | 295 | 294 | ||
1049 | === modified file 'unity-shared/DashStyle.cpp' | |||
1050 | --- unity-shared/DashStyle.cpp 2016-03-31 05:53:05 +0000 | |||
1051 | +++ unity-shared/DashStyle.cpp 2016-05-26 00:00:49 +0000 | |||
1052 | @@ -95,7 +95,7 @@ | |||
1053 | 95 | *height = cairo_image_surface_get_height(surface) / h_scale; | 95 | *height = cairo_image_surface_get_height(surface) / h_scale; |
1054 | 96 | } | 96 | } |
1055 | 97 | 97 | ||
1057 | 98 | class LazyLoadTexture | 98 | class LazyLoadTexture : public sigc::trackable |
1058 | 99 | { | 99 | { |
1059 | 100 | public: | 100 | public: |
1060 | 101 | LazyLoadTexture(std::string const& filename, int size = -1); | 101 | LazyLoadTexture(std::string const& filename, int size = -1); |
1061 | 102 | 102 | ||
1062 | === modified file 'unity-shared/DecorationStyle.cpp' | |||
1063 | --- unity-shared/DecorationStyle.cpp 2016-02-09 17:14:55 +0000 | |||
1064 | +++ unity-shared/DecorationStyle.cpp 2016-05-26 00:00:49 +0000 | |||
1065 | @@ -369,6 +369,7 @@ | |||
1066 | 369 | void AddContextClasses(Side s, WidgetState ws, GtkStyleContext* ctx = nullptr) | 369 | void AddContextClasses(Side s, WidgetState ws, GtkStyleContext* ctx = nullptr) |
1067 | 370 | { | 370 | { |
1068 | 371 | ctx = ctx ? ctx : ctx_; | 371 | ctx = ctx ? ctx : ctx_; |
1069 | 372 | gtk_style_context_add_class(ctx, "background"); | ||
1070 | 372 | gtk_style_context_add_class(ctx, "gnome-panel-menu-bar"); | 373 | gtk_style_context_add_class(ctx, "gnome-panel-menu-bar"); |
1071 | 373 | if (s == Side::TOP) { gtk_style_context_add_class(ctx, "header-bar"); } | 374 | if (s == Side::TOP) { gtk_style_context_add_class(ctx, "header-bar"); } |
1072 | 374 | gtk_style_context_add_class(ctx, GetBorderClass(s).c_str()); | 375 | gtk_style_context_add_class(ctx, GetBorderClass(s).c_str()); |
1073 | 375 | 376 | ||
1074 | === modified file 'unity-shared/DecorationStyle.h' | |||
1075 | --- unity-shared/DecorationStyle.h 2016-02-25 14:16:17 +0000 | |||
1076 | +++ unity-shared/DecorationStyle.h 2016-05-26 00:00:49 +0000 | |||
1077 | @@ -25,6 +25,7 @@ | |||
1078 | 25 | #include <cairo/cairo.h> | 25 | #include <cairo/cairo.h> |
1079 | 26 | 26 | ||
1080 | 27 | #include <memory> | 27 | #include <memory> |
1081 | 28 | #include <vector> | ||
1082 | 28 | 29 | ||
1083 | 29 | struct _GtkStyleContext; | 30 | struct _GtkStyleContext; |
1084 | 30 | 31 | ||
1085 | 31 | 32 | ||
1086 | === modified file 'unity-shared/GnomeKeyGrabber.cpp' | |||
1087 | --- unity-shared/GnomeKeyGrabber.cpp 2015-12-13 10:35:58 +0000 | |||
1088 | +++ unity-shared/GnomeKeyGrabber.cpp 2016-05-26 00:00:49 +0000 | |||
1089 | @@ -232,8 +232,11 @@ | |||
1090 | 232 | { | 232 | { |
1091 | 233 | action.setState(CompAction::StateInitKey); | 233 | action.setState(CompAction::StateInitKey); |
1092 | 234 | action.setInitiate([this, action_id](CompAction* action, CompAction::State state, CompOption::Vector& options) { | 234 | action.setInitiate([this, action_id](CompAction* action, CompAction::State state, CompOption::Vector& options) { |
1095 | 235 | LOG_DEBUG(logger) << "pressed \"" << action->keyToString() << "\""; | 235 | if (!CompOption::getBoolOptionNamed(options, "is_repeated")) |
1096 | 236 | ActivateDBusAction(*action, action_id, 0, CompOption::getIntOptionNamed(options, "time")); | 236 | { |
1097 | 237 | LOG_DEBUG(logger) << "pressed \"" << action->keyToString() << "\""; | ||
1098 | 238 | ActivateDBusAction(*action, action_id, 0, CompOption::getIntOptionNamed(options, "time")); | ||
1099 | 239 | } | ||
1100 | 237 | return true; | 240 | return true; |
1101 | 238 | }); | 241 | }); |
1102 | 239 | } | 242 | } |
1103 | 240 | 243 | ||
1104 | === modified file 'unity-shared/PanelStyle.cpp' | |||
1105 | --- unity-shared/PanelStyle.cpp 2016-03-31 05:37:15 +0000 | |||
1106 | +++ unity-shared/PanelStyle.cpp 2016-05-26 00:00:49 +0000 | |||
1107 | @@ -85,6 +85,7 @@ | |||
1108 | 85 | gtk_widget_path_iter_set_name(widget_path.get(), -1, PANEL_STYLE_CSS_NAME.c_str()); | 85 | gtk_widget_path_iter_set_name(widget_path.get(), -1, PANEL_STYLE_CSS_NAME.c_str()); |
1109 | 86 | 86 | ||
1110 | 87 | gtk_style_context_set_path(style_context_, widget_path.get()); | 87 | gtk_style_context_set_path(style_context_, widget_path.get()); |
1111 | 88 | gtk_style_context_add_class(style_context_, "background"); | ||
1112 | 88 | gtk_style_context_add_class(style_context_, "gnome-panel-menu-bar"); | 89 | gtk_style_context_add_class(style_context_, "gnome-panel-menu-bar"); |
1113 | 89 | gtk_style_context_add_class(style_context_, "unity-panel"); | 90 | gtk_style_context_add_class(style_context_, "unity-panel"); |
1114 | 90 | 91 |
+1