From 5a7f0cd85f16549a74520c960e749cf8daaa69a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bie=C5=84kowski?= Date: Tue, 14 May 2019 10:29:48 +0200 Subject: [PATCH] Allow to leave workspace-view without selecting window (#525) --- src/Widgets/MultitaskingView.vala | 5 ++++- src/Widgets/WindowCloneContainer.vala | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Widgets/MultitaskingView.vala b/src/Widgets/MultitaskingView.vala index 5f720ced..0c6b0b01 100644 --- a/src/Widgets/MultitaskingView.vala +++ b/src/Widgets/MultitaskingView.vala @@ -363,7 +363,10 @@ namespace Gala break; case Clutter.Key.Return: 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; } diff --git a/src/Widgets/WindowCloneContainer.vala b/src/Widgets/WindowCloneContainer.vala index de0cfb74..dd8eba6c 100644 --- a/src/Widgets/WindowCloneContainer.vala +++ b/src/Widgets/WindowCloneContainer.vala @@ -308,10 +308,14 @@ namespace Gala /** * 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 (); + return true; + } + + return false; } /**