noVNC icon indicating copy to clipboard operation
noVNC copied to clipboard

KASM-5652 Fix update loop and get window placement working

Open KodeStar opened this issue 11 months ago • 2 comments

Event added for screenupdated so it can be handled differently to screenregistered, notably the screenPlan doesn't need to be set again when updating (as it is already updated, this may be a bug where a shallow copy is being used and therefore updating the underlying values, but regardless, updating it again results in a loop).

This fixes an issue where, when using auto placement (it's probably not limited to auto placement, but that was the use case that got the bug noticed), if a user is using 3 screen, the middle the main one. Adding an extra monitor adds a new window to the right hand screen, doing it again adds one to the left hand screen. This is all as it should be, but the display manager shows the 3rd monitor on the far right, and dragging it to the correct place doesn't work either.

KodeStar avatar Feb 29 '24 15:02 KodeStar

@KodeStar , everything seems mostly good, however I did find one scenario that breaks things. I have two monitors, my MacBook monitor to the left and an ultrawide monitor to the right. The primary KasmVNC sessions window is on the right screen and only taking up maybe a quarter of the screen. I add a secondary monitor with auto-placement disabled. I place the new windows on the right screen as well, right next to the primary window and then press connect. All is good, but then I move the secondary screen to the MacBook monitor. Native resolution was previously enabled, so by moving from my external monitor to the MacBook monitor causes a resolution change, but things go horribly wrong and weird stuff happens. If you just resize the screen or refresh the page, everything is good again. I suspect that if you move the window, without resizing, from a normal monitor to a high dpi monitor with scaling, it does not follow the full workflow that a resize does.

mmcclaskey avatar Feb 29 '24 16:02 mmcclaskey

Another issue. Create one a second screen with auto placement disabled, then resize it. After the resize the primary screen is being drawn on both screens.

image

mmcclaskey avatar Feb 29 '24 17:02 mmcclaskey