Skip to content

Commit

Permalink
switch to front hack for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Dec 5, 2023
1 parent 8557f5c commit f14dff4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/io_hubs_addon/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ def execute(self, context):
refresh_scene_viewer()

web_driver.switch_to.window(web_driver.current_window_handle)

# In some systems switch_to doesn't work, the code below is a hack to make it work
# for the affected platforms/browsers that we have detected so far.
browser = get_addon_pref(context).browser
if browser == "Firefox":
import platform
if browser == "Firefox" or platform.system == "Windows":
ws = web_driver.get_window_size()
web_driver.minimize_window()
web_driver.set_window_size(ws['width'], ws['height'])
Expand Down

0 comments on commit f14dff4

Please sign in to comment.