Make the workspaces view a temporary "widget", rather than having it always
around svn path=/trunk/; revision=124
This commit is contained in:
parent
98860733bb
commit
249e65ee30
@ -121,9 +121,6 @@ Sideshow.prototype = {
|
|||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
this._appDisplay.show();
|
this._appDisplay.show();
|
||||||
},
|
|
||||||
|
|
||||||
hide: function() {
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Signals.addSignalMethods(Sideshow.prototype);
|
Signals.addSignalMethods(Sideshow.prototype);
|
||||||
@ -155,11 +152,6 @@ Overlay.prototype = {
|
|||||||
// TODO - recalculate everything when desktop size changes
|
// TODO - recalculate everything when desktop size changes
|
||||||
this._recalculateSize();
|
this._recalculateSize();
|
||||||
|
|
||||||
this._workspaces = new Workspaces.Workspaces(
|
|
||||||
this._workspaceGridX, this._workspaceGridY,
|
|
||||||
this._workspaceGridWidth, this._workspaceGridHeight);
|
|
||||||
this._group.add_actor(this._workspaces._group);
|
|
||||||
|
|
||||||
this._sideshow = new Sideshow(this._group, this._workspaceGridX - 10);
|
this._sideshow = new Sideshow(this._group, this._workspaceGridX - 10);
|
||||||
this._sideshow.connect('activated', function(sideshow) {
|
this._sideshow.connect('activated', function(sideshow) {
|
||||||
// TODO - have some sort of animation/effect while
|
// TODO - have some sort of animation/effect while
|
||||||
@ -192,8 +184,12 @@ Overlay.prototype = {
|
|||||||
this._recalculateSize();
|
this._recalculateSize();
|
||||||
|
|
||||||
this._sideshow.show();
|
this._sideshow.show();
|
||||||
this._workspaces.show();
|
|
||||||
this._workspaces._group.raise_top();
|
this._workspaces = new Workspaces.Workspaces(
|
||||||
|
this._workspaceGridX, this._workspaceGridY,
|
||||||
|
this._workspaceGridWidth, this._workspaceGridHeight);
|
||||||
|
this._group.add_actor(this._workspaces.actor);
|
||||||
|
this._workspaces.actor.raise_top();
|
||||||
|
|
||||||
// All the the actors in the window group are completely obscured,
|
// All the the actors in the window group are completely obscured,
|
||||||
// hiding the group holding them while the overlay is displayed greatly
|
// hiding the group holding them while the overlay is displayed greatly
|
||||||
@ -211,7 +207,6 @@ Overlay.prototype = {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._workspaces.hide();
|
this._workspaces.hide();
|
||||||
this._sideshow.hide();
|
|
||||||
|
|
||||||
// Dummy tween, just waiting for the workspace animation
|
// Dummy tween, just waiting for the workspace animation
|
||||||
Tweener.addTween(this,
|
Tweener.addTween(this,
|
||||||
@ -220,15 +215,16 @@ Overlay.prototype = {
|
|||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideDone: function() {
|
_hideDone: function() {
|
||||||
let global = Shell.Global.get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
global.window_group.show();
|
global.window_group.show();
|
||||||
this._group.lower_bottom();
|
|
||||||
this._group.hide();
|
this._group.hide();
|
||||||
this._workspaces.hideDone();
|
|
||||||
|
this._workspaces.destroy();
|
||||||
|
this._workspaces = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_deactivate : function() {
|
_deactivate : function() {
|
||||||
|
@ -35,19 +35,15 @@ function Workspaces(x, y, width, height) {
|
|||||||
|
|
||||||
Workspaces.prototype = {
|
Workspaces.prototype = {
|
||||||
_init : function(x, y, width, height) {
|
_init : function(x, y, width, height) {
|
||||||
|
this.actor = new Clutter.Group();
|
||||||
this._group = new Clutter.Group();
|
|
||||||
|
|
||||||
this._x = x;
|
this._x = x;
|
||||||
this._y = y;
|
this._y = y;
|
||||||
this._width = width;
|
this._width = width;
|
||||||
this._height = height;
|
this._height = height;
|
||||||
this._workspaces = [];
|
this._workspaces = [];
|
||||||
},
|
|
||||||
|
|
||||||
show : function() {
|
|
||||||
let global = Shell.Global.get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
let windows = global.get_windows();
|
let windows = global.get_windows();
|
||||||
let activeWorkspace = global.screen.get_active_workspace_index();
|
let activeWorkspace = global.screen.get_active_workspace_index();
|
||||||
|
|
||||||
@ -57,7 +53,7 @@ Workspaces.prototype = {
|
|||||||
this._workspaces = [];
|
this._workspaces = [];
|
||||||
for (let w = 0; w < global.screen.n_workspaces; w++) {
|
for (let w = 0; w < global.screen.n_workspaces; w++) {
|
||||||
this._workspaces[w] = new Clutter.Group();
|
this._workspaces[w] = new Clutter.Group();
|
||||||
this._group.add_actor(this._workspaces[w]);
|
this.actor.add_actor(this._workspaces[w]);
|
||||||
}
|
}
|
||||||
this._createDesktopActors(windows);
|
this._createDesktopActors(windows);
|
||||||
|
|
||||||
@ -146,8 +142,8 @@ Workspaces.prototype = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
hideDone : function() {
|
destroy : function() {
|
||||||
for (let w = 0; w < this._workspaces.length; w++) {
|
for (let w = 0; w < this._workspaces.length; w++) {
|
||||||
this._workspaces[w].destroy();
|
this._workspaces[w].destroy();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user