th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.26k stars 485 forks source link

[Bug]: Window gets stuck on phantom display after disconnecting second display #1894

Closed evanwon closed 2 months ago

evanwon commented 6 months ago

Preflight Checklist

YouTube Music (Application) Version

3.5.5

Checklists

What operating system are you using?

Windows

Operating System Version

Windows 10

What CPU architecture are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Reproduction steps

  1. Open th-ch/youtube-music on a machine with multiple monitors connected (e.g. a laptop with an external display)
  2. Move the player window to a secondary window
  3. Exit th-ch/youtube-music
  4. Disconnect the secondary monitor
  5. Re-open th-ch/youtube-music

Expected Behavior

The th-ch/youtube-music player window should be visible on the screen

Actual Behavior

The th-ch/youtube-music player window is not visible on the screen - you can briefly see the animation as the app opens on the now-disconnected display, and it is not possible to move it back to another display.

Enabled plugins

Only the defaults:

  1. In-App Menu
  2. Navigation

Additional Information

No response

JellyBrick commented 6 months ago

https://github.com/th-ch/youtube-music/blob/371805334b0d24568c20db3fae31455b2c99eea1/src/index.ts#L311-L344

I think the logic that prevents offscreen rendering is not working properly. Can you provide the scale and resolution of your displays?

evanwon commented 6 months ago

@JellyBrick

Two external displays, both identical: 2560 x 1440, 100% scale

ChangedUser commented 6 months ago

@evanwon Had the same issue after swapping the display arrangement. By swapping the arrangement I was able to drag and drop the UI onto my fixed desktop and rearrange again.

ArjixWasTaken commented 6 months ago

Is the win + shortcut not enough to bring it back to the left monitor?

ArjixWasTaken commented 6 months ago

https://github.com/th-ch/youtube-music/blob/371805334b0d24568c20db3fae31455b2c99eea1/src/index.ts#L311-L344

I think the logic that prevents offscreen rendering is not working properly. Can you provide the scale and resolution of your displays?

on that note, iirc under wayland you cannot know the position of a window but that doesn't apply here since they said they are using Windows 10

ChangedUser commented 6 months ago

@ArjixWasTaken No, sadly the windows shortcuts did not work.