Allow <Enter> to leave workspace-view without selecting window (#525)

This commit is contained in:
Adam Bieńkowski 2019-05-14 10:29:48 +02:00 committed by Rico Tzschichholz
parent 2a6da29d8b
commit 5a7f0cd85f
2 changed files with 10 additions and 3 deletions

View File

@ -363,7 +363,10 @@ namespace Gala
break; break;
case Clutter.Key.Return: case Clutter.Key.Return:
case Clutter.Key.KP_Enter: case Clutter.Key.KP_Enter:
get_active_workspace_clone ().window_container.activate_selected_window (); if (!get_active_workspace_clone ().window_container.activate_selected_window ()) {
toggle ();
}
break; break;
} }

View File

@ -308,10 +308,14 @@ namespace Gala
/** /**
* Emit the selected signal for the current_window. * Emit the selected signal for the current_window.
*/ */
public void activate_selected_window () public bool activate_selected_window ()
{ {
if (current_window != null) if (current_window != null) {
current_window.selected (); current_window.selected ();
return true;
}
return false;
} }
/** /**