From 5c1c4ce709783f7c432897b922b300459c73a6e1 Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Fri, 9 Apr 2021 15:53:13 -0400
Subject: [PATCH] calls: make Esc leave fullscreen mode

This removes the escape to leave account creation feature.

Change-Id: Ie83e4b65a7d127a04ed49561cd19bfd12321a5fb
---
 src/mainview/MainView.qml                       | 11 +++++++++++
 src/wizardview/components/CreateAccountPage.qml |  7 -------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/mainview/MainView.qml b/src/mainview/MainView.qml
index 4e678e5a9..9055579db 100644
--- a/src/mainview/MainView.qml
+++ b/src/mainview/MainView.qml
@@ -616,6 +616,8 @@ Rectangle {
         sequence: "F11"
         context: Qt.ApplicationShortcut
         onActivated: {
+            if (JamiQmlUtils.callIsFullscreen)
+                return
             if (containerWindow.visibility !== Window.FullScreen)
                 containerWindow.visibility = Window.FullScreen
             else
@@ -645,6 +647,15 @@ Rectangle {
         onActivated: startWizard()
     }
 
+    Shortcut {
+        sequence: "Escape"
+        context: Qt.ApplicationShortcut
+        onActivated: {
+            if (JamiQmlUtils.callIsFullscreen)
+                callStackView.toggleFullScreen()
+        }
+    }
+
     KeyBoardShortcutTable {
         id: shortcutsTable
     }
diff --git a/src/wizardview/components/CreateAccountPage.qml b/src/wizardview/components/CreateAccountPage.qml
index af6426f82..e3151663c 100644
--- a/src/wizardview/components/CreateAccountPage.qml
+++ b/src/wizardview/components/CreateAccountPage.qml
@@ -59,13 +59,6 @@ Rectangle {
 
     color: JamiTheme.backgroundColor
 
-    Shortcut {
-        context: Qt.ApplicationShortcut
-        sequence: "Esc"
-        enabled: !root.activeFocus
-        onActivated: leavePage()
-    }
-
     onVisibleChanged: {
         if (visible && createAccountStack.currentIndex === 0)
             usernameEdit.focus = true
-- 
GitLab