egl_dri2: set correct error code if swapbuffers fails
authorDaniel Czarnowski <daniel.czarnowski@intel.com>
Mon, 15 Feb 2016 07:31:09 +0000 (09:31 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 19 Feb 2016 18:23:19 +0000 (18:23 +0000)
commite6f1a44d1407f3318d86ca1bcbc26c3479632e63
treeb7c80e5088b2e75651cfcc52f5f3d6e72ae75e62
parentd1e1563bb63f08cdfec1b40b105bec7f343bc0b8
egl_dri2: set correct error code if swapbuffers fails

A return value of '-1' means that there was error during swap with a
window drawable, in this case we set error as EGL_BAD_NATIVE_WINDOW.

v2: coding style cleanup, better commit message

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/platform_x11.c