summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-01-16 00:51:37 +0100
committerDennis kasprzyk <onestone@opencompositing.org>2008-01-16 00:51:37 +0100
commitec384afcad00400079ca64f6355e76b54651e5b0 (patch)
treeda88b2ad5ed1a9718acb2dcfd12eb7138b87c77f
parent246896e8d02338e8ea382cbb800b0b6f2b811d8b (diff)
downloadworkarounds-ec384afcad00400079ca64f6355e76b54651e5b0.tar.gz
workarounds-ec384afcad00400079ca64f6355e76b54651e5b0.tar.bz2
Added a fix for the not updating screen contents problem under XGL with recent versions of fglrx.
-rw-r--r--workarounds.c17
-rw-r--r--workarounds.xml.in5
2 files changed, 22 insertions, 0 deletions
diff --git a/workarounds.c b/workarounds.c
index bd9596f..1e3d28a 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -56,6 +56,8 @@ typedef struct _WorkaroundsScreen {
GLProgramParameter4fProc origProgramEnvParameter4f;
GLProgramParameter4dvProc programEnvParameter4dv;
+
+ GLXCopySubBufferProc origCopySubBuffer;
} WorkaroundsScreen;
CompScreen *currentScreen = NULL;
@@ -500,11 +502,18 @@ workaroundsDisplayOptionChanged (CompDisplay *d,
CompScreen *s;
CompWindow *w;
+ WorkaroundsScreen *ws;
+
for (s = d->screens; s; s = s->next)
{
+ ws = GET_WORKAROUNDS_SCREEN (s, GET_WORKAROUNDS_DISPLAY (d));
for (w = s->windows; w; w = w->next)
workaroundsUpdateSticky (w);
workaroundsUpdateParameterFix (s);
+ if (workaroundsGetFglrxXglFix (d))
+ s->copySubBuffer = NULL;
+ else
+ s->copySubBuffer = ws->origCopySubBuffer;
}
}
@@ -624,6 +633,7 @@ workaroundsInitDisplay (CompPlugin *plugin, CompDisplay *d)
workaroundsSetAlldesktopStickyMatchNotify (d,
workaroundsDisplayOptionChanged);
workaroundsSetAiglxFragmentFixNotify (d, workaroundsDisplayOptionChanged);
+ workaroundsSetFglrxXglFixNotify (d, workaroundsDisplayOptionChanged);
d->base.privates[displayPrivateIndex].ptr = wd;
@@ -667,6 +677,8 @@ workaroundsInitScreen (CompPlugin *plugin, CompScreen *s)
(*s->getProcAddress) ((GLubyte *) "glProgramEnvParameter4dvARB");
ws->origProgramEnvParameter4f = s->programEnvParameter4f;
+ ws->origCopySubBuffer = s->copySubBuffer;
+
WRAP (ws, s, windowResizeNotify, workaroundsWindowResizeNotify);
WRAP (ws, s, getAllowedActionsForWindow,
workaroundsGetAllowedActionsForWindow);
@@ -677,6 +689,9 @@ workaroundsInitScreen (CompPlugin *plugin, CompScreen *s)
workaroundsUpdateParameterFix (s);
+ if (workaroundsGetFglrxXglFix (s->display))
+ s->copySubBuffer = NULL;
+
return TRUE;
}
@@ -692,6 +707,8 @@ workaroundsFiniScreen (CompPlugin *plugin, CompScreen *s)
UNWRAP (ws, s, paintScreen);
+ s->copySubBuffer = ws->origCopySubBuffer;
+
free (ws);
}
diff --git a/workarounds.xml.in b/workarounds.xml.in
index 872c090..5790c1f 100644
--- a/workarounds.xml.in
+++ b/workarounds.xml.in
@@ -43,6 +43,11 @@
<_long>Fix broken glProgramEnvParameter4f implementation.</_long>
<default>true</default>
</option>
+ <option type="bool" name="fglrx_xgl_fix">
+ <_short>Fix screen updates in XGL with fglrx.</_short>
+ <_long>Fix for broken GLX_MESA_copy_sub_buffer on XGL in fglrx.</_long>
+ <default>false</default>
+ </option>
<subgroup>
<_short>Window stickyness</_short>
<option type="bool" name="sticky_alldesktops">