i-rinat / freshplayerplugin

ppapi2npapi compatibility layer
MIT License
727 stars 52 forks source link

How do I get fullscreen working? #350

Closed oldpink closed 7 years ago

oldpink commented 7 years ago

I have the Freshplayerplugin installed and working, including with hardware video decoding via the ~/.config/freshwrapper.conf, and performance is as expected on YouTube, but I am unable to get fullscreen working, with this strange extra window on top of Firefox that shows up in a little strip, as you can see from the attached file here: untitled I've tried changing all manner of settings in the freshwrapper.conf, but to no avail. I'm sure that the solution is simple, but I have not the first clue what it is. Can anyone give me any ideas?

i-rinat commented 7 years ago

This window is how fullscreen mode is implemented. I create small window, make it "transient" for browser main window, and then set hints for window manager. Window manager detects those hints and stretches window to fill full screen.

In your case, window manager increased width, but didn't increase height. And also didn't remove window decorations. I don't know why.

What desktop environment do you use?

oldpink commented 7 years ago

I'm using Windowmaker. How do I get it to fix the height issue? Thanks for the response thus far.

i-rinat commented 7 years ago

I tried to install WindowMaker in virtual machine, and can confirm full screen mode doesn't work there. I see the same wide window with small height instead of stretched to full screen.

Most probably, the way fullscreen works in relatively modern window managers was proposed later than WindowMaker was used widely. There has to be some simple way of getting to the fullscreen, compatible with WindowMaker and modern window manager, but I don't know any yet.

How do I get it to fix the height issue?

It has to be fixed in freshplayerplugin, so you can't just change settings to make it work. And I don't know how to fix it yet.

If you know how to make fullscreen windows in WindowMaker, I'd like have an example code. There is also some complications. I can't just stretch window manually. There is a reason to make it 10 by 10 initially. Small window is placed near the mouse pointer. That way window manager expands window on the current monitor, not on monitor 1. I'd like to keep that feature. So there has to be compatible way.

i-rinat commented 7 years ago

Found that if _NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT atoms are not used for _NET_WM_STATE, fullscreen mode is working fine in WindowMaker. I don't remember why those were added, but I'm afraid of changing how that code works. So I just added a configuration file options to control that in decacb25f268e5d8c0d5eab508336171441506a0...963f43ee8f56d76fd16ae45759c383d15a8c5f6d

What you need to do is to take latest version from master branch, and add following lines to ~/.config/freshwrapper.conf:

fullscreen_horz_maximize_atom = 0
fullscreen_vert_maximize_atom = 0
oldpink commented 7 years ago

I'll give it a try. Thanks!

oldpink commented 7 years ago

I did exactly as you said, and it now works perfectly in full screen! The cherry on the sundae is that I'm also getting accelerated video decoding with it, something that the current versions of the NPAPI flashplayer will not do. Thank you so much! I don't know what your release schedule for Freshplayer is, but this revision is a winner.!