Merge lp:~unity-team/unity/unity.sprint-fixes into lp:unity

Proposed by Gord Allott
Status: Superseded
Proposed branch: lp:~unity-team/unity/unity.sprint-fixes
Merge into: lp:unity
Diff against target: 676 lines (+198/-161) (has conflicts)
9 files modified
targets/mutter/expose-manager.vala (+3/-47)
targets/mutter/plugin.vala (+1/-32)
unity-private/launcher/application-controller.vala (+62/-39)
unity-private/launcher/launcher-child.vala (+10/-0)
unity-private/launcher/quicklist-controller.vala (+8/-1)
unity-private/launcher/scroller-controller.vala (+71/-39)
unity-private/launcher/scroller-view.vala (+32/-2)
unity-private/launcher/scrollerchild-controller.vala (+3/-0)
unity/icon-postprocessor.vala (+8/-1)
Text conflict in unity-private/launcher/application-controller.vala
To merge this branch: bzr merge lp:~unity-team/unity/unity.sprint-fixes
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+30617@code.launchpad.net

This proposal has been superseded by a proposal from 2010-07-22.

Description of the change

bunch of fixes from the sprint

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 'targets/mutter/expose-manager.vala'
2--- targets/mutter/expose-manager.vala 2010-07-19 09:12:30 +0000
3+++ targets/mutter/expose-manager.vala 2010-07-22 14:56:07 +0000
4@@ -48,7 +48,7 @@
5 unhovered_opacity = 255;
6
7 this.source = source;
8-
9+
10 if (source is Mutter.Window)
11 clone = new Clutter.Clone ((source as Mutter.Window).get_texture ());
12 else
13@@ -117,7 +117,6 @@
14
15 private ExposeClone? last_selected_clone = null;
16
17- private bool menu_in_hover_close_state = false;
18
19 public ExposeManager (Plugin plugin, Launcher.Launcher launcher)
20 {
21@@ -137,12 +136,6 @@
22
23 public void start_expose (SList<Clutter.Actor> windows)
24 {
25- var controller = Launcher.QuicklistController.get_current_menu ();
26- if (controller.is_menu_open ())
27- {
28- controller.get_view ().destroy.connect (this.end_expose);
29- this.menu_in_hover_close_state = controller.get_view ().get_close_on_leave ();
30- }
31 exposed_windows = new List<ExposeClone> ();
32
33 if (expose_group != null)
34@@ -175,26 +168,6 @@
35 clone.unhovered_opacity = unhovered_opacity;
36 clone.opacity = unhovered_opacity;
37 clone.darken = darken;
38-
39- clone.enter_event.connect (() => {
40- var ql_controller = Launcher.QuicklistController.get_current_menu ();
41- if (ql_controller.state == Launcher.QuicklistControllerState.MENU
42- && this.menu_in_hover_close_state)
43- {
44- ql_controller.get_view ().set_close_on_leave (false);
45- }
46- return false;
47- });
48-
49- clone.leave_event.connect (() => {
50- var ql_controller = Launcher.QuicklistController.get_current_menu ();
51- if (ql_controller.state == Launcher.QuicklistControllerState.MENU
52- && this.menu_in_hover_close_state)
53- {
54- ql_controller.get_view ().set_close_on_leave (true);
55- }
56- return false;
57- });
58 }
59
60 unowned GLib.List<Mutter.Window> mutter_windows = owner.plugin.get_windows ();
61@@ -223,13 +196,6 @@
62 {
63 if (!expose_showing)
64 return;
65-
66- var controller = Launcher.QuicklistController.get_current_menu ();
67- if (controller.is_menu_open ())
68- {
69- controller.get_view ().destroy.disconnect (this.end_expose);
70- controller.state = Launcher.QuicklistControllerState.CLOSED;
71- }
72
73 unowned GLib.List<Mutter.Window> mutter_windows = owner.plugin.get_windows ();
74 foreach (Mutter.Window window in mutter_windows)
75@@ -524,23 +490,13 @@
76 if (event.type == Clutter.EventType.ENTER || event.type == Clutter.EventType.LEAVE)
77 return false;
78
79- bool event_over_menu = false;
80
81 float x, y;
82 event.get_coords (out x, out y);
83
84 unowned Clutter.Actor actor = this.stage.get_actor_at_pos (Clutter.PickMode.REACTIVE, (int) x, (int) y);
85
86- Clutter.Actor? menu = null;
87- if (Unity.Launcher.QuicklistController.get_current_menu ().is_menu_open ())
88- menu = Unity.Launcher.QuicklistController.get_current_menu ().get_view ();
89- if (menu != null)
90- {
91- if (x > menu.x && x < menu.x + menu.width && y > menu.y && y < menu.y + menu.height)
92- event_over_menu = true;
93- }
94-
95- if (event.type == Clutter.EventType.BUTTON_PRESS && !event_over_menu)
96+ if (event.type == Clutter.EventType.BUTTON_PRESS)
97 pick_window (event, actor);
98
99 if (coverflow)
100@@ -548,7 +504,7 @@
101 else
102 handle_event_expose (event, actor);
103
104- return !event_over_menu;
105+ return true;
106 }
107 }
108 }
109
110=== modified file 'targets/mutter/plugin.vala'
111--- targets/mutter/plugin.vala 2010-07-16 08:43:18 +0000
112+++ targets/mutter/plugin.vala 2010-07-22 14:56:07 +0000
113@@ -308,7 +308,6 @@
114
115 private void on_focus_window_fullscreen_changed ()
116 {
117- warning ("FOCUS WINDOW FULLSCREEN CHANGED");
118 check_fullscreen_obstruction ();
119 }
120
121@@ -466,32 +465,6 @@
122 /*
123 * SHELL IMPLEMENTATION
124 */
125-
126- /*
127- public void show_window_picker ()
128- {
129- this.show_unity ();
130- return;
131- }
132-
133- if (expose_manager.expose_showing == true)
134- {
135- this.dexpose_windows ();
136- return;
137- }
138-
139- GLib.SList <Clutter.Actor> windows = null;
140-
141- unowned GLib.List<Mutter.Window> mutter_windows = this.plugin.get_windows ();
142- foreach (Mutter.Window window in mutter_windows)
143- {
144- windows.append (window as Clutter.Actor);
145- }
146-
147- this.expose_windows (windows, 80);
148- }
149- */
150-
151 public Clutter.Stage get_stage ()
152 {
153 return this.stage;
154@@ -539,7 +512,7 @@
155
156 public void stop_expose ()
157 {
158- dexpose_windows ();
159+ expose_manager.end_expose ();
160 }
161
162 public void show_window (uint32 xid)
163@@ -585,10 +558,6 @@
164 expose_manager.start_expose (windows);
165 }
166
167- public void dexpose_windows ()
168- {
169- expose_manager.end_expose ();
170- }
171
172 public void hide_unity ()
173 {
174
175=== modified file 'unity-private/launcher/application-controller.vala'
176--- unity-private/launcher/application-controller.vala 2010-07-22 09:06:10 +0000
177+++ unity-private/launcher/application-controller.vala 2010-07-22 14:56:07 +0000
178@@ -63,20 +63,12 @@
179 favorites.favorite_added.connect (on_favorite_added);
180 favorites.favorite_removed.connect (on_favorite_removed);
181
182- // we need to figure out if we are a favorite
183- is_favorite = true;
184+ // we need to figure out if we are a favoritem
185+
186+ is_favorite = is_sticky ();
187 child.pin_type = PinType.UNPINNED;
188- foreach (string uid in favorites.get_favorites ())
189- {
190- if (favorites.get_string (uid, "desktop_file") == desktop_file)
191- {
192- is_favorite = true;
193- child.pin_type = PinType.PINNED;
194- break;
195- }
196- }
197-
198- notify["menu"].connect (on_notify_menu);
199+ if (is_sticky ())
200+ child.pin_type = PinType.PINNED;
201 }
202
203 public override QuicklistController get_menu_controller ()
204@@ -85,28 +77,19 @@
205 return new_menu;
206 }
207
208- private void on_notify_menu ()
209- {
210- menu.notify["state"].connect (() => {
211- if (menu.state == QuicklistControllerState.MENU)
212- {
213- Unity.global_shell.expose_xids (app.get_xids ());
214- }
215- else
216- {
217- Unity.global_shell.stop_expose ();
218- }
219- });
220- }
221-
222 public void set_sticky (bool is_sticky = true)
223 {
224 if (desktop_file == "" || desktop_file == null)
225 return;
226- //string uid = "app-" + Path.get_basename (desktop_file);
227+
228 var favorites = Unity.Favorites.get_default ();
229
230 string uid = favorites.find_uid_for_desktop_file (desktop_file);
231+ if (uid == "" || uid == null)
232+ {
233+ var filepath = desktop_file.split ("/");
234+ uid = "app-" + filepath[filepath.length - 1];
235+ }
236
237 if (is_sticky)
238 {
239@@ -127,10 +110,10 @@
240
241 var favorites = Unity.Favorites.get_default ();
242 string uid = favorites.find_uid_for_desktop_file (desktop_file);
243- if (uid != null && uid != "")
244+ if (uid == null || uid == "")
245+ return false;
246+ else
247 return true;
248- else
249- return false;
250 }
251
252 public void close_windows ()
253@@ -188,15 +171,17 @@
254 }
255 }
256
257+/*
258+ private get_menu_for_client (ScrollerChildController.menu_cb callback, Dbusmenu.Client client)
259+ {
260+
261+ }
262+*/
263+
264 public override void get_menu_actions (ScrollerChildController.menu_cb callback)
265 {
266
267 // first check to see if we have a cached client, if we do, just re-use that
268- if (menu_client is Dbusmenu.Client && cached_menu is Dbusmenu.Menuitem)
269- {
270- callback (cached_menu);
271- }
272-
273 // check for a menu from bamf
274 if (app is Bamf.Application)
275 {
276@@ -279,14 +264,38 @@
277 Dbusmenu.Menuitem root = new Dbusmenu.Menuitem ();
278 root.set_root (true);
279
280- if (desktop_file != null)
281+ if (desktop_file != null && desktop_file != "")
282 {
283 Dbusmenu.Menuitem pinning_item = new Dbusmenu.Menuitem ();
284+<<<<<<< TREE
285 if (is_sticky ())
286 pinning_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, _("Remove from launcher"));
287+=======
288+ if (is_sticky () && app is Bamf.Application)
289+ {
290+ pinning_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, "Keep in Launcher");
291+ pinning_item.property_set (Dbusmenu.MENUITEM_PROP_TOGGLE_TYPE, Dbusmenu.MENUITEM_TOGGLE_CHECK);
292+ pinning_item.property_set_int (Dbusmenu.MENUITEM_PROP_TOGGLE_STATE, Dbusmenu.MENUITEM_TOGGLE_STATE_CHECKED);
293+ }
294+ else if (is_sticky ())
295+ {
296+ pinning_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, "Remove from launcher");
297+ }
298+>>>>>>> MERGE-SOURCE
299 else
300+<<<<<<< TREE
301 pinning_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, _("Add to launcher"));
302
303+=======
304+ {
305+ if (app is Bamf.Application)
306+ {
307+ pinning_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, "Keep in Launcher");
308+ pinning_item.property_set (Dbusmenu.MENUITEM_PROP_TOGGLE_TYPE, Dbusmenu.MENUITEM_TOGGLE_CHECK);
309+ pinning_item.property_set_int (Dbusmenu.MENUITEM_PROP_TOGGLE_STATE, Dbusmenu.MENUITEM_TOGGLE_STATE_UNCHECKED);
310+ }
311+ }
312+>>>>>>> MERGE-SOURCE
313 pinning_item.property_set_bool (Dbusmenu.MENUITEM_PROP_ENABLED, true);
314 pinning_item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, true);
315 pinning_item.item_activated.connect ((timestamp) => {
316@@ -299,7 +308,11 @@
317 if (app is Bamf.Application)
318 {
319 Dbusmenu.Menuitem app_item = new Dbusmenu.Menuitem ();
320+<<<<<<< TREE
321 app_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, _("Quit"));
322+=======
323+ app_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, "Quit");
324+>>>>>>> MERGE-SOURCE
325 app_item.property_set_bool (Dbusmenu.MENUITEM_PROP_ENABLED, true);
326 app_item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, true);
327
328@@ -317,6 +330,8 @@
329 }
330
331 private static int order_app_windows (void* a, void* b)
332+ requires (a is Bamf.Window)
333+ requires (b is Bamf.Window)
334 {
335 if ((b as Bamf.Window).last_active () > (a as Bamf.Window).last_active ())
336 {
337@@ -337,7 +352,12 @@
338
339 if (app is Bamf.Application)
340 {
341- if (app.is_running ())
342+ if (app.is_active ())
343+ {
344+ Array<uint32> xids = app.get_xids ();
345+ global_shell.expose_xids (xids);
346+ }
347+ else if (app.is_running ())
348 {
349 unowned List<Bamf.Window> windows = app.get_windows ();
350 windows.sort ((CompareFunc)order_app_windows);
351@@ -375,7 +395,7 @@
352 public void attach_application (Bamf.Application application)
353 {
354 app = application;
355- desktop_file = app.get_desktop_file ();
356+ desktop_file = app.get_desktop_file ().dup ();
357 child.running = app.is_running ();
358 child.active = app.is_active ();
359 child.activating = false;
360@@ -384,6 +404,9 @@
361 app.active_changed.connect (on_app_active_changed);
362 app.closed.connect (detach_application);
363 app.urgent_changed.connect (on_app_urgant_changed);
364+ app.user_visible_changed.connect ((value) => {
365+ hide = !value;
366+ });
367 name = app.get_name ();
368 if (name == null || name == "")
369 warning (@"Bamf returned null for app.get_name (): $desktop_file");
370
371=== modified file 'unity-private/launcher/launcher-child.vala'
372--- unity-private/launcher/launcher-child.vala 2010-06-22 13:18:52 +0000
373+++ unity-private/launcher/launcher-child.vala 2010-07-22 14:56:07 +0000
374@@ -77,6 +77,16 @@
375 rotate_timeline.new_frame.connect (on_rotate_timeline_new_frame);
376
377 notify["rotation"].connect (on_rotation_changed);
378+ notify["opacity"].connect (on_opacity_changed);
379+ }
380+
381+ private void on_opacity_changed ()
382+ {
383+ //debug (@"opacity changes on launcher child, set to $(opacity)");
384+ if (processed_icon is Clutter.Actor)
385+ {
386+ processed_icon.set_opacity (opacity);
387+ }
388 }
389
390 ~LauncherChild ()
391
392=== modified file 'unity-private/launcher/quicklist-controller.vala'
393--- unity-private/launcher/quicklist-controller.vala 2010-07-16 15:50:39 +0000
394+++ unity-private/launcher/quicklist-controller.vala 2010-07-22 14:56:07 +0000
395@@ -36,6 +36,9 @@
396 get { return _state; }
397 set
398 {
399+ var drag_controller = Unity.Drag.Controller.get_default ();
400+ if (drag_controller.is_dragging) value = QuicklistControllerState.CLOSED;
401+
402 if (value == QuicklistControllerState.LABEL ||
403 value == QuicklistControllerState.MENU)
404 {
405@@ -95,7 +98,6 @@
406
407 }
408
409-
410 public class ApplicationQuicklistController : QuicklistController
411 {
412 public ApplicationQuicklistController (ScrollerChildController scroller_child)
413@@ -111,6 +113,11 @@
414 new_menu ();
415 notify["state"].connect (on_state_change);
416 state = QuicklistControllerState.LABEL;
417+
418+ var drag_controller = Unity.Drag.Controller.get_default ();
419+ drag_controller.drag_start.connect (() => {
420+ state = QuicklistControllerState.CLOSED;
421+ });
422 }
423
424 private void new_menu ()
425
426=== modified file 'unity-private/launcher/scroller-controller.vala'
427--- unity-private/launcher/scroller-controller.vala 2010-07-15 13:19:02 +0000
428+++ unity-private/launcher/scroller-controller.vala 2010-07-22 14:56:07 +0000
429@@ -75,38 +75,34 @@
430 {
431 Bamf.Application app = object as Bamf.Application;
432 // need to hook up to its visible changed signals
433-
434- // this is wrong as it will never re-hide a window
435- app.user_visible_changed.connect ((a, changed) => {
436- if (changed)
437- {
438- handle_bamf_view_opened (a as Object);
439- }
440- });
441-
442- if (app.user_visible ())
443- {
444- string desktop_file = app.get_desktop_file ();
445-
446- ScrollerChildController controller = null;
447- if (desktop_file != null && desktop_file != "")
448- {
449- controller = find_controller_by_desktop_file (desktop_file);
450- }
451-
452- if (controller is ApplicationController)
453- {
454- (controller as ApplicationController).attach_application (app);
455- }
456- else
457- {
458- LauncherChild child = new LauncherChild ();
459- controller = new ApplicationController (null, child);
460- (controller as ApplicationController).attach_application (app);
461- model.add (child);
462- childcontrollers.add (controller);
463- controller.closed.connect (on_scroller_controller_closed);
464- }
465+ string desktop_file = app.get_desktop_file ();
466+
467+ ScrollerChildController controller = null;
468+ if (desktop_file != null && desktop_file != "")
469+ {
470+ controller = find_controller_by_desktop_file (desktop_file);
471+ }
472+
473+ if (controller is ApplicationController)
474+ {
475+ (controller as ApplicationController).attach_application (app);
476+ }
477+ else
478+ {
479+ LauncherChild child = new LauncherChild ();
480+ controller = new ApplicationController (null, child);
481+ (controller as ApplicationController).attach_application (app);
482+ if (app.user_visible ())
483+ model.add (child);
484+
485+ childcontrollers.add (controller);
486+ controller.closed.connect (on_scroller_controller_closed);
487+ controller.notify["hide"].connect (() => {
488+ if (controller.hide && controller.child in model)
489+ model.remove (controller.child);
490+ if (!controller.hide && (controller.child in model) == false)
491+ model.add (controller.child);
492+ });
493 }
494 }
495 }
496@@ -115,7 +111,7 @@
497 {
498 if (controller is ApplicationController)
499 {
500- if (controller.child.pin_type == PinType.UNPINNED)
501+ if (!(controller as ApplicationController).is_sticky ())
502 {
503 model.remove (controller.child);
504 childcontrollers.remove (controller);
505@@ -267,8 +263,17 @@
506 }
507 }
508
509+ float last_drag_x = 0.0f;
510+ float last_drag_y = 0.0f;
511 private void on_unity_drag_motion (Drag.Model drag_model, float x, float y)
512 {
513+ if (x == last_drag_x && y == last_drag_y)
514+ return;
515+
516+ last_drag_x = x;
517+ last_drag_y = y;
518+
519+
520 var drag_controller = Drag.Controller.get_default ();
521 // check to see if the data matches any of our children
522 if (!(drag_controller.get_drag_model () is ScrollerChildController))
523@@ -286,13 +291,40 @@
524 {
525 // if the actor is not in the model, add it. because its now in there!
526 // find the index at this position
527- int model_index = view.get_model_index_at_y_pos (y);
528- if (retcont in model)
529- model.move (retcont, int.max (model_index, 0));
530+ int model_index = view.get_model_index_at_y_pos_no_anim (y, true);
531+ if (model_index < 0) return;
532+
533+ //we have to check to see if we would still be over the index
534+ //if it was done animating
535+/*
536+ GLib.Value value = Value (typeof (float));
537+ var child = model[model_index];
538+ Clutter.Animation anim = child.get_animation ();
539+ if (anim is Clutter.Animation)
540+ {
541+ debug ("is animating");
542+ Clutter.Interval interval = anim.get_interval ("position");
543+ interval.get_final_value (value);
544+ }
545 else
546- model.insert (retcont, int.max (model_index, 0));
547-
548- view.do_queue_redraw ();
549+ {
550+ debug ("is not animating");
551+ value.set_float (y);
552+ }
553+
554+ debug ("%f", Math.fabsf (value.get_float () - y));
555+
556+ if (Math.fabsf (value.get_float () - y) < 48)
557+ {
558+ debug ("moving things");
559+*/
560+ if (retcont in model)
561+ model.move (retcont, int.max (model_index, 0));
562+ else
563+ model.insert (retcont, int.max (model_index, 0));
564+
565+ view.do_queue_redraw ();
566+ //}
567 }
568 }
569
570
571=== modified file 'unity-private/launcher/scroller-view.vala'
572--- unity-private/launcher/scroller-view.vala 2010-07-19 13:06:02 +0000
573+++ unity-private/launcher/scroller-view.vala 2010-07-22 14:56:07 +0000
574@@ -156,7 +156,35 @@
575 });
576 }
577
578- public int get_model_index_at_y_pos (float y)
579+ public int get_model_index_at_y_pos_no_anim (float y, bool return_minus_if_fail=false)
580+ {
581+ SList<float?> positions = new SList<float?> ();
582+ foreach (ScrollerChild child in model)
583+ {
584+ positions.append (child.position);
585+ GLib.Value value = Value (typeof (float));
586+ Clutter.Animation anim = child.get_animation ();
587+ if (anim is Clutter.Animation)
588+ {
589+ Clutter.Interval interval = anim.get_interval ("position");
590+ interval.get_final_value (value);
591+ child.position = value.get_float ();
592+ }
593+ }
594+
595+ int value = get_model_index_at_y_pos (y, return_minus_if_fail);
596+
597+ unowned SList<float?> list = positions;
598+ foreach (ScrollerChild child in model)
599+ {
600+ child.position = (float)list.data;
601+ list = list.next;
602+ }
603+
604+ return value;
605+ }
606+
607+ public int get_model_index_at_y_pos (float y, bool return_minus_if_fail=false)
608 {
609
610 // trying out a different method
611@@ -174,6 +202,8 @@
612
613 if (picked_actor is ScrollerChild == false)
614 {
615+ if (return_minus_if_fail)
616+ return -1;
617 // couldn't pick a single actor, return 0
618 return (y < padding.top + model[0].get_height () + spacing) ? 0 : model.size -1 ;
619 }
620@@ -660,7 +690,7 @@
621 if (child.get_animation () is Clutter.Animation)
622 {
623 //GLib.Value value = GLib.Value (GLib.Type.from_name ("string"));
624- GLib.Value value = typeof (float);
625+ GLib.Value value = Value (typeof (float));
626 Clutter.Interval interval = child.get_animation ().get_interval ("position");
627 interval.get_final_value (value);
628 if (value.get_float () != transitions[index].position)
629
630=== modified file 'unity-private/launcher/scrollerchild-controller.vala'
631--- unity-private/launcher/scrollerchild-controller.vala 2010-07-15 09:29:49 +0000
632+++ unity-private/launcher/scrollerchild-controller.vala 2010-07-22 14:56:07 +0000
633@@ -38,6 +38,8 @@
634 public ScrollerChild child {get; construct;}
635 public signal void request_removal (); //call when not needed anymore so we can unref
636 public string name = "If you can read this, file a bug!!";
637+ public bool hide {get; set;}
638+
639
640 public signal void closed ();
641
642@@ -140,6 +142,7 @@
643 private void ensure_menu_state ()
644 {
645 //no tooltips on drag
646+
647 if (Unity.Drag.Controller.get_default ().is_dragging) return;
648
649 if (menu is QuicklistController == false)
650
651=== modified file 'unity/icon-postprocessor.vala'
652--- unity/icon-postprocessor.vala 2010-06-24 09:10:53 +0000
653+++ unity/icon-postprocessor.vala 2010-07-22 14:56:07 +0000
654@@ -254,6 +254,11 @@
655 g_total = g_total / uint.max (total_caught_pixels, 1);
656 b_total = b_total / uint.max (total_caught_pixels, 1);
657
658+ rs_total = rs_total / (width * height);
659+ gs_total = gs_total / (width * height);
660+ bs_total = bs_total / (width * height);
661+
662+
663 // get a new super saturated value based on our totals
664 if (total_caught_pixels <= 20)
665 {
666@@ -491,7 +496,9 @@
667 }
668 };
669
670- uchar opacity = self.get_paint_opacity ();
671+ uchar opacity = self.get_opacity ();
672+
673+ //debug (@"opacity is set to $opacity");
674
675 self.bg_mat.set_color4ub (opacity, opacity, opacity, opacity);
676 self.bgcol_material.set_color4ub (opacity, opacity, opacity, opacity);