Я создаю приложение Kivy в Windows 10, и я не могу заставить окно Kivy свернуться, щелкнув значок приложения на панели задач, когда для параметра Window.borderless установлено значение 1.
Как заставить окно Kivy свернуться, когда значок приложения на панели задач щелкается, когда граница окна отключена? Я думал об использовании windows api для отслеживания щелчка по значку приложения на панели задач и принудительного сворачивания окна, вызывая метод Window.minimize (), но есть ли более простой способ решить эту проблему?

Вот код, с которым я работаю:
from kivy.core.window import Window
from kivy.app import App
class TestApp(App):
def build(self):
#Q1: When borderless = 1 and the title border is disabled, why can't I minimize the app by clicking the app icon in the taskbar?
#Q2: When borderless = 1 and the title border is disabled, how do I get the app to minimize by clicking the app icon in the taskbar? I was thinking of using some kind of workaround solution
#within windows using windows api that tracks when the task bar icon is clicked and runs the 'Window.minimize() function to force the window to minimize.
Window.borderless = 1 #disable title border
#Window.borderless = 0 #enable title border
if __name__ == '__main__':
TestApp().run()