aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl_x11.c')
-rw-r--r--pugl/pugl_x11.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c
index 3a0f4c2..e249ea6 100644
--- a/pugl/pugl_x11.c
+++ b/pugl/pugl_x11.c
@@ -70,13 +70,13 @@ puglInitInternals(void)
void
puglEnterContext(PuglView* view, bool drawing)
{
- view->impl->backend->enter(view, drawing);
+ view->backend->enter(view, drawing);
}
void
puglLeaveContext(PuglView* view, bool drawing)
{
- view->impl->backend->leave(view, drawing);
+ view->backend->leave(view, drawing);
}
int
@@ -97,19 +97,19 @@ puglCreateWindow(PuglView* view, const char* title)
if (view->ctx_type == PUGL_GL) {
#ifdef PUGL_HAVE_GL
- impl->backend = puglGlBackend();
+ view->backend = puglGlBackend();
#endif
}
if (view->ctx_type == PUGL_CAIRO) {
#ifdef PUGL_HAVE_CAIRO
- impl->backend = puglCairoBackend();
+ view->backend = puglCairoBackend();
#endif
}
- if (!impl->backend->configure) {
+ if (!view->backend || !view->backend->configure) {
return 1;
- } else if (impl->backend->configure(view) || !impl->vi) {
- impl->backend->destroy(view);
+ } else if (view->backend->configure(view) || !impl->vi) {
+ view->backend->destroy(view);
return 2;
}
@@ -128,7 +128,7 @@ puglCreateWindow(PuglView* view, const char* title)
0, 0, view->width, view->height, 0, impl->vi->depth, InputOutput,
impl->vi->visual, CWColormap | CWEventMask, &attr);
- if (impl->backend->create(view)) {
+ if (view->backend->create(view)) {
return 3;
}
@@ -211,7 +211,7 @@ puglDestroy(PuglView* view)
if (view->impl->xim) {
XCloseIM(view->impl->xim);
}
- view->impl->backend->destroy(view);
+ view->backend->destroy(view);
XDestroyWindow(view->impl->display, view->impl->win);
XCloseDisplay(view->impl->display);
XFree(view->impl->vi);
@@ -566,7 +566,7 @@ puglProcessEvents(PuglView* view)
if (config_event.type) {
view->width = (int)config_event.configure.width;
view->height = (int)config_event.configure.height;
- impl->backend->resize(view, view->width, view->height);
+ view->backend->resize(view, view->width, view->height);
view->eventFunc(view, (const PuglEvent*)&config_event);
}
@@ -609,5 +609,5 @@ puglGetNativeWindow(PuglView* view)
void*
puglGetContext(PuglView* view)
{
- return view->impl->backend->getContext(view);
+ return view->backend->getContext(view);
}