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
This commit is contained in:
Srivardhan Hebbar 2014-09-26 08:02:25 -04:00 committed by Chris Michael
parent 684617cfdc
commit 96f53fc69d
2 changed files with 7 additions and 3 deletions

View File

@ -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;

View File

@ -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);
}