devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f8e3bc944ff966a81fc2a12adddb5198d5f11544
commit f8e3bc944ff966a81fc2a12adddb5198d5f11544 Author: Chris Michael <cp.mich...@samsung.com> Date: Mon Sep 28 09:51:00 2015 -0400 ecore-wl2: Add API function to set window class name Signed-off-by: Chris Michael <cp.mich...@samsung.com> --- src/lib/ecore_wl2/Ecore_Wl2.h | 3 +++ src/lib/ecore_wl2/ecore_wl2_window.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index fe5731a..a5228f2 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -406,6 +406,9 @@ EAPI void ecore_wl2_window_rotation_set(Ecore_Wl2_Window *window, int rotation); /* TODO: doxy */ EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title); +/* TODO: doxy */ +EAPI void ecore_wl2_window_class_name_set(Ecore_Wl2_Window *window, const char *class_name); + /* # ifdef __cplusplus */ /* } */ /* # endif */ diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 0e1e527..4e048b6 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -625,3 +625,17 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title) else if (window->wl_shell_surface) wl_shell_surface_set_title(window->wl_shell_surface, window->title); } + +EAPI void +ecore_wl2_window_class_name_set(Ecore_Wl2_Window *window, const char *class_name) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + eina_stringshare_replace(&window->class, class_name); + if (!window->class) return; + + if (window->xdg_surface) + xdg_surface_set_app_id(window->xdg_surface, window->class); + else if (window->wl_shell_surface) + wl_shell_surface_set_class(window->wl_shell_surface, window->class); +} --