You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a multi monitor setup, set the main default screen to a monitor that is not the first one (i.e. center screen on a 3 monitors setup).
When creating a window for each monitor, if the screen.frame.X value is <= 0, the windows is not visible because X Location value is miscaculated.
test code:
import time
import webview
from webview.platforms.winforms import BrowserView
def print_views():
time.sleep(1)
for k, v in BrowserView.instances.items():
print(k, v.Location)
for i, screen in enumerate(webview.screens):
print(screen.frame)
webview.create_window(f"Window {i}", screen=screen)
webview.start(print_views)
I'm not sure about windows version here, so more test are needed on other windows versions and maybe monitor setups.
Practicalities
YES I am willing to work on this issue myself, this soft is awesome.
NO I am prepared to support this issue financially, i'm a freelancer.
The text was updated successfully, but these errors were encountered:
cervelas
changed the title
Wrong placement of windows if main screen is not the first one.
Wrong windows location if main screen is not the first one.
Sep 11, 2024
Specification
Description
On a multi monitor setup, set the main default screen to a monitor that is not the first one (i.e. center screen on a 3 monitors setup).
When creating a window for each monitor, if the screen.frame.X value is <= 0, the windows is not visible because X Location value is miscaculated.
test code:
wrong result:
right results:
Fix
The error is in BrowserForm.init() method, X location value is miscaulated, it's working without thoses two lines:
pywebview/webview/platforms/winforms.py
Line 188 in ca10170
pywebview/webview/platforms/winforms.py
Line 189 in ca10170
I'm not sure about windows version here, so more test are needed on other windows versions and maybe monitor setups.
Practicalities
YES I am willing to work on this issue myself, this soft is awesome.
NO I am prepared to support this issue financially, i'm a freelancer.
The text was updated successfully, but these errors were encountered: