/*
C++ GTKmm gcompmgr BY BEER necrorising@videotron.ca
Copyright (C) 2005 BEER

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/


################### NEWBIE'S GUIDE TO xcompmgr ################

This is a short how to on installing xcompmgr from cvs and configuring your xorg.conf file 
to support hardware rendering of your desktop display. xcompmgr allows you to add shadows and 
other effects to your desktop in OSX like fashion. 


################## IMPORTANT BUG NOTES ########################
Due to some kind of bug with Gnome and xcompmgr, if you have xcompmgr enabled 
and you click on Actions->Log Out, your window manager will freeze.
You can safely shutdown by opening a terminal, and entering
shutdown 0 -h

Also the application sits in the system tray by default, but the system tray applet icon 
will disappear after xcompmgr is restarted. So you must restart gcompmgr after you either stop 
or restart the xcompmgr server. This will be fixed on future versions. For right now you can 
let it sit in the system tray for transparency settings if you want.

################### xcompmgr INSTALLATION #####################

If you haven't already, fetch xcompmgr from freedesktop.org

cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps login
[No password needed, just press return]
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps co xcompmgr

cd xcompmgr
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig/
./autogen.sh
./configure
make
su
[password]
make install

################### XORG CONFIGURATION #######################

The X configuration file is at /etc/X11/xorg.conf

You must be running either the ATI drivers from ati.com or the nvidia drivers from nvidia.com
The vesa video driver, with no hardware 3d acceleration will not cut it for running xorg compositing.
So if you haven't installed your cards commercial linux drivers, please do so before starting.

##############################################################
# NVIDIA VIDEO CARD GUIDE

Driver WILL be "nvidia", if you have a driver called "nv", that won't cut the mustard,
you must have the "nvidia" driver from nvidia.com to make this work in hardware mode.
"nv" only has 2d acceleration so it is not suitable.

su to root, then open /etc/X11/xorg.conf

##### make sure your module section looks like this

Section "Module"
	Load  "dbe"
	Load  "extmod"
	Load  "fbdevhw"

# CHECK FOR THIS ONE
	Load  "glx"
	Load  "record"
	Load  "freetype"
	Load  "type1"

# CHECK FOR BOTH OF THESE
	Load  "dri"
	Load  "GLcore"
EndSection

##### make sure your Device section looks like this

Section "Device"
	Identifier  "Videocard0"
	Driver      "nvidia"
	VendorName  "Videocard vendor"
	BoardName   "NVIDIA GeForce FX (generic)"

# CHECK FOR BOTH OF THESE
	Option     "RenderAccel" "true"
	Option  "AllowGLXWithComposite" "true"
EndSection

##### add these at the end of the file

Section "Extensions"
        Option "Composite" "Enable"
        Option "RENDER" "true"
        Option "DAMAGE" "true"
EndSection

##############################################################
# ATI VIDEO CARD GUIDE

Driver may be "ati" or "fglrx"

su to root, then open /etc/X11/xorg.conf

Find

Section "Device"
        Identifier      "ATI Technologies, Inc. Radeon Mobility 9000 M9 (R250 Lf)"
        Driver          "ati"
        BusID           "PCI:0:16:0"
        Option          "UseFBDev"              "true"
EndSection


To

Section "Device"
        Identifier      "ATI Technologies, Inc. Radeon Mobility 9000 M9 (R250 Lf)"
        Driver          "ati"
        BusID           "PCI:0:16:0"
        Option          "UseFBDev"              "true"

        Option          "backingstore"          "true"
        Option          "RenderAccel"           "true"
EndSection


and add

Section "Extensions"
        Option "Composite" "Enable"
        Option "RENDER" "true"
        Option "DAMAGE" "true"
EndSection


