multitaskingview: Ignore key/scroll-events while closing (#97)

This commit is contained in:
Felipe Escoto 2017-10-04 05:45:40 -05:00 committed by Rico Tzschichholz
parent 981eff8442
commit 692079168b

View File

@ -164,6 +164,9 @@ namespace Gala
*/
public override bool scroll_event (ScrollEvent scroll_event)
{
if (!opened)
return true;
if (scroll_event.direction != ScrollDirection.SMOOTH)
return false;
@ -337,10 +340,12 @@ namespace Gala
*/
public override bool key_press_event (Clutter.KeyEvent event)
{
if (!opened)
return true;
switch (event.keyval) {
case Clutter.Key.Escape:
if (opened)
toggle ();
toggle ();
break;
case Clutter.Key.Down:
select_window (MotionDirection.DOWN);