layout: Make ripple boxes initially invisible

The three boxes for the ripple animation are visible when created. This
means that the drag and drop code that searches for an actor to handle
the drag can find the ripple boxes instead of the Activities button or
hot corner. The latter can handle drag and drop while the ripple boxes
can't.
This is only a problem if drag and drop is attempted before the ripple
animation has been played: the boxes are made invisible at the end of
the animation. The fix is to just create the boxes invisible.
This commit is contained in:
Ron Yorsten 2011-12-05 10:32:04 +01:00 committed by Florian Müllner
parent 0cbaeaefed
commit 80c16aa8f7

View File

@ -433,9 +433,9 @@ const HotCorner = new Lang.Class({
Lang.bind(this, this._onCornerLeft)); Lang.bind(this, this._onCornerLeft));
// Cache the three ripples instead of dynamically creating and destroying them. // Cache the three ripples instead of dynamically creating and destroying them.
this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0 }); this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
this._ripple2 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0 }); this._ripple2 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
this._ripple3 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0 }); this._ripple3 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
Main.uiGroup.add_actor(this._ripple1); Main.uiGroup.add_actor(this._ripple1);
Main.uiGroup.add_actor(this._ripple2); Main.uiGroup.add_actor(this._ripple2);