First cut at activities overlay

When the user clicks on "Activities", adjust the input shape
to the whole screen and show a black overlay group. Actually, the
black should be *beneath* the window actors and the overlay group
transparent so we can fade in the black while leaving the windows
unfaded, visible, but shrunk and rearranged.

svn path=/trunk/; revision=14
This commit is contained in:
Owen Taylor
2008-10-31 23:09:46 +00:00
parent 0cea92e46a
commit 9e45cf84fb
3 changed files with 79 additions and 4 deletions

View File

@ -4,11 +4,13 @@ const Shell = imports.gi.Shell;
const Clutter = imports.gi.Clutter;
const Panel = imports.ui.panel;
const Overlay = imports.ui.overlay;
const DEFAULT_BACKGROUND_COLOR = new Clutter.Color();
DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff);
let panel = null;
let overlay = null;
function start() {
let global = Shell.global_get();
@ -20,9 +22,25 @@ function start() {
// Mutter currently hardcodes putting "Yessir. The compositor is running""
// in the overlay. Clear that out.
children = global.overlay_group.get_children();
let children = global.overlay_group.get_children();
for (let i = 0; i < children.length; i++)
children[i].destroy();
panel = new Panel.Panel();
overlay = new Overlay.Overlay();
global.set_stage_input_area(0, 0, global.screen_width, Panel.PANEL_HEIGHT);
}
function show_overlay() {
let global = Shell.global_get();
overlay.show();
global.set_stage_input_area(0, 0, global.screen_width, global.screen_height);
}
function hide_overlay() {
let global = Shell.global_get();
overlay.hide();
global.set_stage_input_area(0, 0, global.screen_width, Panel.PANEL_HEIGHT);
}