summaryrefslogtreecommitdiff
path: root/modules/x11
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-20 10:30:54 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-20 10:30:54 +0200
commitd2609092150272f3e3a6a4d9859d3c851e1fa270 (patch)
treeda65ce08d7997e9e67b78d96cb5ceccf8b839b44 /modules/x11
parentf369fc474a4f629fb08ad8ae4c188e43f68806fc (diff)
vidisp: use const pointer to base-class
Diffstat (limited to 'modules/x11')
-rw-r--r--modules/x11/x11.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/x11/x11.c b/modules/x11/x11.c
index 5710dca..e77f25c 100644
--- a/modules/x11/x11.c
+++ b/modules/x11/x11.c
@@ -18,7 +18,7 @@
struct vidisp_st {
- struct vidisp *vd; /**< Inheritance (1st) */
+ const struct vidisp *vd; /**< Inheritance (1st) */
struct vidsz size; /**< Current size */
Display *disp;
@@ -94,8 +94,6 @@ static void destructor(void *arg)
}
close_window(st);
-
- mem_deref(st->vd);
}
@@ -236,7 +234,7 @@ static int x11_reset(struct vidisp_st *st, const struct vidsz *sz)
/* prm->view points to the XWINDOW ID */
-static int alloc(struct vidisp_st **stp, struct vidisp *vd,
+static int alloc(struct vidisp_st **stp, const struct vidisp *vd,
struct vidisp_prm *prm, const char *dev,
vidisp_resize_h *resizeh, void *arg)
{
@@ -250,7 +248,7 @@ static int alloc(struct vidisp_st **stp, struct vidisp *vd,
if (!st)
return ENOMEM;
- st->vd = mem_ref(vd);
+ st->vd = vd;
st->shm.shmaddr = (char *)-1;
st->disp = XOpenDisplay(NULL);