From e7143f2242b51f7b8e2d7e687a49b70ed7aee3ac Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 22 May 2022 11:31:20 -0600 Subject: [PATCH] GUI: set modal work-around to Big Sur+ --- gui/gui_help.py | 4 +++- gui/gui_main.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/gui_help.py b/gui/gui_help.py index 5f3aac07f..319255bdd 100644 --- a/gui/gui_help.py +++ b/gui/gui_help.py @@ -1,6 +1,7 @@ import wx import webbrowser from resources import constants +from data import os_data class gui_help_menu: def __init__(self, versions, frame, frame_modal): @@ -18,7 +19,8 @@ class gui_help_menu: else: self.frame_modal.DestroyChildren() self.frame_modal.Close() - self.frame_modal.ShowWithoutActivating() + if self.constants.detected_os >= os_data.os_data.big_sur: + self.frame_modal.ShowWithoutActivating() def help_menu(self, event=None): # Define Menu diff --git a/gui/gui_main.py b/gui/gui_main.py index 05a4ba716..d6b859373 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -117,7 +117,8 @@ class wx_python_gui: # If the previous frame was a modal, the new frame will anchor onto it # instead of the core frame # Calling ShowWithoutActivating() resets the frame position - self.frame_modal.ShowWithoutActivating() + if self.constants.detected_os >= os_data.os_data.big_sur: + self.frame_modal.ShowWithoutActivating() def use_non_metal_alternative(self): if self.constants.detected_os >= os_data.os_data.monterey: