diff options
author | (no author) <(no author)@4d9a9b59-111c-4e0b-8f7a-7640551abb98> | 2009-03-16 07:55:01 +0000 |
---|---|---|
committer | (no author) <(no author)@4d9a9b59-111c-4e0b-8f7a-7640551abb98> | 2009-03-16 07:55:01 +0000 |
commit | f1e95daae05c57d935b00e611c624c5e75cd21ec (patch) | |
tree | 4065ab51d9e64882d9001a59ede7d9a4e372a4a6 /x11-wm/compiz/files |
uploading my overlay ), initial commit
git-svn-id: http://172.18.13.13/svn/sss_overlay@1 4d9a9b59-111c-4e0b-8f7a-7640551abb98
Diffstat (limited to 'x11-wm/compiz/files')
-rw-r--r-- | x11-wm/compiz/files/compiz-0.7.8-framesvg.patch | 77 | ||||
-rw-r--r-- | x11-wm/compiz/files/compiz-0.7.8-metacity-2.25.patch | 46 | ||||
-rw-r--r-- | x11-wm/compiz/files/compiz-drop-xcb.patch | 50 | ||||
-rw-r--r-- | x11-wm/compiz/files/compiz-manager | 384 | ||||
-rw-r--r-- | x11-wm/compiz/files/compiz-no-gconf.patch | 20 | ||||
-rw-r--r-- | x11-wm/compiz/files/compiz-start | 41 |
6 files changed, 618 insertions, 0 deletions
diff --git a/x11-wm/compiz/files/compiz-0.7.8-framesvg.patch b/x11-wm/compiz/files/compiz-0.7.8-framesvg.patch new file mode 100644 index 0000000..a3eb303 --- /dev/null +++ b/x11-wm/compiz/files/compiz-0.7.8-framesvg.patch @@ -0,0 +1,77 @@ +diff -p -up compiz-0.7.8/configure.ac.framesvg compiz-0.7.8/configure.ac +--- compiz-0.7.8/configure.ac.framesvg 2008-11-20 15:58:43.000000000 +0100 ++++ compiz-0.7.8/configure.ac 2008-11-20 16:34:25.000000000 +0100 +@@ -487,7 +487,7 @@ if test "x$use_kde4" = "xyes"; then + kde4libs=`kde4-config --install lib --expandvars 2>/dev/null` + kde4incs=`kde4-config --install include --expandvars 2>/dev/null` + +- kde4_test_includes="kdecoration.h kcommondecoration.h kdecorationbridge.h plasma/panelsvg.h" ++ kde4_test_includes="kdecoration.h kcommondecoration.h kdecorationbridge.h plasma/framesvg.h" + + dnl Check for KWin headers + AC_MSG_CHECKING([for KWin headers]) +diff -p -up compiz-0.7.8/kde/window-decorator-kde4/switcher.cpp.framesvg compiz-0.7.8/kde/window-decorator-kde4/switcher.cpp +--- compiz-0.7.8/kde/window-decorator-kde4/switcher.cpp.framesvg 2008-08-08 13:20:31.000000000 +0200 ++++ compiz-0.7.8/kde/window-decorator-kde4/switcher.cpp 2008-11-20 16:38:10.000000000 +0100 +@@ -30,7 +30,7 @@ + + #include <fixx11h.h> + +-#include <KDE/Plasma/PanelSvg> ++#include <KDE/Plasma/FrameSvg> + #include <KDE/Plasma/Theme> + + #include <kwindowsystem.h> +@@ -46,9 +46,9 @@ mId (id) + QColor color; + color = Plasma::Theme::defaultTheme ()->color (Plasma::Theme::TextColor); + +- mBackground = new Plasma::PanelSvg(); ++ mBackground = new Plasma::FrameSvg(); + mBackground->setImagePath ("dialogs/background"); +- mBackground->setEnabledBorders(Plasma::PanelSvg::AllBorders); ++ mBackground->setEnabledBorders(Plasma::FrameSvg::AllBorders); + + mBorder.left = mBackground->marginSize(Plasma::LeftMargin); + mBorder.right = mBackground->marginSize(Plasma::RightMargin); +@@ -131,8 +131,8 @@ KWD::Switcher::redrawPixmap () + p.setCompositionMode (QPainter::CompositionMode_Source); + p.setRenderHint (QPainter::SmoothPixmapTransform); + +- mBackground->resizePanel (QSizeF (contentWidth, contentHeight)); +- mBackground->paintPanel (&p, QRect (0, 0, contentWidth, ++ mBackground->resizeFrame (QSizeF (contentWidth, contentHeight)); ++ mBackground->paintFrame (&p, QRect (0, 0, contentWidth, + contentHeight)); + + mBackgroundPixmap = mPixmap.copy (mBorder.left, mBorder.top, +@@ -168,7 +168,7 @@ KWD::Switcher::update () + p.setCompositionMode (QPainter::CompositionMode_Source); + + +- mBackground->paintPanel (&p, QRect (mBorder.left, mBorder.top + ++ mBackground->paintFrame (&p, QRect (mBorder.left, mBorder.top + + mGeometry.height () + 5, mGeometry.width (), + fm.height ())); + +diff -p -up compiz-0.7.8/kde/window-decorator-kde4/switcher.h.framesvg compiz-0.7.8/kde/window-decorator-kde4/switcher.h +--- compiz-0.7.8/kde/window-decorator-kde4/switcher.h.framesvg 2008-08-08 13:20:31.000000000 +0200 ++++ compiz-0.7.8/kde/window-decorator-kde4/switcher.h 2008-11-20 16:36:22.000000000 +0100 +@@ -30,7 +30,7 @@ + + namespace Plasma + { +-class PanelSvg; ++class FrameSvg; + } + + class QSpacerItem; +@@ -70,7 +70,7 @@ class Switcher + + QRect mGeometry; + +- Plasma::PanelSvg *mBackground; ++ Plasma::FrameSvg *mBackground; + QPixmap mPixmap; + QPixmap mBackgroundPixmap; + diff --git a/x11-wm/compiz/files/compiz-0.7.8-metacity-2.25.patch b/x11-wm/compiz/files/compiz-0.7.8-metacity-2.25.patch new file mode 100644 index 0000000..676181f --- /dev/null +++ b/x11-wm/compiz/files/compiz-0.7.8-metacity-2.25.patch @@ -0,0 +1,46 @@ +From: Christopher Williams <crdlb@compiz-fusion.org> +Date: Wed, 11 Feb 2009 08:23:11 +0000 (+0100) +Subject: Fix compatibility with newer libmetacity-private versions. GtkStyle is colormap speci... +X-Git-Url: http://gitweb.compiz-fusion.org/?p=compiz%2Fcore;a=commitdiff_plain;h=27cc9c5178921ce6d6266f4b00303913163be7ee + +Fix compatibility with newer libmetacity-private versions. GtkStyle is colormap specific, so we can't use a new colormap each time we create a pixmap. +--- + +diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c +index dd7ee68..91f676c 100644 +--- a/gtk/window-decorator/gtk-window-decorator.c ++++ b/gtk/window-decorator/gtk-window-decorator.c +@@ -673,32 +673,10 @@ static GdkPixmap * + create_pixmap (int w, + int h) + { +- GdkPixmap *pixmap; +- GdkVisual *visual; +- GdkColormap *colormap; +- +- visual = gdk_visual_get_best_with_depth (32); +- if (!visual) +- return NULL; +- + if (w == 0 || h ==0) + abort (); + +- pixmap = gdk_pixmap_new (NULL, w, h, 32); +- if (!pixmap) +- return NULL; +- +- colormap = gdk_colormap_new (visual, FALSE); +- if (!colormap) +- { +- g_object_unref (G_OBJECT (pixmap)); +- return NULL; +- } +- +- gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), colormap); +- g_object_unref (G_OBJECT (colormap)); +- +- return pixmap; ++ return gdk_pixmap_new (GDK_DRAWABLE (style_window->window), w, h, 32); + } + + #define CORNER_TOPLEFT (1 << 0) diff --git a/x11-wm/compiz/files/compiz-drop-xcb.patch b/x11-wm/compiz/files/compiz-drop-xcb.patch new file mode 100644 index 0000000..244948c --- /dev/null +++ b/x11-wm/compiz/files/compiz-drop-xcb.patch @@ -0,0 +1,50 @@ +diff --git a/configure.ac b/configure.ac +index 8a45698..d82e5f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -118,8 +118,7 @@ AC_SUBST(imagedir) + metadatadir=$datadir/compiz + AC_SUBST(metadatadir) + +-COMPIZ_REQUIRES="x11-xcb \ +- xcomposite \ ++COMPIZ_REQUIRES="xcomposite \ + xfixes \ + xdamage \ + xrandr \ +diff --git a/include/compiz-core.h b/include/compiz-core.h +index ade40c5..47cac9c 100644 +--- a/include/compiz-core.h ++++ b/include/compiz-core.h +@@ -33,7 +33,7 @@ + #include <stdio.h> + #include <sys/time.h> + +-#include <X11/Xlib-xcb.h> ++#include <X11/Xlib.h> + #include <X11/Xutil.h> + #include <X11/extensions/Xdamage.h> + #include <X11/extensions/Xcomposite.h> +@@ -716,8 +716,6 @@ typedef void (*FiniPluginForDisplayProc) (CompPlugin *plugin, + struct _CompDisplay { + CompObject object; + +- xcb_connection_t *connection; +- + Display *display; + CompScreen *screens; + +diff --git a/include/compiz.h b/include/compiz.h +diff --git a/src/display.c b/src/display.c +index 57cd520..9d9a3e1 100644 +--- a/src/display.c ++++ b/src/display.c +@@ -2064,8 +2064,6 @@ addDisplay (const char *name) + return FALSE; + } + +- d->connection = XGetXCBConnection (dpy); +- + if (!compInitDisplayOptionsFromMetadata (d, + &coreMetadata, + coreDisplayOptionInfo, diff --git a/x11-wm/compiz/files/compiz-manager b/x11-wm/compiz/files/compiz-manager new file mode 100644 index 0000000..3fbae21 --- /dev/null +++ b/x11-wm/compiz/files/compiz-manager @@ -0,0 +1,384 @@ +#!/bin/sh +# Compiz Manager wrapper script +# +# Copyright (c) 2007 Kristian Lyngstøl <kristian@bohemians.org> +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA +# +# +# Contributions by: Treviño (3v1n0) <trevi55@gmail.com>, Ubuntu Packages +# +# Much of this code is based on Beryl code, also licensed under the GPL. +# This script will detect what options we need to pass to compiz to get it +# started, and start a default plugin and possibly window decorator. +# + + +COMPIZ_BIN_PATH="/usr/bin/" # For window decorators and compiz +PLUGIN_PATH="/usr/lib/compiz/" +GLXINFO="/usr/bin/glxinfo" +KWIN="/usr/bin/kwin" +METACITY="/usr/bin/metacity" +COMPIZ_NAME="compiz" # Final name for compiz (compiz.real) + +# For Xgl LD_PRELOAD +LIBGL_NVIDIA="/usr/lib/nvidia/libGL.so.1.2.xlibmesa" +LIBGL_FGLRX="/usr/lib/fglrx/libGL.so.1.2.xlibmesa" + +# Minimum amount of memory (in kilo bytes) that nVidia cards need +# to be allowed to start +# Set to 262144 to require 256MB +NVIDIA_MEMORY="65536" # 64MB +NVIDIA_SETTINGS="nvidia-settings" # Assume it's in the path by default + +# For detecting what driver is in use, the + is for one or more /'s +XORG_DRIVER_PATH="/usr/lib/xorg/modules/drivers/+" + +FALLBACKWM="${METACITY}" +FALLBACKWM_OPTIONS="--replace $@" + +# Driver whitelist +WHITELIST="nvidia intel ati radeon i810" + +# blacklist based on the pci ids +# See http://wiki.compiz-fusion.org/Hardware/Blacklist for details +T=" 1002:5954 1002:5854 1002:5955" # ati rs480 +T="$T 1002:4153" # ATI Rv350 +T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965 +BLACKLIST_PCIIDS="$T" +unset T + +COMPIZ_OPTIONS="--ignore-desktop-hints --replace" +COMPIZ_PLUGINS="" +ENV="" + +# Use emerald by default if it exist +USE_EMERALD="yes" + +# No indirect by default +INDIRECT="no" + +# Default X.org log if xset q doesn't reveal it +XORG_DEFAULT_LOG="/var/log/Xorg.0.log" + +# Set to yes to enable verbose +VERBOSE="yes" + +# Echos the arguments if verbose +verbose() +{ + if [ "x$VERBOSE" = "xyes" ]; then + printf "$*" + fi +} + +# abort script and run fallback windowmanager +abort_with_fallback_wm() +{ + if [ "x$SKIP_CHECKS" = "xyes" ]; then + verbose "SKIP_CHECKS is yes, so continuing despite problems.\n" + return 0; + fi + + verbose "aborting and using fallback: $FALLBACKWM \n" + + if [ -x $FALLBACKWM ]; then + exec $FALLBACKWM $FALLBACKWM_OPTIONS + else + printf "no $FALLBACKWM found, exiting\n" + exit 1 + fi +} + +# Check for non power of two texture support +check_npot_texture() +{ + verbose "Checking for non power of two support: " + if glxinfo 2> /dev/null | egrep -q '(GL_ARB_texture_non_power_of_two|GL_NV_texture_rectangle|GL_EXT_texture_rectangle|GL_ARB_texture_rectangle)' ; then + verbose "present. \n"; + return 0; + else + verbose "Not present. \n" + return 1; + fi + +} + +# Check for presence of FBConfig +check_fbconfig() +{ + verbose "Checking for FBConfig: " + if [ "$INDIRECT" = "yes" ]; then + $GLXINFO -i | grep -q GLX.*fbconfig + FB=$? + else + $GLXINFO | grep -q GLX.*fbconfig + FB=$? + fi + + if [ $FB = "0" ]; then + unset FB + verbose "present. \n" + return 0; + else + unset FB + verbose "not present. \n" + return 1; + fi +} + + +# Check for TFP +check_tfp() +{ + verbose "Checking for texture_from_pixmap: " + if [ $($GLXINFO 2>/dev/null | grep GLX_EXT_texture_from_pixmap -c) -gt 2 ] ; then + verbose "present. \n" + return 0; + else + verbose "not present. \n" + if [ "$INDIRECT" = "yes" ]; then + unset LIBGL_ALWAYS_INDIRECT + INDIRECT="no" + return 1; + else + verbose "Trying again with indirect rendering:\n"; + INDIRECT="yes" + export LIBGL_ALWAYS_INDIRECT=1 + check_tfp; + return $? + fi + fi +} + +# Check wether the composite extension is present +check_composite() +{ + verbose "Checking for Composite extension: " + if xdpyinfo -queryExtensions | grep -q Composite ; then + verbose "present. \n"; + return 0; + else + verbose "not present. \n"; + return 1; + fi +} + +# Detects if Xgl is running +check_xgl() +{ + verbose "Checking for Xgl: " + if xvinfo | grep -q Xgl ; then + verbose "present. \n" + return 0; + else + verbose "not present. \n" + return 1; + fi +} + +# Check if the nVidia card has enough video ram to make sense +check_nvidia_memory() +{ + MEM=$(${NVIDIA_SETTINGS} -q VideoRam | egrep Attribute\ \'VideoRam\'\ .*: | cut -d: -f3 | sed 's/[^0-9]//g') + if [ $MEM -lt $NVIDIA_MEMORY ]; then + verbose "Less than ${NVIDIA_MEMORY}kb of memory and nVidia"; + return 1; + fi + return 0; +} + +# Check for existence if NV-GLX +check_nvidia() +{ + if [ ! -z $NVIDIA_INTERNAL_TEST ]; then + return $NVIDIA_INTERNAL_TEST; + fi + verbose "Checking for nVidia: " + if xdpyinfo | grep -q NV-GLX ; then + verbose "present. \n" + NVIDIA_INTERNAL_TEST=0 + return 0; + else + verbose "not present. \n" + NVIDIA_INTERNAL_TEST=1 + return 1; + fi +} + +# Check if the max texture size is large enough compared to the resolution +check_texture_size() +{ + TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed 's/.*=[^0-9]//g') + RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//') + VRES=$(echo $RESOLUTION | sed 's/.*x//') + HRES=$(echo $RESOLUTION | sed 's/x.*//') + verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): "; + if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then + verbose "Failed.\n" + return 1; + fi + verbose "Passed.\n" + return 0 +} + +# check driver whitelist +running_under_whitelisted_driver() +{ + LOG=$(xset q|grep "Log file"|awk '{print $3}') + if [ "$LOG" = "" ]; then + verbose "xset q doesn't reveal the location of the log file. Using fallback $XORG_DEFAULT_LOG \n" + LOG=$XORG_DEFAULT_LOG; + fi + if [ -z "$LOG" ];then + verbose "AIEEEEH, no Log file found \n" + verbose "$(xset q) \n" + return 0 + fi + for DRV in ${WHITELIST}; do + if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG && + ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG; + then + return 0 + fi + done + verbose "No whitelisted driver found\n" + return 1 +} + +# check pciid blacklist +have_blacklisted_pciid() +{ + OUTPUT=$(lspci -n) + for ID in ${BLACKLIST_PCIIDS}; do + if echo "$OUTPUT" | egrep -q "$ID"; then + verbose "Blacklisted PCIID '$ID' found \n" + return 0 + fi + done + OUTPUT=$(lspci -vn | grep -i VGA) + verbose "Detected PCI ID for VGA: $OUTPUT\n" + return 1 +} + +build_env() +{ + if check_nvidia; then + ENV="__GL_YIELD=NOTHING " + fi + if [ "$INDIRECT" = "yes" ]; then + ENV="$ENV LIBGL_ALWAYS_INDIRECT=1 " + fi + if check_xgl; then + if [ -f ${LIBGL_NVIDIA} ]; then + ENV="$ENV LD_PRELOAD=${LIBGL_NVIDIA}" + verbose "Enabling Xgl with nVidia drivers...\n" + fi + if [ -f ${LIBGL_FGLRX} ]; then + ENV="$ENV LD_PRELOAD=${LIBGL_FGLRX}" + verbose "Enabling Xgl with fglrx ATi drivers...\n" + fi + fi + + ENV="$ENV FROM_WRAPPER=yes" + + if [ -n "$ENV" ]; then + export $ENV + fi +} + +build_args() +{ + if [ $INDIRECT = "yes" ]; then + COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering " + fi + if check_nvidia; then + COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding" + fi +} + +#################### +# Execution begins here. + +# Read configuration from XDG paths +if [ -z "$XDG_CONFIG_DIRS" ]; then + test -f /etc/xdg/compiz/compiz-manager && . /etc/xdg/compiz/compiz-manager +else + test -f $XDG_CONFIG_DIRS/compiz/compiz-manager && . $XDG_CONFIG_DIRS/compiz/compiz-manager +fi + +if [ -z "$XDG_CONFIG_HOME" ]; then + test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager +else + test -f $XDG_CONFIG_HOME/compiz/compiz-manager && . $XDG_CONFIG_HOME/compiz/compiz-manager +fi + +# Don't use compiz when running the failsafe session +if [ "x$GNOME_DESKTOP_SESSION_ID" = "xFailsafe" ]; then + abort_with_fallback_wm +fi + +if [ "x$LIBGL_ALWAYS_INDIRECT" = "x1" ]; then + INDIRECT="yes"; +fi + +# if we run under Xgl, we can skip some tests here +if ! check_xgl; then + # if vesa or vga are in use, do not even try glxinfo (LP#119341) + if ! running_under_whitelisted_driver || have_blacklisted_pciid; then + abort_with_fallback_wm + fi + # check if we have the required bits to run compiz and if not, + # fallback + if ! check_tfp || ! check_npot_texture || ! check_composite || ! check_texture_size; then + abort_with_fallback_wm + fi + + if check_nvidia && ! check_nvidia_memory; then + abort_with_fallback_wm + fi + + if ! check_fbconfig; then + abort_with_fallback_wm + fi +fi + +# load the ccp plugin if present and fallback to plain gconf if not +if [ -f ${PLUGIN_PATH}libccp.so ]; then + COMPIZ_PLUGINS="$COMPIZ_PLUGINS ccp" +elif [ -f ${PLUGIN_PATH}libgconf.so ]; then + COMPIZ_PLUGINS="$COMPIZ_PLUGINS glib gconf" +fi + +# get environment +build_env +build_args + +# start the gtk-window-decorator if present +if [ -x ${COMPIZ_BIN_PATH}emerald ] && [ "$USE_EMERALD" = "yes" ]; then + verbose "Starting emerald\n" + ${COMPIZ_BIN_PATH}emerald --replace & +elif [ -x ${COMPIZ_BIN_PATH}gtk-window-decorator ] && [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then + verbose "Starting gtk-window-decorator\n" + ${COMPIZ_BIN_PATH}gtk-window-decorator --replace & +elif [ -x ${COMPIZ_BIN_PATH}kde-window-decorator ] && [ -n "$KDE_FULL_SESSION" ]; then + verbose "Starting kde-window-decorator\n" + ${COMPIZ_BIN_PATH}kde-window-decorator --replace & + FALLBACKWM="${KWIN}" +fi + +${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS + diff --git a/x11-wm/compiz/files/compiz-no-gconf.patch b/x11-wm/compiz/files/compiz-no-gconf.patch new file mode 100644 index 0000000..d43e84d --- /dev/null +++ b/x11-wm/compiz/files/compiz-no-gconf.patch @@ -0,0 +1,20 @@ + configure.ac | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7b09153..9c22ea0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -192,10 +192,10 @@ if test "x$use_gconf" = "xyes"; then + if test x"$GCONFTOOL" = xno; then + AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) + fi ++else ++ AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test "x$use_gconf" = "xyes") + fi + +-AM_GCONF_SOURCE_2 +- + AM_CONDITIONAL(USE_GCONF, test "x$use_gconf" = "xyes") + if test "$use_gconf" = yes; then + AC_DEFINE(USE_GCONF, 1, [Build gconf plugin]) diff --git a/x11-wm/compiz/files/compiz-start b/x11-wm/compiz/files/compiz-start new file mode 100644 index 0000000..161068b --- /dev/null +++ b/x11-wm/compiz/files/compiz-start @@ -0,0 +1,41 @@ +# compiz-start script +# +# hacky autodetection of neccessary options for XGL/AIGLX/NVIDIA +# +# Hanno Boeck, http://www.hboeck.de/ +# +# Licensed under the same conditions as compiz itself (MIT or GPL) + +if [ ! -x /usr/bin/glxinfo ]; then + echo "glxinfo not found, please install mesa-progs." + exit -1 +fi + +GLX_WITH_DIRECT=`glxinfo|grep -c GLX_EXT_texture_from_pixmap` +GLX_WITH_INDIRECT=`LIBGL_ALWAYS_INDIRECT=1 glxinfo|grep -c GLX_EXT_texture_from_pixmap` +GLX_RENDER=`glxinfo|grep -c "OpenGL renderer string: Mesa GLX Indirect"` + + +COMPIZ_OPTIONS="--replace" + +if [ $GLX_WITH_DIRECT -eq 3 ]; then + if [ $GLX_RENDER -eq 0 ]; then + echo NVIDA detected + export __GL_YIELD="NOTHING" + else + echo XGL detected + fi +elif [ $GLX_WITH_INDIRECT -eq 3 ]; then + echo AIGLX detected + export LIBGL_ALWAYS_INDIRECT=1 +fi + +if [ ! -z $KDE_FULL_SESSION ] && [ -x /usr/bin/kde-window-decorator ]; then + echo Using KDE decorator + kde-window-decorator --replace & +else + echo Using GTK decorator + gtk-window-decorator --replace & +fi + +compiz $COMPIZ_OPTIONS gconf move resize minimize place decoration wobbly fade cube rotate scale switcher zoom dbus |