From 5e3a9860aa541ced77da5e9e9cebc1535384a7b8 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 20 Aug 2015 10:15:07 -0400 Subject: [PATCH] ecore-wl2: Add API function for clients to disconnect from a Wayland display Signed-off-by: Chris Michael --- src/lib/ecore_wl2/Ecore_Wl2.h | 12 ++++++++++++ src/lib/ecore_wl2/ecore_wl2_display.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 97fa3c6..0ae3f8d 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -130,6 +130,18 @@ EAPI Ecore_Wl2_Display *ecore_wl2_display_create(const char *name); EAPI Ecore_Wl2_Display *ecore_wl2_display_connect(const char *name); /** + * Disconnect an existing Wayland display + * + * @brief This function is typically used by clients to disconnect from an + * existing Wayland display. + * + * @param display The display to disconnect from + * + * @ingroup Ecore_Wl2_Display_Group + */ +EAPI void ecore_wl2_display_disconnect(Ecore_Wl2_Display *display); + +/** * Retrieve the existing Wayland display * * @param display The Ecore_Wl2_Display for which to retrieve the existing diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 366077b..ca5292d 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -286,3 +286,10 @@ ecore_wl2_display_shm_get(Ecore_Wl2_Display *display) EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL); return display->wl.shm; } + +EAPI void +ecore_wl2_display_disconnect(Ecore_Wl2_Display *display) +{ + EINA_SAFETY_ON_NULL_RETURN(display); + wl_display_disconnect(display->wl.display); +} -- 2.7.4