devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=96f53fc69dbec76e17d74b39b3dbee317f545750
commit 96f53fc69dbec76e17d74b39b3dbee317f545750 Author: Srivardhan Hebbar <[email protected]> Date: Fri Sep 26 08:02:25 2014 -0400 ecore_wayland: Added cursor_name to Ecore_Wl_Window. Summary: Added cursor_name to Ecore_Wl_Window so that we can compare with input cursor name and avoid unnecessary cursor set calls to wayland. Signed-off-by: Srivardhan Hebbar <[email protected]> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1481 --- src/lib/ecore_wayland/ecore_wl_private.h | 3 +-- src/lib/ecore_wayland/ecore_wl_window.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h index a86a74c..dfb3aba 100644 --- a/src/lib/ecore_wayland/ecore_wl_private.h +++ b/src/lib/ecore_wayland/ecore_wl_private.h @@ -156,8 +156,7 @@ struct _Ecore_Wl_Window Eina_Bool anim_pending : 1; struct wl_callback *anim_callback; - /* FIXME: Ideally we should record the cursor name for this window - * so we can compare and avoid unnecessary cursor set calls to wayland */ + const char *cursor_name; Ecore_Wl_Subsurf *subsurfs; diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 13a4e7b..84e8954 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@ -571,7 +571,12 @@ ecore_wl_window_cursor_from_name_set(Ecore_Wl_Window *win, const char *cursor_na win->pointer.set = EINA_FALSE; - if ((input = win->pointer_device)) + if (!(input = win->pointer_device)) + return; + + eina_stringshare_replace(&win->cursor_name, cursor_name); + + if (strcmp(input->cursor_name, win->cursor_name)) ecore_wl_input_cursor_from_name_set(input, cursor_name); } --
