summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2014-09-26 08:02:25 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-26 08:02:25 -0400
commit96f53fc69dbec76e17d74b39b3dbee317f545750 (patch)
tree43d03ad715cbcf54601e86ccdf1682b674deda06
parent684617cfdc1c9dc535551b20063bcdaf50f624ce (diff)
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 <sri.hebbar@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1481
-rw-r--r--src/lib/ecore_wayland/ecore_wl_private.h3
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c7
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 a86a74c578..dfb3aba6fd 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
156 Eina_Bool anim_pending : 1; 156 Eina_Bool anim_pending : 1;
157 struct wl_callback *anim_callback; 157 struct wl_callback *anim_callback;
158 158
159 /* FIXME: Ideally we should record the cursor name for this window 159 const char *cursor_name;
160 * so we can compare and avoid unnecessary cursor set calls to wayland */
161 160
162 Ecore_Wl_Subsurf *subsurfs; 161 Ecore_Wl_Subsurf *subsurfs;
163 162
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 13a4e7b9e3..84e89540d8 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
571 571
572 win->pointer.set = EINA_FALSE; 572 win->pointer.set = EINA_FALSE;
573 573
574 if ((input = win->pointer_device)) 574 if (!(input = win->pointer_device))
575 return;
576
577 eina_stringshare_replace(&win->cursor_name, cursor_name);
578
579 if (strcmp(input->cursor_name, win->cursor_name))
575 ecore_wl_input_cursor_from_name_set(input, cursor_name); 580 ecore_wl_input_cursor_from_name_set(input, cursor_name);
576} 581}
577 582