From 8a457e3e9f023db1975fa585e92edbcd87f30dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 7 Jan 2011 09:19:25 -0500 Subject: [PATCH] Simplify visual check --- compositor/drm.c | 4 +--- compositor/shm.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/compositor/drm.c b/compositor/drm.c index dd5788b8..0c3b1296 100644 --- a/compositor/drm.c +++ b/compositor/drm.c @@ -121,9 +121,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base, EGL_NONE }; - if (visual != &compositor->compositor.argb_visual && - visual != &compositor->compositor.premultiplied_argb_visual && - visual != &compositor->compositor.rgb_visual) { + if (visual->object.interface != &wl_visual_interface) { /* FIXME: Define a real exception event instead of * abusing this one */ wl_client_post_event(client, diff --git a/compositor/shm.c b/compositor/shm.c index 4f31bd4b..52585f82 100644 --- a/compositor/shm.c +++ b/compositor/shm.c @@ -92,9 +92,7 @@ shm_create_buffer(struct wl_client *client, struct wl_shm *shm, struct wlsc_compositor, shm); struct wlsc_shm_buffer *buffer; - if (visual != &compositor->compositor.argb_visual && - visual != &compositor->compositor.premultiplied_argb_visual && - visual != &compositor->compositor.rgb_visual) { + if (visual->object.interface != &wl_visual_interface) { /* FIXME: Define a real exception event instead of * abusing this one */ wl_client_post_event(client,