summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZoxc <zoxc32@gmail.com>2010-06-16 21:33:30 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2010-06-17 09:21:07 +0100
commita9a22649e2ffa1cd3720c8555dc3c6aff2040e3d (patch)
treefe1c9e90654b5bbe8b95749ea41db381146163cf /src
parentca35e09ece5107c3ebc9f111d4a3d96d69aa3d03 (diff)
wgl: Only reset GL context on the dummy window.
This changes the WGL context destruction code to only reset the GL context for the dummy window, since doing it on <nothing> is an invalid operation.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-wgl-context.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cairo-wgl-context.c b/src/cairo-wgl-context.c
index 7bba1d3f..ac15b1d2 100644
--- a/src/cairo-wgl-context.c
+++ b/src/cairo-wgl-context.c
@@ -129,13 +129,11 @@ _wgl_destroy (void *abstract_ctx)
{
cairo_wgl_context_t *ctx = abstract_ctx;
- if (ctx->dummy_dc != 0) {
+ if (ctx->dummy_dc != 0) {
+ wglMakeCurrent (ctx->dummy_dc, 0);
ReleaseDC (ctx->dummy_wnd, ctx->dummy_dc);
DestroyWindow (ctx->dummy_wnd);
- CloseHandle (ctx->dummy_wnd);
}
-
- wglMakeCurrent (0, 0);
}
static cairo_status_t