1c1,3
< s program is free software; you can redistribute it and/or modify
---
> #!/usr/bin/python
> #
> # This program is free software; you can redistribute it and/or modify
97a100,114
> # Check if only glx is loading
>
> def fixOneModule():
> i = 0
> glx = 0
> for m in modules.load:
> if (m.name.lower() == "glx"):
> glx += 1
> i += 1
> if glx == i:
> return 1
> else:
> return 0
>
> #
105a123,141
> # Add and remove device options
>
> def addDeviceOption(device, newOption, optionInfo):
> for dev in device:
> for o in dev.options:
> i = 0
> if (o.name.lower() == newOption.lower()):
> dev.options.remove(i)
> i += 1
> dev.options.insert(xf86config.XF86Option(newOption, optionInfo))
>
> def removeDeviceOption(device, oldOption):
> for dev in device:
> for o in dev.options:
> i = 0
> if (o.name.lower() == oldOption.lower()):
> dev.options.remove(i)
> i += 1
>
160,161c196,197
< if xconfig.modules == None:
< xconfig.modules = xf86config.XF86ConfModule()
---
> #if xconfig.modules == None:
> # xconfig.modules = xf86config.XF86ConfModule()
168,170c204,208
< removeModule(xconfig.modules, "dri")
< removeModule(xconfig.modules, "GLcore")
< addModule(xconfig.modules, "glx")
---
> if xconfig.modules:
> if fixOneModule:
> removeModule(xconfig.modules, "glx")
> else:
> addModule(xconfig.modules, "glx")
171a210
> addDeviceOption(xconfig.device, "AddARGBGLXVisuals", "True")
177c216
< addModule(xconfig.modules, "dri")
---
> removeDeviceOption(xconfig.device, "AddARGBGLXVisuals")