Technium / fullscreenhack

A preload library that fixes fullscreen flash.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fullscreen hack for Flash Plugin
Author: Alistair Buxton <a.j.buxton@gmail.com>


Why
---

Flash plugin incorrectly determines the fullscreen resolution when 
using nvidia twinview. The result is that fullscreen windows fill 
the primary monitor, but the video gets scaled as if the primary 
monitor had the resolution of the total display area. Even worse,
Flash has a nasty habit of dropping out of fullscreen mode when
you try to do anything on the other monitor.

How
---

The npviewer script loads the hack with LD_PRELOAD and it patches 
the XGetGeometry call which flash uses to determine screen size. 
If XGetGeometry would return the size of the root window, the patch 
causes it to instead return the size of a single monitor.

The monitor sizes sent are now based on Xinerama.

Fullscreen mode is no longer dropped when Flash loses focus by
simply masking out PropertyChange X events, stopping the
behaviour entirely.


Config
------

Edit fullscreenhack.c and change the #defines.

Dependencies
------------

You need 32 bit toolchain if you use 32 bit flash in nspluginwrapper.
sudo apt-get build-dep nspluginwrapper should give you everything you need.

For native plugins you should just need build-essential and libx11-dev.

For 32-bit Flash in ndiswrapper:
--------------------------------

Build it:

make 

Test it:

make test

This runs the tester app with and without the patch to verify that it works.

make fftest

This runs Firefox with the patch enabled so Flash can be tested directly.

Install it:

sudo make install

And then restart your browser.

For native Flash plugin:
------------------------

Build it:

If your OS is 64-bit, edit Makefile and change it to BITS=64 on line 1.

Run make and make test as above.

To use it, you have to run your browser as such:

LD_PRELOAD=/path/to/libfullscreenhack.so firefox

About

A preload library that fixes fullscreen flash.


Languages

Language:C 51.0%Language:Shell 49.0%