summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:11:00 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:10:34 -0400
commitab2c330b2746792de779a1dc63d09112d6815075 (patch)
treeca80d7f79be2798be34ea7de1ff22d0d0899fccc /src/lib/ecore_wl2
parent4e68271416b251fb0dd730c14bde012d96744876 (diff)
ecore-wl2: simplify server pid detection
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index dc7fb0df49..a5789648d9 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -855,26 +855,7 @@ found:
855static Eina_Bool 855static Eina_Bool
856_ecore_wl2_display_sync_get(void) 856_ecore_wl2_display_sync_get(void)
857{ 857{
858 Ecore_Wl2_Display *sewd; 858 return !_server_displays || !eina_hash_population(_server_displays);
859 Eina_Iterator *itr;
860 Eina_Bool ret = EINA_TRUE;
861 void *data;
862
863 if (eina_hash_population(_server_displays) < 1) return ret;
864
865 itr = eina_hash_iterator_data_new(_server_displays);
866 while (eina_iterator_next(itr, &data))
867 {
868 sewd = (Ecore_Wl2_Display *)data;
869 if (sewd->pid == getpid())
870 {
871 ret = EINA_FALSE;
872 break;
873 }
874 }
875 eina_iterator_free(itr);
876
877 return ret;
878} 859}
879 860
880EAPI Ecore_Wl2_Display * 861EAPI Ecore_Wl2_Display *