summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-30 14:53:46 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-30 15:08:53 -0500
commit57d5b5921e8a4a05f4a1b468f1cfed74d28b95f9 (patch)
tree072350e7f11df3f6416f4f54e72263650b43ea3d /src/lib/ecore_wl2
parent1bb45f6e6194fa046d3d1409e1aacecc14dc4b4f (diff)
ecore_wl2: Kill the wl idle enterer
We do flushes when we need them now, so we don't need this somewhat non deterministic flush mechanism anymore. Anything that breaks as a result of this should be fixable by adding an ecore_wl2_display_flush() somewhere appropriate.
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c41
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h1
2 files changed, 0 insertions, 42 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index b11b3af6c6..4d081cc5c3 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -10,7 +10,6 @@
10static Eina_Hash *_server_displays = NULL; 10static Eina_Hash *_server_displays = NULL;
11static Eina_Hash *_client_displays = NULL; 11static Eina_Hash *_client_displays = NULL;
12 12
13static Eina_Bool _cb_connect_idle(void *data);
14static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl); 13static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl);
15static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync); 14static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync);
16 15
@@ -450,8 +449,6 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd)
450 Ecore_Wl2_Window *window; 449 Ecore_Wl2_Window *window;
451 450
452 eina_hash_free_buckets(ewd->globals); 451 eina_hash_free_buckets(ewd->globals);
453 ecore_idle_enterer_del(ewd->idle_enterer);
454 ewd->idle_enterer = NULL;
455 452
456 ecore_main_fd_handler_del(ewd->fd_hdl); 453 ecore_main_fd_handler_del(ewd->fd_hdl);
457 ewd->fd_hdl = NULL; 454 ewd->fd_hdl = NULL;
@@ -541,40 +538,6 @@ _cb_globals_hash_del(void *data)
541 free(global); 538 free(global);
542} 539}
543 540
544static Eina_Bool
545_cb_connect_idle(void *data)
546{
547 Ecore_Wl2_Display *ewd = data;
548 int ret = 0, code;
549
550 ret = wl_display_get_error(ewd->wl.display);
551 code = errno;
552 if (ret < 0) goto err;
553
554 ret = wl_display_dispatch_pending(ewd->wl.display);
555 code = errno;
556 if (ret < 0) goto err;
557
558 ret = wl_display_flush(ewd->wl.display);
559 code = errno;
560 if ((ret < 0) && (code == EAGAIN))
561 ecore_main_fd_handler_active_set(ewd->fd_hdl,
562 (ECORE_FD_READ | ECORE_FD_WRITE));
563
564 return ECORE_CALLBACK_RENEW;
565
566err:
567 if ((ret < 0) && (code != EAGAIN))
568 {
569 ewd->idle_enterer = NULL;
570 _begin_recovery_maybe(ewd, code);
571
572 return ECORE_CALLBACK_CANCEL;
573 }
574
575 return ECORE_CALLBACK_RENEW;
576}
577
578static Ecore_Wl2_Global * 541static Ecore_Wl2_Global *
579_ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface) 542_ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface)
580{ 543{
@@ -697,8 +660,6 @@ _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync)
697 ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR, 660 ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR,
698 _cb_connect_data, ewd, NULL, NULL); 661 _cb_connect_data, ewd, NULL, NULL);
699 662
700 ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd);
701
702 _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT); 663 _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT);
703 ecore_wl2_display_flush(ewd); 664 ecore_wl2_display_flush(ewd);
704 return EINA_TRUE; 665 return EINA_TRUE;
@@ -721,8 +682,6 @@ _ecore_wl2_display_cleanup(Ecore_Wl2_Display *ewd)
721 EINA_INLIST_FOREACH_SAFE(ewd->outputs, tmp, output) 682 EINA_INLIST_FOREACH_SAFE(ewd->outputs, tmp, output)
722 _ecore_wl2_output_del(output); 683 _ecore_wl2_output_del(output);
723 684
724 if (ewd->idle_enterer) ecore_idle_enterer_del(ewd->idle_enterer);
725
726 if (ewd->fd_hdl) ecore_main_fd_handler_del(ewd->fd_hdl); 685 if (ewd->fd_hdl) ecore_main_fd_handler_del(ewd->fd_hdl);
727 686
728 eina_hash_free(ewd->globals); 687 eina_hash_free(ewd->globals);
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index c71ae676c4..95afcd5f48 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -100,7 +100,6 @@ struct _Ecore_Wl2_Display
100 100
101 struct xkb_context *xkb_context; 101 struct xkb_context *xkb_context;
102 102
103 Ecore_Idle_Enterer *idle_enterer;
104 Ecore_Fd_Handler *fd_hdl; 103 Ecore_Fd_Handler *fd_hdl;
105 104
106 Eina_Hash *globals; 105 Eina_Hash *globals;