Merge lp:~unity-team/unity/x-sru1 into lp:unity/7.4

Proposed by Marco Trevisan (Treviño) on 2016-05-25
Status: Merged
Approved by: Andrea Azzarone on 2016-05-26
Approved revision: 4118
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
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) 2016-05-25 Approve on 2016-05-26
Review via email: mp+295779@code.launchpad.net

Commit message

Releasing unity SRU1 for Xenial

To post a comment you must log in.
lp:~unity-team/unity/x-sru1 updated on 2016-05-26
4118. By Marco Trevisan (Treviño) on 2016-05-26

debian/changelog: set proper version manually

Andrea Azzarone (azzar1) wrote :

+1

review: Approve

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

Subscribers

People subscribed via source and target branches

to all changes: