summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorJesse Barnes <[email protected]>2010-04-19 09:54:08 -0700
committerJesse Barnes <[email protected]>2010-04-19 09:56:32 -0700
commit385e2896ebf54ac0b016132fe513f21a5b67ba4f (patch)
treeda6d7dbedf2290a4f553c4d57f24589afa6250de /src/glx
parentc060265bdb953f0c9d73e60f08c53a2e3b1a1176 (diff)
DRI2: synchronize swap interval with server at startup time
In the direct rendered case, we need to tell the server our initial swap interval. If we don't, the local and server values will be out of sync, since the server and client defaults may be different (as they were before this patch).
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/dri2_glx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 06f3d8b71c0..d09d614741d 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -185,7 +185,7 @@ dri2CreateDrawable(__GLXscreenConfigs * psc,
pdraw->base.drawable = drawable;
pdraw->base.psc = psc;
pdraw->bufferCount = 0;
- pdraw->swap_interval = 0;
+ pdraw->swap_interval = 1;
DRI2CreateDrawable(psc->dpy, xDrawable);
@@ -200,6 +200,11 @@ dri2CreateDrawable(__GLXscreenConfigs * psc,
return NULL;
}
+ /*
+ * Make sure server has the same swap interval we do for the new
+ * drawable.
+ */
+ DRI2SwapInterval(psc->dpy, xDrawable, pdraw->swap_interval);
return &pdraw->base;
}