Re: Compiz Fusion?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/2/07, Alphonse Van Assche <alcapcom@xxxxxxxxx> wrote:
Peter Gordon a écrit :
> On Sun, 2007-07-01 at 13:56 +0200, Alphonse Van Assche wrote:
>> To make this working compiz need to use texture copy instead of
>> texture_from_pixmap method[1] (because of the fact the fglrx driver
>> don't have support for texture_from_pixmap). That functionality can be
>> ported from beryl. Maybe a little patch to compiz must applied too[2]
>
> Maybe; but adding hacks to workaround a known-broken piece of
> proprietary software instead of getting the recent R300/Avivo drivers
> working properly for AIGLX seems entirely like a step backwards to me...
>
Well, I have just saying this to let know that the fglrx driver *cannot*
be used with AIGLX without the above hacks and at this time we don't
have Xgl in Fedora so in my eyes a choice must be done. Using XGL as a
temporary hack or making temporary hacks to let users use compiz with
AIGLX. If we don't do one of them, then we forgot a big part of the
Fedora users.

does that mean its working? or is it not? or is it working after patching?


Yes, ATI driver suck for many reasons proprietary/not intensive
developed/etc... but many people have such cards and saying that we
don't care about it is just saying we don't care about a big part of our
users, I think that's not good for Fedora.

In my place, ATi users are more than NVidia users, its a pain when
trying to promote Fedora to them .. and with fglrx is broken in F7  ..
I have no idea what to answer if they asked ..

I'm personally sure that many
people have switch to GNU/Linux these last year just to have a wobbly
desktop with all these eye candy stuffs. I like eye candy as a awesome
propaganda piece for the GNU/Linux desktops too.

+1. the Wow factor...


Just my 2 cent of the day.
Alphonse


back to topic ,

I just rewrote desktop-effects in .py to make use compizconfig-python ..

attached them together with this email ..


--
-----------------------------------------------
regards
Hikaru
-----------------------------------------------
Mohd Izhar Firdaus Bin Ismail
Amano Hikaru
天野晃 「あまの ひかる」
mohd.izhar.firdaus@xxxxxxxxx
-----------------------------------------------
kagesenshi.87@xxxxxxxxx
Blog: http://kagesenshi.blogspot.com
http://fedoraproject.org/wiki/MohdIzharFirdaus
-----------------------------------------------

Attachment: desktop-effects.glade
Description: application/glade

#!/usr/bin/env python
# Re implementation of desktop-effects in pyglade
# and compizconfig-python
# Author(s): KageSenshi
#
# TODO
# get Timeout working with the timeout_dialog
# create an error dialog when compiz failed to start

import gtk
import gtk.glade
import sys
import gconf
from os import system,path
import compizconfig
from subprocess import Popen
from commands import getoutput
from time import sleep

context=compizconfig.Context()
context.Read()
WINDOW_MANAGER_KEY='/apps/gnome-session/rh/window_manager'
decorator='gtk-window-decorator --replace'

# xml = gtk.glade.XML("/usr/share/compiz/desktop-effects.glade")
xml = gtk.glade.XML("desktop-effects.glade")

################### Compiz Launcher #######################
### codes borrowed*cough*stolen*cough* from fusion-icon ###
# Author(s): crdlb

def env_intel():
    if not getoutput('xvinfo 2>/dev/null|grep Intel') == '':
        print '* intel found, exporting: INTEL_BATCH=1'
        return 'INTEL_BATCH=1 '
    else: return ''

def is_always_indirect():
    if int(getoutput('glxinfo 2>/dev/null | grep GLX_EXT_texture_from_pixmap -c')) < 3:
        if int(getoutput('LIBGL_ALWAYS_INDIRECT=1 glxinfo 2>/dev/null | grep GLX_EXT_texture_from_pixmap -c')) == 3:
           return True

def env_indirect():
    if is_always_indirect():
        print '* No GLX_EXT_texture_from_pixmap present with direct rendering context'
        print '... present with indirect rendering, exporting: LIBGL_ALWAYS_INDIRECT=1'
        return 'LIBGL_ALWAYS_INDIRECT=1 '
    else: return ''

def env_fglrx():    
    if path.exists('/usr/lib/fglrx/libGL.so.1.2.xlibmesa'):
        print '* fglrx found, exporting: LD_PRELOAD=/usr/lib/fglrx/libGL.so.1.2.xlibmesa'
        return 'LD_PRELOAD=/usr/lib/fglrx/libGL.so.1.2.xlibmesa '
    else: return ''
    
def env_nvidia():
    if not getoutput('xdpyinfo 2>/dev/null|grep NV-GLX') == '':
        print '* nvidia found, exporting: __GL_YIELD=nothing '
        return '__GL_YIELD=nothing '
    else: return ''

def get_env():
    return env_intel() + env_indirect() + env_fglrx() + env_nvidia()

def start_compiz():
    # Get Env Variables                                                                
    env_variables = get_env()
    # Start Compiz WM
    system('killall gtk-window-decorator kde-window-decorator emerald')
    decoplugin=context.Plugins['decoration']
    if not decoplugin.Enabled:
        context.ProcessEvents()
        decoplugin.Enabled = True
        context.Write()
    #sleep(2)
    
    direct_rendering = ""
    if system('pgrep Xgl') == 0: direct_rendering="--direct-rendering"
    run_compiz = env_variables + 'compiz --replace --sm-disable --ignore-desktop-hints ccp ' + direct_rendering
    print run_compiz
    Popen(decorator,shell=True)
    return Popen(run_compiz, shell=True)
    
############################# EOF Borrowed Code #############################

def start_metacity():
    run_wm = 'metacity --replace'
    Popen(run_wm, shell=True)

def cancel_compiz(widget):
    start_metacity()
    gconfclient.set_string(WINDOW_MANAGER_KEY,'metacity')
    timeout_dialog.hide()

def save_settings(widget):
    gconfclient.set_string(WINDOW_MANAGER_KEY,'compiz')
    timeout_dialog.hide()

def on_timeout_dialog_close(widget,arg2):
    widget.hide()
    print arg2
    return True

def gtk_main_quit(widget):
    sys.exit(0)

def on_cube_checkbox_toggled(widget):
    context.Read()
    context.ProcessEvents()
    if cube_checkbox.get_active():
       context.Plugins['cube'].Enabled = True
       context.Plugins['rotate'].Enabled = True
    else:
       context.Plugins['rotate'].Enabled = False
       context.Plugins['cube'].Enabled = False 
       # Bug?. For some reasons, cube is still loaded
    context.Write()

def on_enable_togglebutton_toggled(widget):
    
    print widget.get_active()
    if widget.get_active() == False:
       if system('pgrep compiz') == 0:
          start_metacity()
       if gconfclient.get_string(WINDOW_MANAGER_KEY) == 'compiz': 
          gconfclient.set_string(WINDOW_MANAGER_KEY,'metacity')
       wobble_checkbox.set_sensitive(False)
       cube_checkbox.set_sensitive(False)
    else:
       wobble_checkbox.set_sensitive(True)
       cube_checkbox.set_sensitive(True)
       process = start_compiz()
       procpoll = None
       for i in range(0,5):
           sleep(1)
           procpoll = process.poll()
       if not procpoll:
           timeout_dialog.show()
       else:
           print 'Cant start compiz'

def on_wobble_checkbox_toggled(widget):
    context.Read()
    context.ProcessEvents()
    if wobble_checkbox.get_active(): context.Plugins['wobbly'].Enabled = True
    else: context.Plugins['wobbly'].Enabled = False
    context.Write()

# main 

enable_togglebutton = xml.get_widget('enable_togglebutton')
cube_checkbox = xml.get_widget('cube_checkbox')
wobble_checkbox = xml.get_widget('wobble_checkbox')
timeout_dialog = xml.get_widget('timeout_dialog')


gconfclient = gconf.client_get_default ()
startup_enabled=False

if gconfclient.get_string(WINDOW_MANAGER_KEY) == 'compiz':
   startup_enabled = True


if not startup_enabled:
   enable_togglebutton.set_active(False)
   cube_checkbox.set_sensitive(False)
   wobble_checkbox.set_sensitive(False)
else:
   enable_togglebutton.set_active(True)

if context.Plugins['rotate'].Enabled && context.Plugins['cube'].Enabled: cube_checkbox.set_active(True)
if context.Plugins['wobbly'].Enabled: wobble_checkbox.set_active(True)

signaldict={
  'on_cube_checkbox_toggled' : on_cube_checkbox_toggled,
  'on_enable_togglebutton_toggled' : on_enable_togglebutton_toggled,
  'on_wobble_checkbox_toggled' : on_wobble_checkbox_toggled,
  'gtk_main_quit' : gtk_main_quit,
  'on_timeout_dialog_close' : on_timeout_dialog_close,
  'cancel_compiz' : cancel_compiz,
  'save_settings' : save_settings,
}
xml.signal_autoconnect(signaldict)

gtk.main()

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux