File fix-open-browser.patch of Package qmk_hid

From 3d01186a38af74122a54ffe20f5105a8dc223391 Mon Sep 17 00:00:00 2001
From: nkrapp <nico.krapp@suse.com>
Date: Mon, 14 Jul 2025 10:21:02 +0200
Subject: [PATCH] define open_browser_func to open webbrowser

---
 qmk_hid/gui.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/qmk_hid/gui.py b/qmk_hid/gui.py
index b0a5cca..40360a9 100644
--- a/qmk_hid/gui.py
+++ b/qmk_hid/gui.py
@@ -462,5 +462,12 @@ def tk_flash_firmware(devices, releases, version, fw_type):
     disable_devices(devices)
     restart_hint()
 
+def open_browser_func(url):
+    # try to open url in new tab
+    success = webbrowser.open(url=url, new=2)
+    if not success:
+        info_popup("Failed to open webbrowser.")
+        return
+
 if __name__ == "__main__":
     main()
openSUSE Build Service is sponsored by