jellyfin / jellyfin-media-player

Jellyfin Desktop Client
GNU General Public License v2.0
3.14k stars 313 forks source link

Leaving fullscreen causes the client to appear on a different monitor #245

Closed Krikea closed 1 year ago

Krikea commented 2 years ago

Describe the bug Opening media, maximizing it, then minimizing it causes the client to appear in a separate monitor.

To Reproduce Steps to reproduce the behavior:

  1. Open media in the client
  2. Click on the fullscreen button
  3. Click it again to leave fullscreen.
  4. See error

Expected behavior Leaving fullscreen returns the client to its previous position.

Desktop

Additional context It's just strange behavior since no other program does this. It's nbd, but a fix would be much appreciated.

BrenekH commented 2 years ago

~I was observing this with versions 1.6.1 and 1.7.0, but with 1.7.1 I am no longer seeing this behavior.~

Edit: The behavior was gone for about a day or two, but I'm now seeing the issue again.

iwalton3 commented 2 years ago

I think that code causing the strange “stuck in fullscreen” issue may have fixed this too then.

Krikea commented 2 years ago

I am using the jellyfin-media-player-git package on the AUR, and I just recompiled. Still seeing the same behavior but only when I fullscreen and then leave fullscreen on my primary (1440p) monitor. When I fullscreen and then leave fullscreen on my secondary (1080p) monitor, it behaves as expected. In other words, when I have two monitors plugged in, leaving fullscreen has caused the program to be on my secondary monitor regardless of which monitor I initially fullscreened on.

If it's helpful, I can also plug in a tertiary monitor and report the behavior.

Xavier-Do commented 1 year ago

A reminder of the explanation I added on a duplicate

It looks like it registers the last screen where it went from windowed to full-screen without being maximized. In other words, when going from maximized to fullscreen the current screen is not registered.

Edit: https://github.com/jellyfin/jellyfin-media-player/commit/85715bb32284eda00afcd79b824dbb20895d8a23 may be a good start to find a solution

This c++ code is to obscure for me.