LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.52k stars 67 forks source link

Bug: Webview Multimonitor Behaviour #245

Open jbeardon opened 1 year ago

jbeardon commented 1 year ago

Running 3 monitors - Windows 11 - All updates Main, centre monitor is Display Port, side monitors HDMI

If monitors sleep/turned off via HA/HASS.Agent automation, it's a lottery as to where the web-view pop-up will appear (i.e. it is rarely on the primary monitor where the taskbar containing the HASS.Agent tray icon.

Opening HASS.Agent and previewing webview positions the window correctly but this has no effect on the actual webview popup.

The only work-round is to restart HASS.Agent

To Reproduce Let the monitors sleep or change state of monitors via automation. Webview rarely loads on the main monitor Expected behavior Webview should open on the primary monitor where the HASS.Agent tray icon is located.

Misc info (please complete the following information):

image

Please check what's applicable (multiple answers possible):

crossan007 commented 1 year ago

Adding to this: the WebView seems to remember which "Virtual Desktop" it was last opened on if "Keep page loaded in the background" is checked, and will cause the Virtual Desktop Switcher to go to that desktop anytime the tray icon is right-clicked.

Without "Keep page loaded in the background" checked, the WebView loads on the current virtual desktop, but I have to log in again every single time I open it.