ecore_wl2: Silence a commit ERR on window hide

Cosmetic fix, should be functionally identical.  Hide can be called
asynchronously, so it's ok, and the ERR can be silenced.
This commit is contained in:
Derek Foreman 2018-03-16 12:47:05 -05:00
parent 9610459502
commit 7784405ad9
1 changed files with 14 additions and 0 deletions

View File

@ -633,6 +633,19 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window)
EINA_INLIST_FOREACH_SAFE(window->subsurfs, tmp, subsurf)
_ecore_wl2_subsurf_unmap(subsurf);
if (window->commit_pending)
{
/* We've probably been hidden while an animator
* is ticking. Cancel the callback.
*/
window->commit_pending = EINA_FALSE;
if (window->callback)
{
wl_callback_destroy(window->callback);
window->callback = NULL;
}
}
if (window->surface)
{
wl_surface_attach(window->surface, NULL, 0, 0);
@ -640,6 +653,7 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window)
window->commit_pending = EINA_FALSE;
}
/* The commit added a callback, disconnect it */
if (window->callback)
{
wl_callback_destroy(window->callback);