Merge lp:~3v1n0/unity/fix-690143 into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: 1462
Proposed branch: lp:~3v1n0/unity/fix-690143
Merge into: lp:unity
Diff against target: 554 lines (+169/-33)
13 files modified
plugins/unityshell/src/AbstractIconRenderer.h (+2/-0)
plugins/unityshell/src/BamfLauncherIcon.cpp (+40/-1)
plugins/unityshell/src/BamfLauncherIcon.h (+1/-0)
plugins/unityshell/src/IconRenderer.cpp (+5/-6)
plugins/unityshell/src/Launcher.cpp (+52/-3)
plugins/unityshell/src/Launcher.h (+7/-0)
plugins/unityshell/src/PluginAdapter.cpp (+24/-0)
plugins/unityshell/src/PluginAdapter.h (+3/-0)
plugins/unityshell/src/WindowManager.cpp (+5/-0)
plugins/unityshell/src/WindowManager.h (+6/-0)
plugins/unityshell/src/compizminimizedwindowhandler.h (+14/-6)
plugins/unityshell/src/unityshell.cpp (+1/-16)
plugins/unityshell/unityshell.xml.in (+9/-1)
To merge this branch: bzr merge lp:~3v1n0/unity/fix-690143
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+73430@code.launchpad.net

This proposal supersedes a proposal from 2011-07-29.

Description of the change

Proposal of merge resubmitted after the update of the branch against the newest unity trunk.
I never experienced the crash that Jason found on my test with this version (as I never found one with the previous one), and it also fixes a new bug introduced by the CompizMinimizedWindowHandler that caused unity not to be notified for some events like the viewport switch (and this was causing some visual issues, like the launcher hiding during the vp switch).

Old merge request message (still valid)
=======================================

Fixed bug #690143 as requested by the design team specifications.

To get this I had to get signals from Compiz related to the viewport switch, so to achive this and to keep the implementation clean, I decided to implement the new PluginAdapter signals compiz_screen_viewport_switch_{started,ended}. They are emitted using the PluginAdapter::NotifyCompizEvent function that is called directly by unityshell (UnityScreen).

So now both Launcher and BamfLauncherIcon are listening to these signals to perform their operations. In particular BamfLauncherIcon uses it to check if, after a viewport switch (or a scale terminate), all the windows of the given Icon are viewable in the current workspace and to update the icon indicator accordingly.

Plus I decided to give also another Icon backlight coloring option, and after talking with JohnLea on #ayatana I also added two more options to the "Backlight Mode":
 - Edge Illumination Toggles: illuminate only the edge of the icons linked to
                              running applications.
 - Backlight and Edge Illumination Toggles: illuminate the background of the
                                            icons linked to running
                                            applications; if the windows
                                            of this application are all in
                                            a non viewable workspace, then
                                            only the edge of the icon is
                                            illuminated.

You can see a working example of the "Backlight and Edge Illumination Toggles" option on this screenshot [1].

[1] https://bugs.launchpad.net/unity/+bug/690143/+attachment/2240766/+files/Unity-Unactive-Icons.png

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote : Posted in a previous version of this proposal

Crashes in current trunk

review: Needs Fixing
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal

Mhmhm... Maybe I've worked with a too old version but it was working fine. However I'll retry with the current trunk.

Thank you!

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal

It seems to work fine here also after merging with upstream, so I'm waiting for a crash log to fix it.

Revision history for this message
Jason Smith (jassmith) wrote :

Works great now

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/AbstractIconRenderer.h'
2--- plugins/unityshell/src/AbstractIconRenderer.h 2011-08-24 22:30:37 +0000
3+++ plugins/unityshell/src/AbstractIconRenderer.h 2011-08-30 19:14:24 +0000
4@@ -54,6 +54,7 @@
5 , running_arrow(false)
6 , running_colored(false)
7 , running_on_viewport(false)
8+ , draw_edge_only(false)
9 , active_arrow(false)
10 , active_colored(false)
11 , skip(false)
12@@ -82,6 +83,7 @@
13 bool running_arrow;
14 bool running_colored;
15 bool running_on_viewport;
16+ bool draw_edge_only;
17 bool active_arrow;
18 bool active_colored;
19 bool skip;
20
21=== modified file 'plugins/unityshell/src/BamfLauncherIcon.cpp'
22--- plugins/unityshell/src/BamfLauncherIcon.cpp 2011-08-29 23:36:21 +0000
23+++ plugins/unityshell/src/BamfLauncherIcon.cpp 2011-08-30 19:14:24 +0000
24@@ -186,6 +186,8 @@
25 this);
26
27 WindowManager::Default()->window_minimized.connect(sigc::mem_fun(this, &BamfLauncherIcon::OnWindowMinimized));
28+ WindowManager::Default()->compiz_screen_viewport_switch_ended.connect(sigc::mem_fun(this, &BamfLauncherIcon::OnViewPortSwitchEnded));
29+ WindowManager::Default()->terminate_expo.connect(sigc::mem_fun(this, &BamfLauncherIcon::OnViewPortSwitchEnded));
30 IconManager->hidden_changed.connect(sigc::mem_fun(this, &BamfLauncherIcon::OnLauncherHiddenChanged));
31
32 // hack
33@@ -290,6 +292,31 @@
34 UpdateQuirkTimeDelayed(300, QUIRK_SHIMMER);
35 }
36
37+void BamfLauncherIcon::OnViewPortSwitchEnded()
38+{
39+ bool any_on_current = false;
40+ GList *children = bamf_view_get_children(BAMF_VIEW(m_App));
41+
42+ for (GList *l = children; l; l = l->next)
43+ {
44+ BamfView *view = BAMF_VIEW(l->data);
45+
46+ if (BAMF_IS_WINDOW(view))
47+ {
48+ Window xid = bamf_window_get_xid(BAMF_WINDOW(view));
49+ if (WindowManager::Default()->IsWindowOnCurrentDesktop(xid))
50+ {
51+ any_on_current = true;
52+ break;
53+ }
54+ }
55+ }
56+
57+ SetHasWindowOnViewport(any_on_current);
58+
59+ g_list_free(children);
60+}
61+
62 bool BamfLauncherIcon::IsSticky()
63 {
64 return bamf_view_is_sticky(BAMF_VIEW(m_App));
65@@ -358,6 +385,8 @@
66 BamfView* view;
67 bool owns = false;
68
69+ if (!w) return owns;
70+
71 children = bamf_view_get_children(BAMF_VIEW(m_App));
72
73 for (l = children; l; l = l->next)
74@@ -546,16 +575,26 @@
75 {
76 GList* children, *l;
77 int count = 0;
78+ bool has_visible = false;
79+
80 children = bamf_view_get_children(BAMF_VIEW(m_App));
81 for (l = children; l; l = l->next)
82 {
83 if (!BAMF_IS_WINDOW(l->data))
84 continue;
85+
86+ if (!has_visible)
87+ {
88+ Window xid = bamf_window_get_xid(BAMF_WINDOW(l->data));
89+ if (WindowManager::Default()->IsWindowOnCurrentDesktop(xid))
90+ has_visible = true;
91+ }
92+
93 count++;
94 }
95
96 SetRelatedWindows(count);
97- SetHasWindowOnViewport(true); // FIXME
98+ SetHasWindowOnViewport(has_visible);
99
100 g_list_free(children);
101 }
102
103=== modified file 'plugins/unityshell/src/BamfLauncherIcon.h'
104--- plugins/unityshell/src/BamfLauncherIcon.h 2011-08-29 23:36:21 +0000
105+++ plugins/unityshell/src/BamfLauncherIcon.h 2011-08-30 19:14:24 +0000
106@@ -108,6 +108,7 @@
107 void EnsureMenuItemsReady();
108
109 void OnWindowMinimized(guint32 xid);
110+ void OnViewPortSwitchEnded();
111 bool OwnsWindow(Window w);
112
113 const std::set<std::string>& GetSupportedTypes();
114
115=== modified file 'plugins/unityshell/src/IconRenderer.cpp'
116--- plugins/unityshell/src/IconRenderer.cpp 2011-08-25 18:55:57 +0000
117+++ plugins/unityshell/src/IconRenderer.cpp 2011-08-30 19:14:24 +0000
118@@ -408,7 +408,7 @@
119 auto tile_transform = arg.icon->GetTransform(AbstractLauncherIcon::TRANSFORM_TILE);
120
121 // draw tile
122- if (backlight_intensity > 0)
123+ if (backlight_intensity > 0 && !arg.draw_edge_only)
124 {
125 RenderElement(GfxContext,
126 arg,
127@@ -778,13 +778,12 @@
128 // markers are well outside screen bounds to start
129 int markers [3] = {-100, -100, -100};
130
131- /*if (!arg.running_on_viewport)
132+ if (!arg.running_on_viewport)
133 {
134- markers.push_back (markerCenter);
135- texture = _arrow_empty_ltr;
136+ markers[0] = markerCenter;
137+ texture = local::arrow_empty_ltr;
138 }
139- else*/
140- if (running == 1)
141+ else if (running == 1)
142 {
143 markers[0] = markerCenter;
144 texture = local::arrow_ltr;
145
146=== modified file 'plugins/unityshell/src/Launcher.cpp'
147--- plugins/unityshell/src/Launcher.cpp 2011-08-29 23:36:21 +0000
148+++ plugins/unityshell/src/Launcher.cpp 2011-08-30 19:14:24 +0000
149@@ -189,6 +189,8 @@
150 plugin_adapter.initiate_expo.connect(sigc::mem_fun(this, &Launcher::OnPluginStateChanged));
151 plugin_adapter.terminate_spread.connect(sigc::mem_fun(this, &Launcher::OnPluginStateChanged));
152 plugin_adapter.terminate_expo.connect(sigc::mem_fun(this, &Launcher::OnPluginStateChanged));
153+ plugin_adapter.compiz_screen_viewport_switch_started.connect(sigc::mem_fun(this, &Launcher::OnViewPortSwitchStarted));
154+ plugin_adapter.compiz_screen_viewport_switch_ended.connect(sigc::mem_fun(this, &Launcher::OnViewPortSwitchEnded));
155
156 GeisAdapter& adapter = *(GeisAdapter::Default());
157 adapter.drag_start.connect(sigc::mem_fun(this, &Launcher::OnDragStart));
158@@ -895,7 +897,8 @@
159 struct timespec starting_time = icon->GetQuirkTime(LauncherIcon::QUIRK_STARTING);
160 int starting_ms = TimeDelta(&current, &starting_time);
161 double starting_progress = (double) CLAMP((float) starting_ms / (float)(ANIM_DURATION_LONG * STARTING_BLINK_LAMBDA), 0.0f, 1.0f);
162- return 0.5f + (float)(std::cos(M_PI * (_backlight_mode != BACKLIGHT_NORMAL ? 4.0f : 3.0f) * starting_progress)) * 0.5f;
163+ double val = IsBackLightModeToggles() ? 3.0f : 4.0f;
164+ return 0.5f + (float)(std::cos(M_PI * val * starting_progress)) * 0.5f;
165 }
166
167 float Launcher::IconStartingPulseValue(LauncherIcon* icon, struct timespec const& current)
168@@ -931,7 +934,7 @@
169 float backlight_strength;
170 if (_backlight_mode == BACKLIGHT_ALWAYS_ON)
171 backlight_strength = BACKLIGHT_STRENGTH;
172- else if (_backlight_mode == BACKLIGHT_NORMAL)
173+ else if (IsBackLightModeToggles())
174 backlight_strength = BACKLIGHT_STRENGTH * running_progress;
175 else
176 backlight_strength = 0.0f;
177@@ -956,7 +959,7 @@
178 result = backlight_strength;
179 if (_backlight_mode == BACKLIGHT_ALWAYS_ON)
180 result *= CLAMP(running_progress + IconStartingPulseValue(icon, current), 0.0f, 1.0f);
181- else if (_backlight_mode == BACKLIGHT_NORMAL)
182+ else if (IsBackLightModeToggles())
183 result += (BACKLIGHT_STRENGTH - result) * (1.0f - IconStartingPulseValue(icon, current));
184 else
185 result = 1.0f - CLAMP(running_progress + IconStartingPulseValue(icon, current), 0.0f, 1.0f);
186@@ -992,6 +995,17 @@
187 return result;
188 }
189
190+bool Launcher::IconDrawEdgeOnly(LauncherIcon* icon)
191+{
192+ if (_backlight_mode == BACKLIGHT_EDGE_TOGGLE)
193+ return true;
194+
195+ if (_backlight_mode == BACKLIGHT_NORMAL_EDGE_TOGGLE && !icon->HasWindowOnViewport())
196+ return true;
197+
198+ return false;
199+}
200+
201 void Launcher::SetupRenderArg(LauncherIcon* icon, struct timespec const& current, RenderArg& arg)
202 {
203 arg.icon = icon;
204@@ -1000,6 +1014,7 @@
205 arg.running_arrow = icon->GetQuirk(LauncherIcon::QUIRK_RUNNING);
206 arg.running_colored = icon->GetQuirk(LauncherIcon::QUIRK_URGENT);
207 arg.running_on_viewport = icon->HasWindowOnViewport();
208+ arg.draw_edge_only = IconDrawEdgeOnly(icon);
209 arg.active_colored = false;
210 arg.x_rotation = 0.0f;
211 arg.y_rotation = 0.0f;
212@@ -1653,6 +1668,28 @@
213 return;
214 }
215
216+void
217+Launcher::OnViewPortSwitchStarted()
218+{
219+ /*
220+ * don't take into account window over launcher state during
221+ * the viewport switch as we can get false positives
222+ * (like switching to an empty viewport while grabbing a fullscreen window)
223+ */
224+ _check_window_over_launcher = false;
225+}
226+
227+void
228+Launcher::OnViewPortSwitchEnded()
229+{
230+ /*
231+ * compute again the list of all window on the new viewport
232+ * to decide if we should or not hide the launcher
233+ */
234+ _check_window_over_launcher = true;
235+ CheckWindowOverLauncher();
236+}
237+
238 Launcher::LauncherHideMode Launcher::GetHideMode()
239 {
240 return _hidemode;
241@@ -1729,6 +1766,18 @@
242 return _backlight_mode;
243 }
244
245+bool Launcher::IsBackLightModeToggles()
246+{
247+ switch (_backlight_mode) {
248+ case BACKLIGHT_NORMAL:
249+ case BACKLIGHT_EDGE_TOGGLE:
250+ case BACKLIGHT_NORMAL_EDGE_TOGGLE:
251+ return true;
252+ default:
253+ return false;
254+ }
255+}
256+
257 void
258 Launcher::SetLaunchAnimation(LaunchAnimation animation)
259 {
260
261=== modified file 'plugins/unityshell/src/Launcher.h'
262--- plugins/unityshell/src/Launcher.h 2011-08-29 23:36:21 +0000
263+++ plugins/unityshell/src/Launcher.h 2011-08-30 19:14:24 +0000
264@@ -99,6 +99,8 @@
265 BACKLIGHT_ALWAYS_ON,
266 BACKLIGHT_NORMAL,
267 BACKLIGHT_ALWAYS_OFF,
268+ BACKLIGHT_EDGE_TOGGLE,
269+ BACKLIGHT_NORMAL_EDGE_TOGGLE
270 } BacklightMode;
271
272 Launcher(nux::BaseWindow* parent, NUX_FILE_LINE_PROTO);
273@@ -140,6 +142,7 @@
274
275 void SetBacklightMode(BacklightMode mode);
276 BacklightMode GetBacklightMode();
277+ bool IsBackLightModeToggles();
278
279 void SetLaunchAnimation(LaunchAnimation animation);
280 LaunchAnimation GetLaunchAnimation();
281@@ -247,6 +250,9 @@
282
283 void OnPluginStateChanged();
284
285+ void OnViewPortSwitchStarted();
286+ void OnViewPortSwitchEnded();
287+
288 static gboolean AnimationTimeout(gpointer data);
289 static gboolean SuperShowLauncherTimeout(gpointer data);
290 static gboolean SuperHideLauncherTimeout(gpointer data);
291@@ -266,6 +272,7 @@
292 void OnDragWindowAnimCompleted();
293
294 bool IconNeedsAnimation(LauncherIcon* icon, struct timespec const& current);
295+ bool IconDrawEdgeOnly(LauncherIcon* icon);
296 bool AnimationInProgress();
297
298 void SetActionState(LauncherActionState actionstate);
299
300=== modified file 'plugins/unityshell/src/PluginAdapter.cpp'
301--- plugins/unityshell/src/PluginAdapter.cpp 2011-08-29 23:36:21 +0000
302+++ plugins/unityshell/src/PluginAdapter.cpp 2011-08-30 19:14:24 +0000
303@@ -63,6 +63,7 @@
304 {
305 _spread_state = false;
306 _expo_state = false;
307+ _vp_switch_started = false;
308
309 _grab_show_action = 0;
310 _grab_hide_action = 0;
311@@ -190,6 +191,23 @@
312 }
313
314 void
315+PluginAdapter::NotifyCompizEvent(const char* plugin, const char* event, CompOption::Vector& option)
316+{
317+ if (g_strcmp0(event, "start_viewport_switch") == 0)
318+ {
319+ _vp_switch_started = true;
320+ compiz_screen_viewport_switch_started.emit();
321+ }
322+ else if (g_strcmp0(event, "end_viewport_switch") == 0)
323+ {
324+ _vp_switch_started = false;
325+ compiz_screen_viewport_switch_ended.emit();
326+ }
327+
328+ compiz_event.emit(plugin, event, option);
329+}
330+
331+void
332 MultiActionList::AddNewAction(CompAction* a, bool primary)
333 {
334 if (std::find(m_ActionList.begin(), m_ActionList.end(), a) == m_ActionList.end())
335@@ -785,6 +803,12 @@
336 return m_Screen->grabbed();
337 }
338
339+bool
340+PluginAdapter::IsViewPortSwitchStarted()
341+{
342+ return _vp_switch_started;
343+}
344+
345 void PluginAdapter::MaximizeIfBigEnough(CompWindow* window)
346 {
347 XClassHint classHint;
348
349=== modified file 'plugins/unityshell/src/PluginAdapter.h'
350--- plugins/unityshell/src/PluginAdapter.h 2011-08-29 23:36:21 +0000
351+++ plugins/unityshell/src/PluginAdapter.h 2011-08-30 19:14:24 +0000
352@@ -103,6 +103,7 @@
353 void NotifyMoved(CompWindow* window, int x, int y);
354 void NotifyResized(CompWindow* window, int x, int y, int w, int h);
355 void NotifyStateChange(CompWindow* window, unsigned int state, unsigned int last_state);
356+ void NotifyCompizEvent(const char* plugin, const char* event, CompOption::Vector& option);
357
358 void Decorate(guint32 xid);
359 void Undecorate(guint32 xid);
360@@ -126,6 +127,7 @@
361 bool ScaleWindowGroup(std::vector<Window> windows, int state, bool force);
362
363 bool IsScreenGrabbed();
364+ bool IsViewPortSwitchStarted();
365
366 unsigned int GetWindowActiveNumber (guint32 xid);
367
368@@ -160,6 +162,7 @@
369
370 bool _spread_state;
371 bool _expo_state;
372+ bool _vp_switch_started;
373
374 CompAction* _grab_show_action;
375 CompAction* _grab_hide_action;
376
377=== modified file 'plugins/unityshell/src/WindowManager.cpp'
378--- plugins/unityshell/src/WindowManager.cpp 2011-08-29 23:36:21 +0000
379+++ plugins/unityshell/src/WindowManager.cpp 2011-08-30 19:14:24 +0000
380@@ -32,6 +32,11 @@
381 return false;
382 }
383
384+ bool IsViewPortSwitchStarted()
385+ {
386+ return false;
387+ }
388+
389 void ShowDesktop()
390 {
391 g_debug("%s", G_STRFUNC);
392
393=== modified file 'plugins/unityshell/src/WindowManager.h'
394--- plugins/unityshell/src/WindowManager.h 2011-08-29 23:36:21 +0000
395+++ plugins/unityshell/src/WindowManager.h 2011-08-30 19:14:24 +0000
396@@ -25,6 +25,7 @@
397 #include "Nux/WindowThread.h"
398 #include "NuxGraphics/GLWindowManager.h"
399 #include <gdk/gdkx.h>
400+#include <core/core.h>
401
402 class WindowManager
403 {
404@@ -75,6 +76,7 @@
405 virtual void Undecorate(guint32 xid) {};
406
407 virtual bool IsScreenGrabbed() = 0;
408+ virtual bool IsViewPortSwitchStarted() = 0;
409
410 void StartMove(guint32 id, int, int);
411
412@@ -113,6 +115,10 @@
413
414 sigc::signal<void> compiz_screen_grabbed;
415 sigc::signal<void> compiz_screen_ungrabbed;
416+ sigc::signal<void> compiz_screen_viewport_switch_started;
417+ sigc::signal<void> compiz_screen_viewport_switch_ended;
418+
419+ sigc::signal<void, const char*, const char*, CompOption::Vector&> compiz_event;
420
421 private:
422 Atom m_MoveResizeAtom;
423
424=== modified file 'plugins/unityshell/src/compizminimizedwindowhandler.h'
425--- plugins/unityshell/src/compizminimizedwindowhandler.h 2011-08-24 17:01:08 +0000
426+++ plugins/unityshell/src/compizminimizedwindowhandler.h 2011-08-30 19:14:24 +0000
427@@ -1,3 +1,4 @@
428+// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
429 /*
430 * Copyright (C) 2011 Canonical Ltd.
431 *
432@@ -53,9 +54,7 @@
433 void unminimize ();
434
435 static void setFunctions (bool keepMinimized);
436- static void handleCompizEvent (const char *,
437- const char *,
438- CompOption::Vector &);
439+ static void handleCompizEvent (const char *, const char *, CompOption::Vector &);
440 static std::list<CompWindow *> minimizingWindows;
441
442 typedef CompizMinimizedWindowHandler<Screen, Window> CompizMinimizedWindowHandler_complete;
443@@ -67,6 +66,7 @@
444 private:
445
446 PrivateCompizMinimizedWindowHandler *priv;
447+ static bool handleEvents;
448 };
449 }
450
451@@ -74,6 +74,9 @@
452 CompWindowList compiz::CompizMinimizedWindowHandler<Screen, Window>::minimizingWindows;
453
454 template <typename Screen, typename Window>
455+bool compiz::CompizMinimizedWindowHandler<Screen, Window>::handleEvents = true;
456+
457+template <typename Screen, typename Window>
458 compiz::CompizMinimizedWindowHandler<Screen, Window>::CompizMinimizedWindowHandler(CompWindow *w) :
459 MinimizedWindowHandler (screen->dpy (), w->id ())
460 {
461@@ -121,7 +124,7 @@
462
463 std::vector<unsigned int> transients = getTransients ();
464
465- screen->handleCompizEventSetEnabled (Screen::get (screen), true);
466+ handleEvents = true;
467 priv->mWindow->windowNotify (CompWindowNotifyMinimize);
468 priv->mWindow->changeState (priv->mWindow->state () | CompWindowStateHiddenMask);
469
470@@ -205,6 +208,9 @@
471 const char *eventName,
472 CompOption::Vector &o)
473 {
474+ if (!handleEvents)
475+ return;
476+
477 if (strncmp (pluginName, "animation", 9) == 0 &&
478 strncmp (eventName, "window_animation", 16) == 0)
479 {
480@@ -218,13 +224,15 @@
481 minimizingWindows.push_back (w);
482 else
483 minimizingWindows.remove (w);
484- }
485+ }
486 }
487 }
488
489 if (!CompOption::getBoolOptionNamed (o, "active", false) &&
490 minimizingWindows.empty ())
491- screen->handleCompizEventSetEnabled (Screen::get (screen), false);
492+ {
493+ handleEvents = false;
494+ }
495 }
496
497 template <typename Screen, typename Window>
498
499=== modified file 'plugins/unityshell/src/unityshell.cpp'
500--- plugins/unityshell/src/unityshell.cpp 2011-08-29 23:36:21 +0000
501+++ plugins/unityshell/src/unityshell.cpp 2011-08-30 19:14:24 +0000
502@@ -848,23 +848,8 @@
503 const char* event,
504 CompOption::Vector& option)
505 {
506- /*
507- * don't take into account window over launcher state during
508- * the ws switch as we can get false positives
509- * (like switching to an empty viewport while grabbing a fullscreen window)
510- */
511- if (strcmp(event, "start_viewport_switch") == 0)
512- launcher->EnableCheckWindowOverLauncher(false);
513- else if (strcmp(event, "end_viewport_switch") == 0)
514- {
515- // compute again the list of all window on the new viewport
516- // to decide if we should or not hide the launcher
517- launcher->EnableCheckWindowOverLauncher(true);
518- launcher->CheckWindowOverLauncher();
519- }
520-
521+ PluginAdapter::Default()->NotifyCompizEvent(plugin, event, option);
522 compiz::CompizMinimizedWindowHandler<UnityScreen, UnityWindow>::handleCompizEvent (plugin, event, option);
523-
524 screen->handleCompizEvent(plugin, event, option);
525 }
526
527
528=== modified file 'plugins/unityshell/unityshell.xml.in'
529--- plugins/unityshell/unityshell.xml.in 2011-08-26 22:31:20 +0000
530+++ plugins/unityshell/unityshell.xml.in 2011-08-30 19:14:24 +0000
531@@ -160,7 +160,7 @@
532 <_short>Backlight Mode</_short>
533 <_long>Change how the icons are backlit</_long>
534 <min>0</min>
535- <max>2</max>
536+ <max>4</max>
537 <default>0</default>
538 <desc>
539 <value>0</value>
540@@ -174,6 +174,14 @@
541 <value>2</value>
542 <_name>Backlight Always Off</_name>
543 </desc>
544+ <desc>
545+ <value>3</value>
546+ <_name>Edge Illumination Toggles</_name>
547+ </desc>
548+ <desc>
549+ <value>4</value>
550+ <_name>Backlight and Edge Illumination Toggles</_name>
551+ </desc>
552 </option>
553 <option name="launch_animation" type="int">
554 <_short>Launch Animation</_short>