From b1da771d3224ee5e4a42c15fee1ffc56295eaacc Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 5 Dec 2008 21:12:43 +0000 Subject: [PATCH] Connect to overlay-key signal from metacity-clutter to hide/show overlay We want to effectively bind the "Windows key" on PC hardware to hide and show the overlay. svn path=/trunk/; revision=120 --- js/ui/main.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/ui/main.js b/js/ui/main.js index 1f390aa41..aef8057fb 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -120,6 +120,15 @@ function start() { overlay = new Overlay.Overlay(); wm = new WindowManager.WindowManager(); + + let display = global.screen.get_display(); + display.connect('overlay-key', function(display) { + if (overlay.visible) { + hide_overlay(); + } else { + show_overlay(); + } + }); } // Used to go into a mode where all keyboard and mouse input goes to