From 74f50933fd4eb3bdb29d9a766b249eb7c88c0bdd Mon Sep 17 00:00:00 2001
From: Julien Wadel <julien.wadel@belledonne-communications.com>
Date: Sun, 5 Jul 2020 11:55:34 +0200
Subject: [PATCH] Avoid to reduce window if it is already maximized

---
 linphone-app/src/app/App.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp
index 199d8c9a..5a50057c 100644
--- a/linphone-app/src/app/App.cpp
+++ b/linphone-app/src/app/App.cpp
@@ -405,7 +405,11 @@ void App::smartShowWindow (QQuickWindow *window) {
   if (!window)
     return;
   window->setVisible(true);
-  window->show();// Force show, maybe redundant with setVisible
+// Force show, maybe redundant with setVisible
+  if(window->visibility() == QWindow::Maximized)// Avoid to change visibility mode
+    window->showMaximized();
+  else
+    window->show();
   window->raise();// Raise ensure to get focus on Mac
   window->requestActivate();
 }
-- 
2.21.0

