Top-Most window + Gnome session timeout support

Reason for change:
1. Sometimes when I watch a movie on YouTube and maximize it, the actual movie window (the one that is now full-screen) is not the active window. For some reason, the original youtube window (from where I maximized the movie) stays active. The full-screen window is put on top of the "active" window though.
2. Gnome session timouts were not supported, so my machine locked itself even when lightsOn was running.

Changes:
1. Added detection of top-most window being full-screen.
2. Added reset of gnome session timeout when active.
3. Most of the changes are actually re-indenting of the code