emacs-eaf / eaf-video-player

Video Player in Emacs
GNU General Public License v3.0
6 stars 2 forks source link

Video not resizing if original Emacs window is small #1

Open nbfields opened 2 years ago

nbfields commented 2 years ago

Describe the bug When viewing a video, said video may be much smaller than desired. This can be somewhat difficult to force to occur, but it appears to happen if the initial Emacs window is small. In that case, the video player will load the video to fill up the initial, small Emacs window's size, but if Emacs is later maximized, the video does not increase in size to fill the entire screen as one might wish. It does not happen if the initial window was large and is then resized to be smaller, then made larger again.

To Reproduce

This is a little hard to make happen, and it doesn't appear to be completely consistent. However, the following seems to cause the error to appear most of the time (the precise steps are done with AwesomeWM and are described as such):

1: Open a new Emacs client in a small window 2: Open a video to see it is small 3: Increase the size of the Emacs window, the video does not increase much to match 4: Close that Emacs, switch to a new AwesomeWM virtual desktop with no windows open, and change tiling settings to something which will make a new window fill up the screen (super-space will do this if there is nothing else open on the virtual desktop. If using a different window manager, some other method may be needed to ensure the next Emacs client is maximized right as it opens) 5: Open a new Emacs instance, ensuring it takes up the entirety of the desktop monitor view 6: Open a video to see it is in full screen as expected

Expected behavior The video would dynamically resize when the size of the Emacs window is changed, regardless of the original size of the Emacs window when it is first opened. Alternatively, buttons to zoom in and out would resolve this by sidestepping the issue.

Versions (please complete the following info):

Screenshots img This screenshot is a bit hideous, but as you can see the video being played (just a couple seconds of capturing my own desktop) is a lot smaller than the image, and surrounded by blackness. This blackness is in fact Emacs, which I enlarged but the video did not also become enlarged.

Additional context Add any other context about the problem here.

manateelazycat commented 2 years ago

Can you test with other DE than AwesomeWM ? I can't reproduce this issue.

nbfields commented 2 years ago

Can you test with other DE than AwesomeWM ? I can't reproduce this issue.

I can confirm that the error happens with the standard Ubuntu window manager as well. I am about to test it with Ubuntu on Wayland. However, I can now be slightly more specific: The error appears to occur if Emacs is not maximized before startup completes. This takes a few seconds for me, perhaps longer for you depending on your customizations, and so you may have had enough time to maximize it before the startup finished. This also explains why it was more apparent for me, because I use Emacs in Daemon mode. The Emacs server is begun right as I start my computer, and so by the time I even open my first Emacs window startup has already occurred - too late to maximize before it starts up now!

Update: Ubuntu on Wayland does experience the same issue.