Use idle handler for overlay key binding
Running into odd problems with the overlay/windows key breaking, hopefully this will work around those. svn path=/trunk/; revision=121
This commit is contained in:
parent
b1da771d32
commit
bd53366247
@ -3,6 +3,7 @@
|
|||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
const Mainloop = imports.mainloop;
|
||||||
const Tweener = imports.tweener.tweener;
|
const Tweener = imports.tweener.tweener;
|
||||||
|
|
||||||
const Panel = imports.ui.panel;
|
const Panel = imports.ui.panel;
|
||||||
@ -123,11 +124,16 @@ function start() {
|
|||||||
|
|
||||||
let display = global.screen.get_display();
|
let display = global.screen.get_display();
|
||||||
display.connect('overlay-key', function(display) {
|
display.connect('overlay-key', function(display) {
|
||||||
if (overlay.visible) {
|
// Queue an idle for this, because we're getting called
|
||||||
hide_overlay();
|
// out of a metacity event handler, and doing a lot of
|
||||||
} else {
|
// work from inside there is...iffy.
|
||||||
show_overlay();
|
Mainloop.idle_add(function () {
|
||||||
}
|
if (overlay.visible) {
|
||||||
|
hide_overlay();
|
||||||
|
} else {
|
||||||
|
show_overlay();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user