ecore-wl2: Don't re-add existing globals

If we already have seen this global, and it is in the globals hash,
then don't re-add it and just jump straight to sending the event

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-10-20 09:53:22 -04:00
parent 7f8b269c3e
commit ede679b7bd
1 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,8 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
free(global);
}
}
else
goto event;
if (!strcmp(interface, "wl_compositor"))
{
@ -94,6 +96,7 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
else if (!strcmp(interface, "wl_seat"))
_ecore_wl2_input_add(ewd, id);
event:
/* allocate space for event structure */
ev = calloc(1, sizeof(Ecore_Wl2_Event_Global));
if (!ev) return;