summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-05-26 09:42:55 +0900
committerHermet Park <chuneon.park@samsung.com>2020-05-26 09:42:55 +0900
commitb59834e782d581f155c832b9f9841b6cc4896346 (patch)
treea448aa7bfb730d7393f767cd959a70f486279407
parent4b13f20b5abe5332658530a108ce994de47a3177 (diff)
parentc0c5bc71c5960408ceac135eb8fc250683d55ffd (diff)
Merge branch 'master' into devs/hermet/lottie
-rw-r--r--meson.build1
-rw-r--r--meson_options.txt8
-rw-r--r--src/benchmarks/eina/meson.build12
-rw-r--r--src/bin/edje/meson.build9
-rw-r--r--src/bin/elementary/meson.build9
-rw-r--r--src/bindings/luajit/eina/accessor.lua6
-rw-r--r--src/bindings/luajit/eina/counter.lua2
-rw-r--r--src/bindings/luajit/eina/file.lua6
-rw-r--r--src/bindings/luajit/eina/iterator.lua4
-rw-r--r--src/bindings/luajit/eina/list.lua46
-rw-r--r--src/bindings/luajit/eina/xattr.lua4
-rw-r--r--src/bindings/luajit/eo.lua6
-rw-r--r--src/bindings/luajit/eolian.lua176
-rw-r--r--src/lib/ecore/Ecore.h2
-rw-r--r--src/lib/ecore/ecore.c51
-rw-r--r--src/lib/ecore/ecore_anim.c137
-rw-r--r--src/lib/ecore/ecore_main.c18
-rw-r--r--src/lib/ecore/ecore_private.h6
-rw-r--r--src/lib/ecore/ecore_thread.c3
-rw-r--r--src/lib/ecore/meson.build4
-rw-r--r--src/lib/ecore_con/ecore_con.c67
-rw-r--r--src/lib/ecore_con/ecore_con_local.c4
-rw-r--r--src/lib/ecore_con/ecore_con_private.h7
-rw-r--r--src/lib/ecore_con/efl_net_server_fd.c6
-rw-r--r--src/lib/ecore_con/efl_net_socket_windows.c2
-rw-r--r--src/lib/ecore_con/meson.build2
-rw-r--r--src/lib/ecore_drm/ecore_drm_logind.c72
-rw-r--r--src/lib/ecore_drm/ecore_drm_private.h4
-rw-r--r--src/lib/ecore_evas/ecore_evas.c2
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c4
-rw-r--r--src/lib/ecore_x/Ecore_X.h2
-rw-r--r--src/lib/ecore_x/ecore_x.c4
-rw-r--r--src/lib/ecore_x/ecore_x_events.c10
-rw-r--r--src/lib/ecore_x/ecore_x_vsync.c190
-rw-r--r--src/lib/eina/eina_log.c79
-rw-r--r--src/lib/eina/eina_thread.c50
-rw-r--r--src/lib/eina/meson.build7
-rw-r--r--src/lib/elementary/Efl_Ui.h7
-rw-r--r--src/lib/elementary/efl_ui_image.c10
-rw-r--r--src/lib/elementary/efl_ui_layout.c7
-rw-r--r--src/lib/elementary/efl_ui_layout.eo1
-rw-r--r--src/lib/elementary/elm_dnd.c3
-rw-r--r--src/lib/elementary/elm_gengrid.c9
-rw-r--r--src/lib/elementary/elm_genlist.c9
-rw-r--r--src/lib/elementary/meson.build2
-rw-r--r--src/lib/elput/Elput.h21
-rw-r--r--src/lib/elput/elput_logind.c83
-rw-r--r--src/lib/elput/elput_manager.c2
-rw-r--r--src/lib/elput/elput_private.h8
-rw-r--r--src/lib/elput/meson.build7
-rw-r--r--src/lib/elua/Elua.h16
-rw-r--r--src/lib/elua/cache.c4
-rw-r--r--src/lib/elua/io.c4
-rw-r--r--src/lib/embryo/embryo_main.c2
-rw-r--r--src/lib/embryo/embryo_private.h2
-rw-r--r--src/lib/embryo/embryo_str.c2
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c6
-rw-r--r--src/lib/evas/canvas/evas_main.c2
-rw-r--r--src/lib/evas/canvas/evas_object_image.c10
-rw-r--r--src/lib/evas/canvas/evas_render.c19
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c8
-rw-r--r--src/lib/evas/include/evas_private.h2
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c1
-rw-r--r--src/modules/ecore_evas/engines/drm/meson.build4
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c251
-rw-r--r--src/modules/evas/image_loaders/png/evas_image_load_png.c7
-rw-r--r--src/scripts/elua/apps/empty.txt0
-rw-r--r--src/scripts/elua/apps/lualian.lua65
-rw-r--r--src/scripts/elua/modules/lualian.lua718
-rw-r--r--src/tests/eina/eina_test_array.c18
-rw-r--r--src/tests/elementary/elm_code_file_test_load.c4
-rw-r--r--src/tests/elementary/elm_code_test_basic.c4
72 files changed, 1077 insertions, 1263 deletions
diff --git a/meson.build b/meson.build
index 5a6fc8093e..f33a336faa 100644
--- a/meson.build
+++ b/meson.build
@@ -100,6 +100,7 @@ foreach lang : ['c', 'objc', 'cpp']
100 add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang) 100 add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
101 if sys_windows == true 101 if sys_windows == true
102 add_global_arguments('-D_POSIX_C_SOURCE=200809L', language: lang) 102 add_global_arguments('-D_POSIX_C_SOURCE=200809L', language: lang)
103 add_global_arguments('-DDLL_EXPORT=1', language: lang)
103 if (get_option('windows-version') == 'vista') 104 if (get_option('windows-version') == 'vista')
104 add_global_arguments('-DWINVER=0x060', language: lang) 105 add_global_arguments('-DWINVER=0x060', language: lang)
105 add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang) 106 add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang)
diff --git a/meson_options.txt b/meson_options.txt
index 863815c73a..77687bb635 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -128,7 +128,7 @@ option('gstreamer',
128option('systemd', 128option('systemd',
129 type : 'boolean', 129 type : 'boolean',
130 value : true, 130 value : true,
131 description : 'Systemd support in efl' 131 description : 'Systemd and Elogind support at runtime in efl'
132) 132)
133 133
134option('pulseaudio', 134option('pulseaudio',
@@ -334,12 +334,6 @@ option('native-arch-optimization',
334 description: 'Enable architecture native optimizations in efl' 334 description: 'Enable architecture native optimizations in efl'
335) 335)
336 336
337option('elogind',
338 type : 'boolean',
339 value : false,
340 description : 'elogind support in efl (subset of systemd)'
341)
342
343option('windows-version', 337option('windows-version',
344 type : 'combo', 338 type : 'combo',
345 choices : ['vista', 'win7', 'win8', 'win81', 'win10'], 339 choices : ['vista', 'win7', 'win8', 'win81', 'win10'],
diff --git a/src/benchmarks/eina/meson.build b/src/benchmarks/eina/meson.build
index 9b924dd1b9..6bbebce206 100644
--- a/src/benchmarks/eina/meson.build
+++ b/src/benchmarks/eina/meson.build
@@ -25,15 +25,15 @@ eina_bench_src = files(
25'evas_mempool.h') 25'evas_mempool.h')
26 26
27city = shared_library('city', 27city = shared_library('city',
28 sources : ['city.cc','city.h'], 28 sources : ['city.cc','city.h'],
29) 29)
30 30
31eina_bench = executable('eina_bench', 31eina_bench = executable('eina_bench',
32 sources : eina_bench_src, 32 sources : eina_bench_src,
33 dependencies : eina, 33 dependencies : eina,
34 c_args : ['-fPIC','-DCITYHASH_BENCH', '-DEINA_ENABLE_BENCH_E17'], 34 c_args : ['-fPIC','-DCITYHASH_BENCH', '-DEINA_ENABLE_BENCH_E17'],
35 include_directories : config_dir, 35 include_directories : config_dir,
36 link_with : city, 36 link_with : city,
37) 37)
38 38
39benchmark('eina_bench', eina_bench, 39benchmark('eina_bench', eina_bench,
diff --git a/src/bin/edje/meson.build b/src/bin/edje/meson.build
index 0fff2cd6dc..fa059ca4b7 100644
--- a/src/bin/edje/meson.build
+++ b/src/bin/edje/meson.build
@@ -30,6 +30,11 @@ edje_cc = executable('edje_cc',
30 link_args : bin_linker_args 30 link_args : bin_linker_args
31) 31)
32 32
33asan_option =[]
34if get_option('b_sanitize') == 'address'
35 asan_option= 'ASAN_OPTIONS=detect_leaks=0'
36endif
37
33if meson.is_cross_build() 38if meson.is_cross_build()
34 _edje_cc = find_program('edje_cc', native: true) 39 _edje_cc = find_program('edje_cc', native: true)
35 edje_cc_path = _edje_cc.path() 40 edje_cc_path = _edje_cc.path()
@@ -40,7 +45,7 @@ else
40 edje_cc_exe = [edje_cc.full_path()] 45 edje_cc_exe = [edje_cc.full_path()]
41 else 46 else
42 env = find_program('env', native: true) 47 env = find_program('env', native: true)
43 edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()] 48 edje_cc_exe = [env, asan_option, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
44 endif 49 endif
45 edje_depends = [edje_cc, epp, evas_engine_buffer_mod, embryo_cc] 50 edje_depends = [edje_cc, epp, evas_engine_buffer_mod, embryo_cc]
46endif 51endif
@@ -93,7 +98,7 @@ if meson.is_cross_build()
93 edje_codegen_exe = [_edje_codegen] 98 edje_codegen_exe = [_edje_codegen]
94else 99else
95 env = find_program('env', native: true) 100 env = find_program('env', native: true)
96 edje_codegen_exe = [env, 'EFL_RUN_IN_TREE=1', edje_codegen.full_path()] 101 edje_codegen_exe = [env, asan_option, 'EFL_RUN_IN_TREE=1', edje_codegen.full_path()]
97endif 102endif
98 103
99edje_pick = executable('edje_pick', 104edje_pick = executable('edje_pick',
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 0f8d79322d..ef5d3ded60 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -237,11 +237,16 @@ elementary_codegen = executable('elementary_codegen',
237 link_args: link_args 237 link_args: link_args
238) 238)
239 239
240asan_option =[]
241if get_option('b_sanitize') == 'address'
242 asan_option= 'ASAN_OPTIONS=detect_leaks=0'
243endif
244
240if meson.is_cross_build() 245if meson.is_cross_build()
241 elementary_codegen_exe = [find_program('elementary_codegen', native: true)] 246 elementary_codegen_exe = [find_program('elementary_codegen', native: true)]
242else 247else
243 env = find_program('env', native: true) 248 env = find_program('env', native: true)
244 elementary_codegen_exe = [env, 'EFL_RUN_IN_TREE=1', elementary_codegen.full_path()] 249 elementary_codegen_exe = [env, asan_option, 'EFL_RUN_IN_TREE=1', elementary_codegen.full_path()]
245endif 250endif
246 251
247elm_prefs_cc_src = [ 252elm_prefs_cc_src = [
@@ -267,7 +272,7 @@ if meson.is_cross_build()
267 elm_prefs_cc_exe = [_elm_prefs_cc] 272 elm_prefs_cc_exe = [_elm_prefs_cc]
268else 273else
269 env = find_program('env', native: true) 274 env = find_program('env', native: true)
270 elm_prefs_cc_exe = [env, 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path()] 275 elm_prefs_cc_exe = [env, asan_option, 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path()]
271endif 276endif
272 277
273if sys_windows == false 278if sys_windows == false
diff --git a/src/bindings/luajit/eina/accessor.lua b/src/bindings/luajit/eina/accessor.lua
index 55afa62427..d2068fc8b5 100644
--- a/src/bindings/luajit/eina/accessor.lua
+++ b/src/bindings/luajit/eina/accessor.lua
@@ -46,12 +46,12 @@ ffi.metatype("Eina_Accessor", {
46 unlock = function(self) return eina.eina_accessor_unlock(self) ~= 0 end, 46 unlock = function(self) return eina.eina_accessor_unlock(self) ~= 0 end,
47 clone = function(self) 47 clone = function(self)
48 local v = eina.eina_accessor_clone(self) 48 local v = eina.eina_accessor_clone(self)
49 if v == nil then return nil end 49 if v == ffi.nullptr then return nil end
50 return v 50 return v
51 end, 51 end,
52 container_get = function(self) 52 container_get = function(self)
53 local v = eina.eina_accessor_container_get(self) 53 local v = eina.eina_accessor_container_get(self)
54 if v == nil then return nil end 54 if v == ffi.nullptr then return nil end
55 return v 55 return v
56 end 56 end
57 } 57 }
@@ -64,7 +64,7 @@ local dgetmt = debug.getmetatable
64M.Accessor = util.Readonly_Object:clone { 64M.Accessor = util.Readonly_Object:clone {
65 __ctor = function(self, selfmt, acc) 65 __ctor = function(self, selfmt, acc)
66 -- prevent null stuff 66 -- prevent null stuff
67 if acc == nil then acc = nil end 67 if acc == ffi.nullptr then acc = nil end
68 if acc then ffi.gc(acc, acc.free) end 68 if acc then ffi.gc(acc, acc.free) end
69 selfmt.__eq = function(self, other) 69 selfmt.__eq = function(self, other)
70 return selfmt.__accessor == dgetmt(other).__accessor 70 return selfmt.__accessor == dgetmt(other).__accessor
diff --git a/src/bindings/luajit/eina/counter.lua b/src/bindings/luajit/eina/counter.lua
index b0b9829ad4..6a9ba33284 100644
--- a/src/bindings/luajit/eina/counter.lua
+++ b/src/bindings/luajit/eina/counter.lua
@@ -51,7 +51,7 @@ M.Counter = ffi.metatype("Eina_Counter", {
51 51
52 dump = function(self) 52 dump = function(self)
53 local v = eina.eina_counter_dump(self) 53 local v = eina.eina_counter_dump(self)
54 if v == nil then return nil end 54 if v == ffi.nullptr then return nil end
55 local r = ffi.string(v) 55 local r = ffi.string(v)
56 C.free(v) 56 C.free(v)
57 return r 57 return r
diff --git a/src/bindings/luajit/eina/file.lua b/src/bindings/luajit/eina/file.lua
index 675b810a17..3f59391b60 100644
--- a/src/bindings/luajit/eina/file.lua
+++ b/src/bindings/luajit/eina/file.lua
@@ -236,7 +236,7 @@ M.direct_ls = function(dir) return Direct_Ls_Iterator(dir) end
236 236
237M.path_sanitize = function(path) 237M.path_sanitize = function(path)
238 local v = eina.eina_file_path_sanitize(path) 238 local v = eina.eina_file_path_sanitize(path)
239 if v == nil then return nil end 239 if v == ffi.nullptr then return nil end
240 local r = ffi.string(v) 240 local r = ffi.string(v)
241 C.free(v) 241 C.free(v)
242 return r 242 return r
@@ -358,7 +358,7 @@ M.File = ffi.metatype("Eina_File", {
358 358
359 map_all = function(self, rule, raw) 359 map_all = function(self, rule, raw)
360 local v = ffi.cast("char*", eina.eina_file_map_all(self, rule or 0)) 360 local v = ffi.cast("char*", eina.eina_file_map_all(self, rule or 0))
361 if v == nil then return nil end 361 if v == ffi.nullptr then return nil end
362 if not raw then 362 if not raw then
363 local r = ffi.string(v) 363 local r = ffi.string(v)
364 self:map_free(v) 364 self:map_free(v)
@@ -370,7 +370,7 @@ M.File = ffi.metatype("Eina_File", {
370 map_new = function(self, rule, offset, length, raw) 370 map_new = function(self, rule, offset, length, raw)
371 local v = ffi.cast("char*", eina.eina_file_map_new(self, rule or 0, 371 local v = ffi.cast("char*", eina.eina_file_map_new(self, rule or 0,
372 offset or 0, length)) 372 offset or 0, length))
373 if v == nil then return nil end 373 if v == ffi.nullptr then return nil end
374 if not raw then 374 if not raw then
375 local r = ffi.string(v, length) 375 local r = ffi.string(v, length)
376 self:map_free(v) 376 self:map_free(v)
diff --git a/src/bindings/luajit/eina/iterator.lua b/src/bindings/luajit/eina/iterator.lua
index dc5d0da8b2..196a968500 100644
--- a/src/bindings/luajit/eina/iterator.lua
+++ b/src/bindings/luajit/eina/iterator.lua
@@ -43,7 +43,7 @@ ffi.metatype("Eina_Iterator", {
43 unlock = function(self) return eina.eina_iterator_unlock(self) ~= 0 end, 43 unlock = function(self) return eina.eina_iterator_unlock(self) ~= 0 end,
44 container_get = function(self) 44 container_get = function(self)
45 local v = eina.eina_iterator_container_get(self) 45 local v = eina.eina_iterator_container_get(self)
46 if v == nil then return nil end 46 if v == ffi.nullptr then return nil end
47 return v 47 return v
48 end 48 end
49 } 49 }
@@ -56,7 +56,7 @@ local dgetmt = debug.getmetatable
56M.Iterator = util.Readonly_Object:clone { 56M.Iterator = util.Readonly_Object:clone {
57 __ctor = function(self, selfmt, iter) 57 __ctor = function(self, selfmt, iter)
58 -- prevent null stuff 58 -- prevent null stuff
59 if iter == nil then iter = nil end 59 if iter == ffi.nullptr then iter = nil end
60 if iter then ffi.gc(iter, iter.free) end 60 if iter then ffi.gc(iter, iter.free) end
61 selfmt.__eq = function(self, other) 61 selfmt.__eq = function(self, other)
62 return selfmt.__iterator == dgetmt(other).__iterator 62 return selfmt.__iterator == dgetmt(other).__iterator
diff --git a/src/bindings/luajit/eina/list.lua b/src/bindings/luajit/eina/list.lua
index aebfa348c1..4c0bc6bd17 100644
--- a/src/bindings/luajit/eina/list.lua
+++ b/src/bindings/luajit/eina/list.lua
@@ -83,7 +83,9 @@ local dgetmt = debug.getmetatable
83 83
84local List_Iterator = Iterator:clone { 84local List_Iterator = Iterator:clone {
85 __ctor = function(self, selfmt, list) 85 __ctor = function(self, selfmt, list)
86 if list == nil then return Iterator.__ctor(self, selfmt, nil) end 86 if not list or list == ffi.nullptr then
87 return Iterator.__ctor(self, selfmt, nil)
88 end
87 selfmt.__list = list 89 selfmt.__list = list
88 return Iterator.__ctor(self, selfmt, 90 return Iterator.__ctor(self, selfmt,
89 eina.eina_list_iterator_new(dgetmt(list).__list)) 91 eina.eina_list_iterator_new(dgetmt(list).__list))
@@ -98,7 +100,9 @@ local List_Iterator = Iterator:clone {
98 100
99local List_Reverse_Iterator = Iterator:clone { 101local List_Reverse_Iterator = Iterator:clone {
100 __ctor = function(self, selfmt, list) 102 __ctor = function(self, selfmt, list)
101 if list == nil then return Iterator.__ctor(self, selfmt, nil) end 103 if not list or list == ffi.nullptr then
104 return Iterator.__ctor(self, selfmt, nil)
105 end
102 selfmt.__list = list 106 selfmt.__list = list
103 return Iterator.__ctor(self, selfmt, 107 return Iterator.__ctor(self, selfmt,
104 eina.eina_list_iterator_reversed_new(dgetmt(list).__list)) 108 eina.eina_list_iterator_reversed_new(dgetmt(list).__list))
@@ -115,7 +119,9 @@ local Accessor = accessor.Accessor
115 119
116local List_Accessor = Accessor:clone { 120local List_Accessor = Accessor:clone {
117 __ctor = function(self, selfmt, list) 121 __ctor = function(self, selfmt, list)
118 if list == nil then return Accessor.__ctor(self, selfmt, nil) end 122 if not list or list == ffi.nullptr then
123 return Accessor.__ctor(self, selfmt, nil)
124 end
119 selfmt.__list = list 125 selfmt.__list = list
120 return Accessor.__ctor(self, selfmt, 126 return Accessor.__ctor(self, selfmt,
121 eina.eina_list_accessor_new(dgetmt(list).__list)) 127 eina.eina_list_accessor_new(dgetmt(list).__list))
@@ -141,37 +147,37 @@ local List = ffi.metatype("Eina_List", {
141 data_get = function(self, ptr) 147 data_get = function(self, ptr)
142 if ptr ~= nil then return ptr end 148 if ptr ~= nil then return ptr end
143 local v = get_list_t(self).data 149 local v = get_list_t(self).data
144 if v == nil then return nil end 150 if v == ffi.nullptr then return nil end
145 return v 151 return v
146 end, 152 end,
147 153
148 nth = function(self, n) 154 nth = function(self, n)
149 local v = eina.eina_list_nth(self, n - 1) 155 local v = eina.eina_list_nth(self, n - 1)
150 if v == nil then return nil end 156 if v == ffi.nullptr then return nil end
151 return self:data_get(v) 157 return self:data_get(v)
152 end, 158 end,
153 159
154 nth_list = function(self, n) 160 nth_list = function(self, n)
155 local v = eina.eina_list_nth_list(self, n - 1) 161 local v = eina.eina_list_nth_list(self, n - 1)
156 if v == nil then return nil end 162 if v == ffi.nullptr then return nil end
157 return v 163 return v
158 end, 164 end,
159 165
160 last = function(self) 166 last = function(self)
161 local v = get_list_t(self).accounting.last 167 local v = get_list_t(self).accounting.last
162 if v == nil then return nil end 168 if v == ffi.nullptr then return nil end
163 return v 169 return v
164 end, 170 end,
165 171
166 next = function(self) 172 next = function(self)
167 local v = get_list_t(self).next 173 local v = get_list_t(self).next
168 if v == nil then return nil end 174 if v == ffi.nullptr then return nil end
169 return v 175 return v
170 end, 176 end,
171 177
172 prev = function(self) 178 prev = function(self)
173 local v = get_list_t(self).prev 179 local v = get_list_t(self).prev
174 if v == nil then return nil end 180 if v == ffi.nullptr then return nil end
175 return v 181 return v
176 end 182 end
177 } 183 }
@@ -183,7 +189,7 @@ local List_Base = util.Readonly_Object:clone {
183 list = ffi.gc(list, freefunc) 189 list = ffi.gc(list, freefunc)
184 selfmt.__free = freefunc 190 selfmt.__free = freefunc
185 end 191 end
186 if list == nil then return end 192 if not list or list == ffi.nullptr then return end
187 selfmt.__eq = function(self, other) 193 selfmt.__eq = function(self, other)
188 return selfmt.__list == dgetmt(other).__list 194 return selfmt.__list == dgetmt(other).__list
189 end 195 end
@@ -194,62 +200,62 @@ local List_Base = util.Readonly_Object:clone {
194 free = function(self) 200 free = function(self)
195 self = dgetmt(self) 201 self = dgetmt(self)
196 local ffunc, l = self.__free, self.__list 202 local ffunc, l = self.__free, self.__list
197 if not ffunc or l == nil then return end 203 if not ffunc or not l or l == ffi.nullptr then return end
198 ffunc(ffi.gc(self.__list, nil)) 204 ffunc(ffi.gc(self.__list, nil))
199 end, 205 end,
200 206
201 count = function(self) 207 count = function(self)
202 self = dgetmt(self) 208 self = dgetmt(self)
203 local l = self.__list 209 local l = self.__list
204 if l == nil then return 0 end 210 if not l or l == ffi.nullptr then return 0 end
205 return #l 211 return #l
206 end, 212 end,
207 213
208 nth = function(self, n) 214 nth = function(self, n)
209 self = dgetmt(self) 215 self = dgetmt(self)
210 local l = self.__list 216 local l = self.__list
211 if l == nil then return nil end 217 if not l or l == ffi.nullptr then return nil end
212 return l:nth() 218 return l:nth()
213 end, 219 end,
214 220
215 nth_list = function(self, n) 221 nth_list = function(self, n)
216 self = dgetmt(self) 222 self = dgetmt(self)
217 local l = self.__list 223 local l = self.__list
218 if l == nil then return nil end 224 if not l or l == ffi.nullptr then return nil end
219 return self.__index(l:nth_list()) 225 return self.__index(l:nth_list())
220 end, 226 end,
221 227
222 last = function(self, n) 228 last = function(self, n)
223 self = dgetmt(self) 229 self = dgetmt(self)
224 local l = self.__list 230 local l = self.__list
225 if l == nil then return nil end 231 if not l or l == ffi.nullptr then return nil end
226 return self.__index(l:last()) 232 return self.__index(l:last())
227 end, 233 end,
228 234
229 next = function(self, n) 235 next = function(self, n)
230 self = dgetmt(self) 236 self = dgetmt(self)
231 local l = self.__list 237 local l = self.__list
232 if l == nil then return nil end 238 if not l or l == ffi.nullptr then return nil end
233 return self.__index(l:next()) 239 return self.__index(l:next())
234 end, 240 end,
235 241
236 prev = function(self, n) 242 prev = function(self, n)
237 self = dgetmt(self) 243 self = dgetmt(self)
238 local l = self.__list 244 local l = self.__list
239 if l == nil then return nil end 245 if not l or l == ffi.nullptr then return nil end
240 return self.__index(l:prev()) 246 return self.__index(l:prev())
241 end, 247 end,
242 248
243 data_get = function(self, ptr) 249 data_get = function(self, ptr)
244 self = dgetmt(self) 250 self = dgetmt(self)
245 local l = self.__list 251 local l = self.__list
246 if l == nil then return nil end 252 if not l or l == ffi.nullptr then return nil end
247 return l:data_get(ptr) 253 return l:data_get(ptr)
248 end, 254 end,
249 255
250 to_array = function(self) 256 to_array = function(self)
251 local l = dgetmt(self).__list 257 local l = dgetmt(self).__list
252 if l == nil then return {}, 0 end 258 if not l or l == ffi.nullptr then return {}, 0 end
253 local n = 0 259 local n = 0
254 local r = {} 260 local r = {}
255 while l ~= nil do 261 while l ~= nil do
@@ -293,7 +299,7 @@ M.Ptr_List = List_Base:clone {
293M.String_List = List_Base:clone { 299M.String_List = List_Base:clone {
294 data_get = function(self, ptr) 300 data_get = function(self, ptr)
295 ptr = List_Base.data_get(self, ptr) 301 ptr = List_Base.data_get(self, ptr)
296 if ptr == nil then return nil end 302 if not ptr or ptr == ffi.nullptr then return nil end
297 return ffi.string(ptr) 303 return ffi.string(ptr)
298 end 304 end
299} 305}
diff --git a/src/bindings/luajit/eina/xattr.lua b/src/bindings/luajit/eina/xattr.lua
index 192d39b85f..3e2417d194 100644
--- a/src/bindings/luajit/eina/xattr.lua
+++ b/src/bindings/luajit/eina/xattr.lua
@@ -98,7 +98,7 @@ end
98M.get = function(file, attribute) 98M.get = function(file, attribute)
99 local size = ffi.new("size_t[1]") 99 local size = ffi.new("size_t[1]")
100 local v = eina.eina_xattr_get(file, attribute, size) 100 local v = eina.eina_xattr_get(file, attribute, size)
101 if v == nil then return nil end 101 if v == ffi.nullptr then return nil end
102 local r = ffi.string(v, size[0]) 102 local r = ffi.string(v, size[0])
103 C.free(v) 103 C.free(v)
104 return r 104 return r
@@ -126,7 +126,7 @@ end
126 126
127M.string_get = function(file, attribute) 127M.string_get = function(file, attribute)
128 local v = eina.eina_xattr_string_get(file, attribute) 128 local v = eina.eina_xattr_string_get(file, attribute)
129 if v == nil then return nil end 129 if v == ffi.nullptr then return nil end
130 local r = ffi.string(v) 130 local r = ffi.string(v)
131 C.free(v) 131 C.free(v)
132 return r 132 return r
diff --git a/src/bindings/luajit/eo.lua b/src/bindings/luajit/eo.lua
index bebe733853..42531aa153 100644
--- a/src/bindings/luajit/eo.lua
+++ b/src/bindings/luajit/eo.lua
@@ -337,7 +337,7 @@ end
337 337
338local get_obj_mt = function(obj) 338local get_obj_mt = function(obj)
339 local cl = eo.eo_class_get(obj) 339 local cl = eo.eo_class_get(obj)
340 if cl == nil then return nil end 340 if cl == ffi.nullptr then return nil end
341 return classes[eo_obj_addr_get(cl)] 341 return classes[eo_obj_addr_get(cl)]
342end 342end
343 343
@@ -416,7 +416,7 @@ ffi.metatype("Eo", {
416 -- handles property getting with no keys and also properties with keys 416 -- handles property getting with no keys and also properties with keys
417 __index = function(self, key) 417 __index = function(self, key)
418 local mt = get_obj_mt(self) 418 local mt = get_obj_mt(self)
419 if mt == nil then return nil end 419 if not mt then return nil end
420 local pt = mt.__properties 420 local pt = mt.__properties
421 local pp = pt[key] 421 local pp = pt[key]
422 if not pp then 422 if not pp then
@@ -444,7 +444,7 @@ ffi.metatype("Eo", {
444 -- handles property setting with no keys 444 -- handles property setting with no keys
445 __newindex = function(self, key, val) 445 __newindex = function(self, key, val)
446 local mt = get_obj_mt(self) 446 local mt = get_obj_mt(self)
447 if mt == nil then return nil end 447 if not mt then return nil end
448 local pt = mt.__properties 448 local pt = mt.__properties
449 local pp = pt[key] 449 local pp = pt[key]
450 if not pp then 450 if not pp then
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 93499df6a5..7bd8f96894 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -556,7 +556,7 @@ local object_idx, wrap_object = gen_wrap {
556 556
557 unit_get = function(self) 557 unit_get = function(self)
558 local v = eolian.eolian_object_unit_get(cast_obj(self)) 558 local v = eolian.eolian_object_unit_get(cast_obj(self))
559 if v == nil then 559 if v == ffi.nullptr then
560 return nil 560 return nil
561 end 561 end
562 return v 562 return v
@@ -572,7 +572,7 @@ local object_idx, wrap_object = gen_wrap {
572 572
573 file_get = function(self) 573 file_get = function(self)
574 local v = eolian.eolian_object_file_get(cast_obj(self)) 574 local v = eolian.eolian_object_file_get(cast_obj(self))
575 if v == nil then 575 if v == ffi.nullptr then
576 return nil 576 return nil
577 end 577 end
578 return ffi.string(v) 578 return ffi.string(v)
@@ -580,7 +580,7 @@ local object_idx, wrap_object = gen_wrap {
580 580
581 name_get = function(self) 581 name_get = function(self)
582 local v = eolian.eolian_object_name_get(cast_obj(self)) 582 local v = eolian.eolian_object_name_get(cast_obj(self))
583 if v == nil then 583 if v == ffi.nullptr then
584 return nil 584 return nil
585 end 585 end
586 return ffi.string(v) 586 return ffi.string(v)
@@ -588,7 +588,7 @@ local object_idx, wrap_object = gen_wrap {
588 588
589 c_name_get = function(self) 589 c_name_get = function(self)
590 local v = eolian.eolian_object_c_name_get(cast_obj(self)) 590 local v = eolian.eolian_object_c_name_get(cast_obj(self))
591 if v == nil then 591 if v == ffi.nullptr then
592 return nil 592 return nil
593 end 593 end
594 return ffi.string(v) 594 return ffi.string(v)
@@ -596,7 +596,7 @@ local object_idx, wrap_object = gen_wrap {
596 596
597 short_name_get = function(self) 597 short_name_get = function(self)
598 local v = eolian.eolian_object_short_name_get(cast_obj(self)) 598 local v = eolian.eolian_object_short_name_get(cast_obj(self))
599 if v == nil then 599 if v == ffi.nullptr then
600 return nil 600 return nil
601 end 601 end
602 return ffi.string(v) 602 return ffi.string(v)
@@ -617,7 +617,7 @@ ffi.metatype("Eolian_Object", { __index = object_idx })
617local unit_idx, wrap_unit = gen_wrap { 617local unit_idx, wrap_unit = gen_wrap {
618 state_get = function(self) 618 state_get = function(self)
619 local v = eolian.eolian_unit_state_get(cast_unit(self)) 619 local v = eolian.eolian_unit_state_get(cast_unit(self))
620 if v == nil then return nil end 620 if v == ffi.nullptr then return nil end
621 return v 621 return v
622 end, 622 end,
623 623
@@ -628,13 +628,13 @@ local unit_idx, wrap_unit = gen_wrap {
628 628
629 file_get = function(self) 629 file_get = function(self)
630 local v = eolian.eolian_unit_file_get(cast_unit(self)) 630 local v = eolian.eolian_unit_file_get(cast_unit(self))
631 if v == nil then return nil end 631 if v == ffi.nullptr then return nil end
632 return ffi.string(v) 632 return ffi.string(v)
633 end, 633 end,
634 634
635 file_path_get = function(self) 635 file_path_get = function(self)
636 local v = eolian.eolian_unit_file_path_get(cast_unit(self)) 636 local v = eolian.eolian_unit_file_path_get(cast_unit(self))
637 if v == nil then return nil end 637 if v == ffi.nullptr then return nil end
638 return ffi.string(v) 638 return ffi.string(v)
639 end, 639 end,
640 640
@@ -644,7 +644,7 @@ local unit_idx, wrap_unit = gen_wrap {
644 644
645 object_by_name_get = function(self, name) 645 object_by_name_get = function(self, name)
646 local v = eolian.eolian_unit_object_by_name_get(cast_unit(self), name) 646 local v = eolian.eolian_unit_object_by_name_get(cast_unit(self), name)
647 if v == nil then return nil end 647 if v == ffi.nullptr then return nil end
648 return v 648 return v
649 end, 649 end,
650 650
@@ -655,7 +655,7 @@ local unit_idx, wrap_unit = gen_wrap {
655 655
656 class_by_name_get = function(self, cname) 656 class_by_name_get = function(self, cname)
657 local v = eolian.eolian_unit_class_by_name_get(cast_unit(self), cname) 657 local v = eolian.eolian_unit_class_by_name_get(cast_unit(self), cname)
658 if v == nil then return nil end 658 if v == ffi.nullptr then return nil end
659 return v 659 return v
660 end, 660 end,
661 661
@@ -666,13 +666,13 @@ local unit_idx, wrap_unit = gen_wrap {
666 666
667 constant_by_name_get = function(self, name) 667 constant_by_name_get = function(self, name)
668 local v = eolian.eolian_unit_constant_by_name_get(cast_unit(self), name) 668 local v = eolian.eolian_unit_constant_by_name_get(cast_unit(self), name)
669 if v == nil then return nil end 669 if v == ffi.nullptr then return nil end
670 return v 670 return v
671 end, 671 end,
672 672
673 error_by_name_get = function(self, name) 673 error_by_name_get = function(self, name)
674 local v = eolian.eolian_unit_error_by_name_get(cast_unit(self), name) 674 local v = eolian.eolian_unit_error_by_name_get(cast_unit(self), name)
675 if v == nil then return nil end 675 if v == ffi.nullptr then return nil end
676 return v 676 return v
677 end, 677 end,
678 678
@@ -688,19 +688,19 @@ local unit_idx, wrap_unit = gen_wrap {
688 688
689 alias_by_name_get = function(self, name) 689 alias_by_name_get = function(self, name)
690 local v = eolian.eolian_unit_alias_by_name_get(cast_unit(self), name) 690 local v = eolian.eolian_unit_alias_by_name_get(cast_unit(self), name)
691 if v == nil then return nil end 691 if v == ffi.nullptr then return nil end
692 return v 692 return v
693 end, 693 end,
694 694
695 struct_by_name_get = function(self, name) 695 struct_by_name_get = function(self, name)
696 local v = eolian.eolian_unit_struct_by_name_get(cast_unit(self), name) 696 local v = eolian.eolian_unit_struct_by_name_get(cast_unit(self), name)
697 if v == nil then return nil end 697 if v == ffi.nullptr then return nil end
698 return v 698 return v
699 end, 699 end,
700 700
701 enum_by_name_get = function(self, name) 701 enum_by_name_get = function(self, name)
702 local v = eolian.eolian_unit_enum_by_name_get(cast_unit(self), name) 702 local v = eolian.eolian_unit_enum_by_name_get(cast_unit(self), name)
703 if v == nil then return nil end 703 if v == ffi.nullptr then return nil end
704 return v 704 return v
705 end, 705 end,
706 706
@@ -769,7 +769,7 @@ ffi.metatype("Eolian_State", {
769 769
770 file_parse = function(self, fname) 770 file_parse = function(self, fname)
771 local v = eolian.eolian_state_file_parse(self, fname) 771 local v = eolian.eolian_state_file_parse(self, fname)
772 if v == nil then 772 if v == ffi.nullptr then
773 return nil 773 return nil
774 end 774 end
775 return v 775 return v
@@ -777,7 +777,7 @@ ffi.metatype("Eolian_State", {
777 777
778 file_path_parse = function(self, fpath) 778 file_path_parse = function(self, fpath)
779 local v = eolian.eolian_state_file_path_parse(self, fpath) 779 local v = eolian.eolian_state_file_path_parse(self, fpath)
780 if v == nil then 780 if v == ffi.nullptr then
781 return nil 781 return nil
782 end 782 end
783 return v 783 return v
@@ -817,7 +817,7 @@ ffi.metatype("Eolian_State", {
817 817
818 unit_by_file_get = function(self, fname) 818 unit_by_file_get = function(self, fname)
819 local v = eolian.eolian_state_unit_by_file_get(state, fname) 819 local v = eolian.eolian_state_unit_by_file_get(state, fname)
820 if v == nil then 820 if v == ffi.nullptr then
821 return nil 821 return nil
822 end 822 end
823 return v 823 return v
@@ -835,7 +835,7 @@ ffi.metatype("Eolian_State", {
835 835
836 class_by_file_get = function(self, fname) 836 class_by_file_get = function(self, fname)
837 local v = eolian.eolian_state_class_by_file_get(self, fname) 837 local v = eolian.eolian_state_class_by_file_get(self, fname)
838 if v == nil then return nil end 838 if v == ffi.nullptr then return nil end
839 return v 839 return v
840 end, 840 end,
841 841
@@ -961,13 +961,13 @@ ffi.metatype("Eolian_Struct_Type_Field", {
961 __index = wrap_object { 961 __index = wrap_object {
962 documentation_get = function(self) 962 documentation_get = function(self)
963 local v = eolian.eolian_typedecl_struct_field_documentation_get(self) 963 local v = eolian.eolian_typedecl_struct_field_documentation_get(self)
964 if v == nil then return nil end 964 if v == ffi.nullptr then return nil end
965 return v 965 return v
966 end, 966 end,
967 967
968 type_get = function(self) 968 type_get = function(self)
969 local v = eolian.eolian_typedecl_struct_field_type_get(self) 969 local v = eolian.eolian_typedecl_struct_field_type_get(self)
970 if v == nil then return nil end 970 if v == ffi.nullptr then return nil end
971 return v 971 return v
972 end, 972 end,
973 973
@@ -985,19 +985,19 @@ ffi.metatype("Eolian_Enum_Type_Field", {
985 __index = wrap_object { 985 __index = wrap_object {
986 c_name_get = function(self) 986 c_name_get = function(self)
987 local v = eolian.eolian_typedecl_enum_field_c_constant_get(self) 987 local v = eolian.eolian_typedecl_enum_field_c_constant_get(self)
988 if v == nil then return nil end 988 if v == ffi.nullptr then return nil end
989 return ffi_stringshare(v) 989 return ffi_stringshare(v)
990 end, 990 end,
991 991
992 documentation_get = function(self) 992 documentation_get = function(self)
993 local v = eolian.eolian_typedecl_enum_field_documentation_get(self) 993 local v = eolian.eolian_typedecl_enum_field_documentation_get(self)
994 if v == nil then return nil end 994 if v == ffi.nullptr then return nil end
995 return v 995 return v
996 end, 996 end,
997 997
998 value_get = function(self, force) 998 value_get = function(self, force)
999 local v = eolian.eolian_typedecl_enum_field_value_get(self, force and 1 or 0) 999 local v = eolian.eolian_typedecl_enum_field_value_get(self, force and 1 or 0)
1000 if v == nil then return nil end 1000 if v == ffi.nullptr then return nil end
1001 return v 1001 return v
1002 end 1002 end
1003 } 1003 }
@@ -1016,7 +1016,7 @@ M.Typedecl = ffi.metatype("Eolian_Typedecl", {
1016 1016
1017 struct_field_get = function(self, name) 1017 struct_field_get = function(self, name)
1018 local v = eolian.eolian_typedecl_struct_field_get(self, name) 1018 local v = eolian.eolian_typedecl_struct_field_get(self, name)
1019 if v == nil then return nil end 1019 if v == ffi.nullptr then return nil end
1020 return v 1020 return v
1021 end, 1021 end,
1022 1022
@@ -1027,31 +1027,31 @@ M.Typedecl = ffi.metatype("Eolian_Typedecl", {
1027 1027
1028 enum_field_get = function(self, field) 1028 enum_field_get = function(self, field)
1029 local v = eolian.eolian_typedecl_enum_field_get(self, field) 1029 local v = eolian.eolian_typedecl_enum_field_get(self, field)
1030 if v == nil then return nil end 1030 if v == ffi.nullptr then return nil end
1031 return v 1031 return v
1032 end, 1032 end,
1033 1033
1034 enum_legacy_prefix_get = function(self) 1034 enum_legacy_prefix_get = function(self)
1035 local v = eolian.eolian_typedecl_enum_legacy_prefix_get(self) 1035 local v = eolian.eolian_typedecl_enum_legacy_prefix_get(self)
1036 if v == nil then return nil end 1036 if v == ffi.nullptr then return nil end
1037 return ffi.string(v) 1037 return ffi.string(v)
1038 end, 1038 end,
1039 1039
1040 documentation_get = function(self, name) 1040 documentation_get = function(self, name)
1041 local v = eolian.eolian_typedecl_documentation_get(self) 1041 local v = eolian.eolian_typedecl_documentation_get(self)
1042 if v == nil then return nil end 1042 if v == ffi.nullptr then return nil end
1043 return v 1043 return v
1044 end, 1044 end,
1045 1045
1046 base_type_get = function(self) 1046 base_type_get = function(self)
1047 local v = eolian.eolian_typedecl_base_type_get(self) 1047 local v = eolian.eolian_typedecl_base_type_get(self)
1048 if v == nil then return nil end 1048 if v == ffi.nullptr then return nil end
1049 return v 1049 return v
1050 end, 1050 end,
1051 1051
1052 aliased_base_get = function(self) 1052 aliased_base_get = function(self)
1053 local v = eolian.eolian_typedecl_aliased_byse_get(self) 1053 local v = eolian.eolian_typedecl_aliased_byse_get(self)
1054 if v == nil then return nil end 1054 if v == ffi.nullptr then return nil end
1055 return v 1055 return v
1056 end, 1056 end,
1057 1057
@@ -1061,19 +1061,19 @@ M.Typedecl = ffi.metatype("Eolian_Typedecl", {
1061 1061
1062 c_type_get = function(self) 1062 c_type_get = function(self)
1063 local v = eolian.eolian_typedecl_c_type_get(self) 1063 local v = eolian.eolian_typedecl_c_type_get(self)
1064 if v == nil then return nil end 1064 if v == ffi.nullptr then return nil end
1065 return ffi_stringshare(v) 1065 return ffi_stringshare(v)
1066 end, 1066 end,
1067 1067
1068 free_func_get = function(self) 1068 free_func_get = function(self)
1069 local v = eolian.eolian_typedecl_free_func_get(self) 1069 local v = eolian.eolian_typedecl_free_func_get(self)
1070 if v == nil then return nil end 1070 if v == ffi.nullptr then return nil end
1071 return ffi.string(v) 1071 return ffi.string(v)
1072 end, 1072 end,
1073 1073
1074 function_pointer_get = function(self) 1074 function_pointer_get = function(self)
1075 local v = eolian.eolian_typedecl_function_pointer_get(self) 1075 local v = eolian.eolian_typedecl_function_pointer_get(self)
1076 if v == nil then return nil end 1076 if v == ffi.nullptr then return nil end
1077 return v 1077 return v
1078 end 1078 end
1079 } 1079 }
@@ -1091,37 +1091,37 @@ M.Type = ffi.metatype("Eolian_Type", {
1091 1091
1092 base_type_get = function(self) 1092 base_type_get = function(self)
1093 local v = eolian.eolian_type_base_type_get(self) 1093 local v = eolian.eolian_type_base_type_get(self)
1094 if v == nil then return nil end 1094 if v == ffi.nullptr then return nil end
1095 return v 1095 return v
1096 end, 1096 end,
1097 1097
1098 next_type_get = function(self) 1098 next_type_get = function(self)
1099 local v = eolian.eolian_type_next_type_get(self) 1099 local v = eolian.eolian_type_next_type_get(self)
1100 if v == nil then return nil end 1100 if v == ffi.nullptr then return nil end
1101 return v 1101 return v
1102 end, 1102 end,
1103 1103
1104 typedecl_get = function(self) 1104 typedecl_get = function(self)
1105 local v = eolian.eolian_type_typedecl_get(self) 1105 local v = eolian.eolian_type_typedecl_get(self)
1106 if v == nil then return nil end 1106 if v == ffi.nullptr then return nil end
1107 return v 1107 return v
1108 end, 1108 end,
1109 1109
1110 aliased_base_get = function(self) 1110 aliased_base_get = function(self)
1111 local v = eolian.eolian_type_aliased_byse_get(self) 1111 local v = eolian.eolian_type_aliased_byse_get(self)
1112 if v == nil then return nil end 1112 if v == ffi.nullptr then return nil end
1113 return v 1113 return v
1114 end, 1114 end,
1115 1115
1116 class_get = function(self) 1116 class_get = function(self)
1117 local v = eolian.eolian_type_class_get(self) 1117 local v = eolian.eolian_type_class_get(self)
1118 if v == nil then return nil end 1118 if v == ffi.nullptr then return nil end
1119 return v 1119 return v
1120 end, 1120 end,
1121 1121
1122 error_get = function(self) 1122 error_get = function(self)
1123 local v = eolian.eolian_type_error_get(self) 1123 local v = eolian.eolian_type_error_get(self)
1124 if v == nil then return nil end 1124 if v == ffi.nullptr then return nil end
1125 return v 1125 return v
1126 end, 1126 end,
1127 1127
@@ -1139,7 +1139,7 @@ M.Type = ffi.metatype("Eolian_Type", {
1139 1139
1140 c_type_get = function(self) 1140 c_type_get = function(self)
1141 local v = eolian.eolian_type_c_type_get(self) 1141 local v = eolian.eolian_type_c_type_get(self)
1142 if v == nil then return nil end 1142 if v == ffi.nullptr then return nil end
1143 return ffi_stringshare(v) 1143 return ffi_stringshare(v)
1144 end 1144 end
1145 } 1145 }
@@ -1166,13 +1166,13 @@ M.Function = ffi.metatype("Eolian_Function", {
1166 1166
1167 full_c_name_get = function(self, ftype) 1167 full_c_name_get = function(self, ftype)
1168 local v = eolian.eolian_function_full_c_name_get(self, ftype) 1168 local v = eolian.eolian_function_full_c_name_get(self, ftype)
1169 if v == nil then return nil end 1169 if v == ffi.nullptr then return nil end
1170 return ffi_stringshare(v) 1170 return ffi_stringshare(v)
1171 end, 1171 end,
1172 1172
1173 implement_get = function(self) 1173 implement_get = function(self)
1174 local v = eolian.eolian_function_implement_get(self) 1174 local v = eolian.eolian_function_implement_get(self)
1175 if v == nil then return nil end 1175 if v == ffi.nullptr then return nil end
1176 return v 1176 return v
1177 end, 1177 end,
1178 1178
@@ -1205,19 +1205,19 @@ M.Function = ffi.metatype("Eolian_Function", {
1205 1205
1206 return_type_get = function(self, ftype) 1206 return_type_get = function(self, ftype)
1207 local v = eolian.eolian_function_return_type_get(self, ftype) 1207 local v = eolian.eolian_function_return_type_get(self, ftype)
1208 if v == nil then return nil end 1208 if v == ffi.nullptr then return nil end
1209 return v 1209 return v
1210 end, 1210 end,
1211 1211
1212 return_default_value_get = function(self, ftype) 1212 return_default_value_get = function(self, ftype)
1213 local v = eolian.eolian_function_return_default_value_get(self, ftype) 1213 local v = eolian.eolian_function_return_default_value_get(self, ftype)
1214 if v == nil then return nil end 1214 if v == ffi.nullptr then return nil end
1215 return v 1215 return v
1216 end, 1216 end,
1217 1217
1218 return_documentation_get = function(self, ftype) 1218 return_documentation_get = function(self, ftype)
1219 local v = eolian.eolian_function_return_documentation_get(self, ftype) 1219 local v = eolian.eolian_function_return_documentation_get(self, ftype)
1220 if v == nil then return nil end 1220 if v == ffi.nullptr then return nil end
1221 return v 1221 return v
1222 end, 1222 end,
1223 1223
@@ -1240,7 +1240,7 @@ M.Function = ffi.metatype("Eolian_Function", {
1240 1240
1241 class_get = function(self) 1241 class_get = function(self)
1242 local v = eolian.eolian_function_class_get(self) 1242 local v = eolian.eolian_function_class_get(self)
1243 if v == nil then return nil end 1243 if v == ffi.nullptr then return nil end
1244 return v 1244 return v
1245 end 1245 end
1246 } 1246 }
@@ -1261,19 +1261,19 @@ ffi.metatype("Eolian_Function_Parameter", {
1261 1261
1262 type_get = function(self) 1262 type_get = function(self)
1263 local v = eolian.eolian_parameter_type_get(self) 1263 local v = eolian.eolian_parameter_type_get(self)
1264 if v == nil then return nil end 1264 if v == ffi.nullptr then return nil end
1265 return v 1265 return v
1266 end, 1266 end,
1267 1267
1268 default_value_get = function(self) 1268 default_value_get = function(self)
1269 local v = eolian.eolian_parameter_default_value_get(self) 1269 local v = eolian.eolian_parameter_default_value_get(self)
1270 if v == nil then return nil end 1270 if v == ffi.nullptr then return nil end
1271 return v 1271 return v
1272 end, 1272 end,
1273 1273
1274 documentation_get = function(self) 1274 documentation_get = function(self)
1275 local v = eolian.eolian_parameter_documentation_get(self) 1275 local v = eolian.eolian_parameter_documentation_get(self)
1276 if v == nil then return nil end 1276 if v == ffi.nullptr then return nil end
1277 return v 1277 return v
1278 end, 1278 end,
1279 1279
@@ -1295,26 +1295,26 @@ ffi.metatype("Eolian_Implement", {
1295 __index = wrap_object { 1295 __index = wrap_object {
1296 class_get = function(self) 1296 class_get = function(self)
1297 local v = eolian.eolian_implement_class_get(self) 1297 local v = eolian.eolian_implement_class_get(self)
1298 if v == nil then return nil end 1298 if v == ffi.nullptr then return nil end
1299 return v 1299 return v
1300 end, 1300 end,
1301 1301
1302 implementing_class_get = function(self) 1302 implementing_class_get = function(self)
1303 local v = eolian.eolian_implement_implementing_class_get(self) 1303 local v = eolian.eolian_implement_implementing_class_get(self)
1304 if v == nil then return nil end 1304 if v == ffi.nullptr then return nil end
1305 return v 1305 return v
1306 end, 1306 end,
1307 1307
1308 function_get = function(self) 1308 function_get = function(self)
1309 local tp = ffi.new("Eolian_Function_Type[1]") 1309 local tp = ffi.new("Eolian_Function_Type[1]")
1310 local v = eolian.eolian_implement_function_get(self, tp) 1310 local v = eolian.eolian_implement_function_get(self, tp)
1311 if v == nil then return nil end 1311 if v == ffi.nullptr then return nil end
1312 return v, tp[0] 1312 return v, tp[0]
1313 end, 1313 end,
1314 1314
1315 documentation_get = function(self, ftype) 1315 documentation_get = function(self, ftype)
1316 local v = eolian.eolian_implement_documentation_get(self, ftype) 1316 local v = eolian.eolian_implement_documentation_get(self, ftype)
1317 if v == nil then return nil end 1317 if v == ffi.nullptr then return nil end
1318 return v 1318 return v
1319 end, 1319 end,
1320 1320
@@ -1344,13 +1344,13 @@ ffi.metatype("Eolian_Constructor", {
1344 __index = wrap_object { 1344 __index = wrap_object {
1345 class_get = function(self) 1345 class_get = function(self)
1346 local v = eolian.eolian_constructor_class_get(self) 1346 local v = eolian.eolian_constructor_class_get(self)
1347 if v == nil then return nil end 1347 if v == ffi.nullptr then return nil end
1348 return v 1348 return v
1349 end, 1349 end,
1350 1350
1351 function_get = function(self) 1351 function_get = function(self)
1352 local v = eolian.eolian_constructor_function_get(self) 1352 local v = eolian.eolian_constructor_function_get(self)
1353 if v == nil then return nil end 1353 if v == ffi.nullptr then return nil end
1354 return v 1354 return v
1355 end, 1355 end,
1356 1356
@@ -1364,19 +1364,19 @@ ffi.metatype("Eolian_Event", {
1364 __index = wrap_object { 1364 __index = wrap_object {
1365 type_get = function(self) 1365 type_get = function(self)
1366 local v = eolian.eolian_event_type_get(self) 1366 local v = eolian.eolian_event_type_get(self)
1367 if v == nil then return nil end 1367 if v == ffi.nullptr then return nil end
1368 return v 1368 return v
1369 end, 1369 end,
1370 1370
1371 class_get = function(self) 1371 class_get = function(self)
1372 local v = eolian.eolian_event_class_get(self) 1372 local v = eolian.eolian_event_class_get(self)
1373 if v == nil then return nil end 1373 if v == ffi.nullptr then return nil end
1374 return v 1374 return v
1375 end, 1375 end,
1376 1376
1377 documentation_get = function(self) 1377 documentation_get = function(self)
1378 local v = eolian.eolian_event_documentation_get(self) 1378 local v = eolian.eolian_event_documentation_get(self)
1379 if v == nil then return nil end 1379 if v == ffi.nullptr then return nil end
1380 return v 1380 return v
1381 end, 1381 end,
1382 1382
@@ -1386,7 +1386,7 @@ ffi.metatype("Eolian_Event", {
1386 1386
1387 c_macro_get = function(self) 1387 c_macro_get = function(self)
1388 local v = eolian.eolian_event_c_macro_get(self) 1388 local v = eolian.eolian_event_c_macro_get(self)
1389 if v == nil then return nil end 1389 if v == ffi.nullptr then return nil end
1390 return ffi_stringshare(v) 1390 return ffi_stringshare(v)
1391 end, 1391 end,
1392 1392
@@ -1404,13 +1404,13 @@ ffi.metatype("Eolian_Part", {
1404 __index = wrap_object { 1404 __index = wrap_object {
1405 class_get = function(self) 1405 class_get = function(self)
1406 local v = eolian.eolian_part_class_get(self) 1406 local v = eolian.eolian_part_class_get(self)
1407 if v == nil then return nil end 1407 if v == ffi.nullptr then return nil end
1408 return v 1408 return v
1409 end, 1409 end,
1410 1410
1411 documentation_get = function(self) 1411 documentation_get = function(self)
1412 local v = eolian.eolian_part_documentation_get(self) 1412 local v = eolian.eolian_part_documentation_get(self)
1413 if v == nil then return nil end 1413 if v == ffi.nullptr then return nil end
1414 return v 1414 return v
1415 end 1415 end
1416 } 1416 }
@@ -1432,13 +1432,13 @@ M.Class = ffi.metatype("Eolian_Class", {
1432 1432
1433 documentation_get = function(self) 1433 documentation_get = function(self)
1434 local v = eolian.eolian_class_documentation_get(self) 1434 local v = eolian.eolian_class_documentation_get(self)
1435 if v == nil then return nil end 1435 if v == ffi.nullptr then return nil end
1436 return v 1436 return v
1437 end, 1437 end,
1438 1438
1439 c_prefix_get = function(self) 1439 c_prefix_get = function(self)
1440 local v = eolian.eolian_class_c_prefix_get(self) 1440 local v = eolian.eolian_class_c_prefix_get(self)
1441 if v == nil then 1441 if v == ffi.nullptr then
1442 local buf = self:namespaces_get() 1442 local buf = self:namespaces_get()
1443 buf[#buf + 1] = self:short_name_get() 1443 buf[#buf + 1] = self:short_name_get()
1444 return table.concat(buf, "_"):lower() 1444 return table.concat(buf, "_"):lower()
@@ -1448,7 +1448,7 @@ M.Class = ffi.metatype("Eolian_Class", {
1448 1448
1449 event_c_prefix_get = function(self) 1449 event_c_prefix_get = function(self)
1450 local v = eolian.eolian_class_event_c_prefix_get(self) 1450 local v = eolian.eolian_class_event_c_prefix_get(self)
1451 if v == nil then 1451 if v == ffi.nullptr then
1452 return self:c_prefix_get() 1452 return self:c_prefix_get()
1453 end 1453 end
1454 return ffi.string(v) 1454 return ffi.string(v)
@@ -1456,13 +1456,13 @@ M.Class = ffi.metatype("Eolian_Class", {
1456 1456
1457 data_type_get = function(self) 1457 data_type_get = function(self)
1458 local v = eolian.eolian_class_data_type_get(self) 1458 local v = eolian.eolian_class_data_type_get(self)
1459 if v == nil then return nil end 1459 if v == ffi.nullptr then return nil end
1460 return ffi.string(v) 1460 return ffi.string(v)
1461 end, 1461 end,
1462 1462
1463 parent_get = function(self) 1463 parent_get = function(self)
1464 local v = eolian.eolian_class_parent_get(self) 1464 local v = eolian.eolian_class_parent_get(self)
1465 if v == nil then return nil end 1465 if v == ffi.nullptr then return nil end
1466 return v 1466 return v
1467 end, 1467 end,
1468 1468
@@ -1484,7 +1484,7 @@ M.Class = ffi.metatype("Eolian_Class", {
1484 function_by_name_get = function(self, fname, ftype) 1484 function_by_name_get = function(self, fname, ftype)
1485 local v = eolian.eolian_class_function_by_name_get(self, fname, 1485 local v = eolian.eolian_class_function_by_name_get(self, fname,
1486 ftype) 1486 ftype)
1487 if v == nil then return nil end 1487 if v == ffi.nullptr then return nil end
1488 return v 1488 return v
1489 end, 1489 end,
1490 1490
@@ -1505,7 +1505,7 @@ M.Class = ffi.metatype("Eolian_Class", {
1505 1505
1506 event_by_name_get = function(self, name) 1506 event_by_name_get = function(self, name)
1507 local v = eolian.eolian_class_event_by_name_get(self, name) 1507 local v = eolian.eolian_class_event_by_name_get(self, name)
1508 if v == nil then return nil end 1508 if v == ffi.nullptr then return nil end
1509 return v 1509 return v
1510 end, 1510 end,
1511 1511
@@ -1524,19 +1524,19 @@ M.Class = ffi.metatype("Eolian_Class", {
1524 1524
1525 c_get_function_name_get = function(self) 1525 c_get_function_name_get = function(self)
1526 local v = eolian.eolian_class_c_get_function_name_get(self) 1526 local v = eolian.eolian_class_c_get_function_name_get(self)
1527 if v == nil then return nil end 1527 if v == ffi.nullptr then return nil end
1528 return ffi_stringshare(v) 1528 return ffi_stringshare(v)
1529 end, 1529 end,
1530 1530
1531 c_macro_get = function(self) 1531 c_macro_get = function(self)
1532 local v = eolian.eolian_class_c_macro_get(self) 1532 local v = eolian.eolian_class_c_macro_get(self)
1533 if v == nil then return nil end 1533 if v == ffi.nullptr then return nil end
1534 return ffi_stringshare(v) 1534 return ffi_stringshare(v)
1535 end, 1535 end,
1536 1536
1537 c_data_type_get = function(self) 1537 c_data_type_get = function(self)
1538 local v = eolian.eolian_class_c_data_type_get(self) 1538 local v = eolian.eolian_class_c_data_type_get(self)
1539 if v == nil then return nil end 1539 if v == ffi.nullptr then return nil end
1540 return ffi_stringshare(v) 1540 return ffi_stringshare(v)
1541 end 1541 end
1542 } 1542 }
@@ -1611,7 +1611,7 @@ M.Value = ffi.metatype("Eolian_Value", {
1611 1611
1612 to_literal = function(self) 1612 to_literal = function(self)
1613 local v = eolian.eolian_expression_value_to_literal(self) 1613 local v = eolian.eolian_expression_value_to_literal(self)
1614 if v == nil then return nil end 1614 if v == ffi.nullptr then return nil end
1615 return ffi_stringshare(v) 1615 return ffi_stringshare(v)
1616 end 1616 end
1617 } 1617 }
@@ -1658,13 +1658,13 @@ M.Expression = ffi.metatype("Eolian_Expression", {
1658 eval = function(self, mask) 1658 eval = function(self, mask)
1659 mask = mask or emask.ALL 1659 mask = mask or emask.ALL
1660 local v = eolian.eolian_expression_eval(self, mask) 1660 local v = eolian.eolian_expression_eval(self, mask)
1661 if v == nil then return nil end 1661 if v == ffi.nullptr then return nil end
1662 return ffi.cast("Eolian_Value*", v) 1662 return ffi.cast("Eolian_Value*", v)
1663 end, 1663 end,
1664 1664
1665 serialize = function(self) 1665 serialize = function(self)
1666 local v = eolian.eolian_expression_serialize(self) 1666 local v = eolian.eolian_expression_serialize(self)
1667 if v == nil then return nil end 1667 if v == ffi.nullptr then return nil end
1668 return ffi_stringshare(v) 1668 return ffi_stringshare(v)
1669 end, 1669 end,
1670 1670
@@ -1678,13 +1678,13 @@ M.Expression = ffi.metatype("Eolian_Expression", {
1678 1678
1679 binary_lhs_get = function(self) 1679 binary_lhs_get = function(self)
1680 local v = eolian.eolian_expression_binary_lhs_get(self) 1680 local v = eolian.eolian_expression_binary_lhs_get(self)
1681 if v == nil then return nil end 1681 if v == ffi.nullptr then return nil end
1682 return v 1682 return v
1683 end, 1683 end,
1684 1684
1685 binary_rhs_get = function(self) 1685 binary_rhs_get = function(self)
1686 local v = eolian.eolian_expression_binary_rhs_get(self) 1686 local v = eolian.eolian_expression_binary_rhs_get(self)
1687 if v == nil then return nil end 1687 if v == ffi.nullptr then return nil end
1688 return v 1688 return v
1689 end, 1689 end,
1690 1690
@@ -1694,13 +1694,13 @@ M.Expression = ffi.metatype("Eolian_Expression", {
1694 1694
1695 unary_expression_get = function(self) 1695 unary_expression_get = function(self)
1696 local v = eolian.eolian_expression_unary_expression_get(self) 1696 local v = eolian.eolian_expression_unary_expression_get(self)
1697 if v == nil then return nil end 1697 if v == ffi.nullptr then return nil end
1698 return v 1698 return v
1699 end, 1699 end,
1700 1700
1701 value_get = function(self) 1701 value_get = function(self)
1702 local v = eolian.eolian_expression_value_get(self) 1702 local v = eolian.eolian_expression_value_get(self)
1703 if v == nil then return nil end 1703 if v == ffi.nullptr then return nil end
1704 return ffi.cast("Eolian_Value*", v) 1704 return ffi.cast("Eolian_Value*", v)
1705 end 1705 end
1706 } 1706 }
@@ -1710,19 +1710,19 @@ M.Constant = ffi.metatype("Eolian_Constant", {
1710 __index = wrap_object { 1710 __index = wrap_object {
1711 documentation_get = function(self) 1711 documentation_get = function(self)
1712 local v = eolian.eolian_constant_documentation_get(self) 1712 local v = eolian.eolian_constant_documentation_get(self)
1713 if v == nil then return nil end 1713 if v == ffi.nullptr then return nil end
1714 return v 1714 return v
1715 end, 1715 end,
1716 1716
1717 type_get = function(self) 1717 type_get = function(self)
1718 local v = eolian.eolian_constant_type_get(self) 1718 local v = eolian.eolian_constant_type_get(self)
1719 if v == nil then return nil end 1719 if v == ffi.nullptr then return nil end
1720 return v 1720 return v
1721 end, 1721 end,
1722 1722
1723 value_get = function(self) 1723 value_get = function(self)
1724 local v = eolian.eolian_constant_value_get(self) 1724 local v = eolian.eolian_constant_value_get(self)
1725 if v == nil then return nil end 1725 if v == ffi.nullptr then return nil end
1726 return v 1726 return v
1727 end, 1727 end,
1728 1728
@@ -1736,13 +1736,13 @@ M.Error = ffi.metatype("Eolian_Error", {
1736 __index = wrap_object { 1736 __index = wrap_object {
1737 documentation_get = function(self) 1737 documentation_get = function(self)
1738 local v = eolian.eolian_error_documentation_get(self) 1738 local v = eolian.eolian_error_documentation_get(self)
1739 if v == nil then return nil end 1739 if v == ffi.nullptr then return nil end
1740 return v 1740 return v
1741 end, 1741 end,
1742 1742
1743 message_get = function(self) 1743 message_get = function(self)
1744 local v = eolian.eolian_error_message_get(self) 1744 local v = eolian.eolian_error_message_get(self)
1745 if v == nil then return nil end 1745 if v == ffi.nullptr then return nil end
1746 return ffi.string(v) 1746 return ffi.string(v)
1747 end, 1747 end,
1748 1748
@@ -1756,19 +1756,19 @@ M.Documentation = ffi.metatype("Eolian_Documentation", {
1756 __index = wrap_object { 1756 __index = wrap_object {
1757 summary_get = function(self) 1757 summary_get = function(self)
1758 local v = eolian.eolian_documentation_summary_get(self) 1758 local v = eolian.eolian_documentation_summary_get(self)
1759 if v == nil then return nil end 1759 if v == ffi.nullptr then return nil end
1760 return ffi.string(v) 1760 return ffi.string(v)
1761 end, 1761 end,
1762 1762
1763 description_get = function(self) 1763 description_get = function(self)
1764 local v = eolian.eolian_documentation_description_get(self) 1764 local v = eolian.eolian_documentation_description_get(self)
1765 if v == nil then return nil end 1765 if v == ffi.nullptr then return nil end
1766 return ffi.string(v) 1766 return ffi.string(v)
1767 end, 1767 end,
1768 1768
1769 since_get = function(self) 1769 since_get = function(self)
1770 local v = eolian.eolian_documentation_since_get(self) 1770 local v = eolian.eolian_documentation_since_get(self)
1771 if v == nil then return nil end 1771 if v == ffi.nullptr then return nil end
1772 return ffi.string(v) 1772 return ffi.string(v)
1773 end 1773 end
1774 } 1774 }
@@ -1807,7 +1807,7 @@ end
1807 1807
1808M.documentation_tokenize = function(doc, ret) 1808M.documentation_tokenize = function(doc, ret)
1809 local ret = eolian.eolian_documentation_tokenize(doc, ret) 1809 local ret = eolian.eolian_documentation_tokenize(doc, ret)
1810 if ret == nil then 1810 if ret == ffi.nullptr then
1811 return nil 1811 return nil
1812 end 1812 end
1813 return ffi.string(ret) 1813 return ffi.string(ret)
@@ -1827,7 +1827,7 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", {
1827 1827
1828 text_get = function(self) 1828 text_get = function(self)
1829 local str = eolian.eolian_doc_token_text_get(self) 1829 local str = eolian.eolian_doc_token_text_get(self)
1830 if str == nil then 1830 if str == ffi.nullptr then
1831 return nil 1831 return nil
1832 end 1832 end
1833 local ret = ffi.string(str) 1833 local ret = ffi.string(str)
diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h
index 294fe0e5a2..e87ccc6093 100644
--- a/src/lib/ecore/Ecore.h
+++ b/src/lib/ecore/Ecore.h
@@ -331,6 +331,8 @@ extern "C" {
331#endif 331#endif
332#include "Ecore_Eo.h" 332#include "Ecore_Eo.h"
333 333
334EAPI double _ecore_main_loop_wakeup_time_get(void);
335
334#ifdef __cplusplus 336#ifdef __cplusplus
335} 337}
336#endif 338#endif
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 3110c5ef54..f6cacd44a6 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -21,10 +21,6 @@
21# include <sys/mman.h> 21# include <sys/mman.h>
22#endif 22#endif
23 23
24#ifdef HAVE_SYSTEMD
25# include <systemd/sd-daemon.h>
26#endif
27
28#ifdef _WIN32 24#ifdef _WIN32
29# include <evil_private.h> /* evil_init/shutdown */ 25# include <evil_private.h> /* evil_init/shutdown */
30#endif 26#endif
@@ -313,9 +309,7 @@ ecore_init(void)
313#ifdef HAVE_SYSTEMD 309#ifdef HAVE_SYSTEMD
314 if (getenv("WATCHDOG_USEC")) 310 if (getenv("WATCHDOG_USEC"))
315 { 311 {
316 double sec; 312 double sec = ((double) atoi(getenv("WATCHDOG_USEC"))) / 1000 / 1000;
317
318 sec = ((double) atoi(getenv("WATCHDOG_USEC"))) / 1000 / 1000;
319 313
320 _systemd_watchdog = 314 _systemd_watchdog =
321 efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 315 efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
@@ -326,7 +320,6 @@ ecore_init(void)
326 unsetenv("WATCHDOG_USEC"); 320 unsetenv("WATCHDOG_USEC");
327 321
328 INF("Setup systemd watchdog to : %f", sec); 322 INF("Setup systemd watchdog to : %f", sec);
329
330 _systemd_watchdog_cb(NULL, NULL); 323 _systemd_watchdog_cb(NULL, NULL);
331 } 324 }
332#endif 325#endif
@@ -962,7 +955,11 @@ _ecore_fps_debug_runtime_add(double t)
962static void 955static void
963_systemd_watchdog_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 956_systemd_watchdog_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
964{ 957{
965 sd_notify(0, "WATCHDOG=1"); 958 if (getenv("NOTIFY_SOCKET"))
959 {
960 _ecore_sd_init();
961 if (_ecore_sd_notify) _ecore_sd_notify(0, "WATCHDOG=1");
962 }
966} 963}
967#endif 964#endif
968 965
@@ -1122,3 +1119,39 @@ ecore_memory_state_set(Ecore_Memory_State state)
1122 _ecore_memory_state = state; 1119 _ecore_memory_state = state;
1123 ecore_event_add(ECORE_EVENT_MEMORY_STATE, NULL, NULL, NULL); 1120 ecore_event_add(ECORE_EVENT_MEMORY_STATE, NULL, NULL, NULL);
1124} 1121}
1122
1123#ifdef HAVE_SYSTEMD
1124static Eina_Module *_libsystemd = NULL;
1125static Eina_Bool _libsystemd_broken = EINA_FALSE;
1126
1127int (*_ecore_sd_notify) (int unset_environment, const char *state) = NULL;
1128
1129void
1130_ecore_sd_init(void)
1131{
1132 if (_libsystemd_broken) return;
1133 _libsystemd = eina_module_new("libsystemd.so.0");
1134 if (_libsystemd)
1135 {
1136 if (!eina_module_load(_libsystemd))
1137 {
1138 eina_module_free(_libsystemd);
1139 _libsystemd = NULL;
1140 }
1141 }
1142 if (!_libsystemd)
1143 {
1144 _libsystemd_broken = EINA_TRUE;
1145 return;
1146 }
1147 _ecore_sd_notify =
1148 eina_module_symbol_get(_libsystemd, "sd_notify");
1149 if (!_ecore_sd_notify)
1150 {
1151 _ecore_sd_notify = NULL;
1152 eina_module_free(_libsystemd);
1153 _libsystemd = NULL;
1154 _libsystemd_broken = EINA_TRUE;
1155 }
1156}
1157#endif
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index f2ec2d61c8..a5bde81ff6 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -626,68 +626,103 @@ _pos_map_spring(double pos,
626 return _pos_map_sin((M_PI / 2.0) + (p2 * len)) * decay; 626 return _pos_map_sin((M_PI / 2.0) + (p2 * len)) * decay;
627} 627}
628 628
629static double 629static inline double
630_cubic_bezier_a (double a1, double a2) 630cuberoot(double v)
631{ 631{
632 return 1.0 - 3.0 * a2 + 3.0 * a1; 632 if (v < 0.0)
633 return -pow(-v, 1. / 3.);
634 else
635 return pow(v, 1. / 3.);
633} 636}
634 637
635static double 638static double
636_cubic_bezier_b (double a1, double a2) 639_bezier_t_get(double _x, double _x1, double _x2)
637{ 640{
638 return 3.0 * a2 - 6.0 * a1; 641 if (_x < 0.0 || _x > 1.0) return _x;
639} 642
643 // Cardano's algorithm
644 double\
645 pa = _x - 0.0,
646 pb = _x - _x1,
647 pc = _x - _x2,
648 pd = _x - 1.0;
649
650 double\
651 a = 3*pa-6*pb+3*pc,
652 b = -3*pa+3*pb,
653 c = pa,
654 d = -pa+3*pb-3*pc+pd;
655
656 a /= d;
657 b /= d;
658 c /= d;
659
660 double\
661 p = (3*b-a*a)/3.0,
662 p3 = p/3.0,
663 q = (2*a*a*a-9*a*b+27*c)/27.0,
664 q2 = q/2.0,
665 discriminant = q2*q2 + p3*p3*p3;
666
667 double u1, v1, root1, root2, root3;
668
669 if (discriminant < 0)
670 {
671 double\
672 mp3 = -p/3.0,
673 mp33 = mp3*mp3*mp3,
674 r = sqrt(mp33),
675 t = -q / (2*r),
676 cosphi = t<-1.0 ? -1.0 : t>1.0 ? 1.0 : t,
677 phi = acos(cosphi),
678 crtr = cuberoot(r),
679 t1 = 2*crtr;
680 root1 = t1 * cos(phi/3.0) - a/3.0;
681 root2 = t1 * cos((phi+2*M_PI)/3.0) - a/3.0;
682 root3 = t1 * cos((phi+4*M_PI)/3.0) - a/3.0;
683
684 if (root1 >= 0.0 && root1 <= 1.0) return root1;
685 if (root2 >= 0.0 && root2 <= 1.0) return root2;
686 if (root3 >= 0.0 && root3 <= 1.0) return root3;
687 }
688 else if (discriminant == 0)
689 {
690 u1 = q2 < 0 ? cuberoot(-q2) : -cuberoot(q2);
691 root1 = 2*u1 - a/3.0;
692 root2 = -u1 - a/3.0;
640 693
641static double 694 if (root1 >= 0.0 && root1 <= 1.0) return root1;
642_cubic_bezier_c(double a1) 695 if (root2 >= 0.0 && root2 <= 1.0) return root2;
643{ 696 }
644 return 3.0 * a1; 697 else
645} 698 {
699 double sd = sqrt(discriminant);
700 u1 = cuberoot(sd - q2);
701 v1 = cuberoot(sd + q2);
702 root1 = u1 - v1 - a/3.0;
646 703
647static double 704 if (root1 >= 0.0 && root1 <= 1.0) return root1;
648_cubic_bezier_calc(double t, 705 }
649 double a1,
650 double a2)
651{
652 return ((_cubic_bezier_a(a1, a2) * t +
653 _cubic_bezier_b(a1, a2)) * t +
654 _cubic_bezier_c(a1)) * t;
655}
656 706
657static double 707 return _x;
658_cubic_bezier_slope_get(double t,
659 double a1,
660 double a2)
661{
662 return 3.0 * _cubic_bezier_a(a1, a2) * t * t +
663 2.0 * _cubic_bezier_b(a1, a2) * t +
664 _cubic_bezier_c(a1);
665} 708}
666 709
667static double 710static double
668_cubic_bezier_t_get(double a, 711_bezier_calc(double t, double y1, double y2)
669 double x1,
670 double x2)
671{ 712{
672#define APPROXIMATE_RANGE(val) \ 713 double y0 = 0.0;
673 ((((val) < 0.01) && ((val) > -0.01)) ? EINA_TRUE : EINA_FALSE) 714 double y3 = 1.0;
674 715
675 const int LIMIT = 100; 716 double u = 1.0 - t;
676 double current_slope; 717 double t2 = t*t;
677 double change; 718 double t3 = t*t*t;
678 double current_x; 719 double u2 = u*u;
679 double guess_t = a; 720 double u3 = u*u*u;
680 721
681 for (int i = 0; i < LIMIT; i++) 722 return u3 * y0 +
682 { 723 3.0 * u2 * t * y1 +
683 current_slope = _cubic_bezier_slope_get(guess_t, x1, x2); 724 3.0 * u * t2 * y2 +
684 if (EINA_DBL_EQ(current_slope, 0.0)) return guess_t; 725 t3 * y3;
685 current_x = _cubic_bezier_calc(guess_t, x1, x2) - a;
686 change = current_x / current_slope;
687 guess_t -= change;
688 if (APPROXIMATE_RANGE(change)) break;
689 }
690 return guess_t;
691} 726}
692 727
693static double 728static double
@@ -700,7 +735,7 @@ _pos_map_cubic_bezier(double pos,
700 if (EINA_DBL_EQ(x1, y1) && 735 if (EINA_DBL_EQ(x1, y1) &&
701 EINA_DBL_EQ(x2, y2)) 736 EINA_DBL_EQ(x2, y2))
702 return pos; 737 return pos;
703 return _cubic_bezier_calc(_cubic_bezier_t_get(pos, x1, x2), y1, y2); 738 return _bezier_calc(_bezier_t_get(pos, x1, x2), y1, y2);
704} 739}
705 740
706#define DBL_TO(Fp) eina_f32p32_double_to(Fp) 741#define DBL_TO(Fp) eina_f32p32_double_to(Fp)
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index fc35331f3f..efd5310029 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -20,10 +20,6 @@
20#include <fcntl.h> 20#include <fcntl.h>
21#include <sys/time.h> 21#include <sys/time.h>
22 22
23#ifdef HAVE_SYSTEMD
24# include <systemd/sd-daemon.h>
25#endif
26
27#ifdef HAVE_IEEEFP_H 23#ifdef HAVE_IEEEFP_H
28# include <ieeefp.h> // for Solaris 24# include <ieeefp.h> // for Solaris
29#endif 25#endif
@@ -211,12 +207,20 @@ static gboolean _ecore_glib_idle_enterer_called;
211static gboolean ecore_fds_ready; 207static gboolean ecore_fds_ready;
212#endif 208#endif
213 209
210static double _ecore_main_loop_wakeup_time = 0.0;
211
212EAPI double _ecore_main_loop_wakeup_time_get(void)
213{
214 return _ecore_main_loop_wakeup_time;
215}
216
214static inline void 217static inline void
215_update_loop_time(Efl_Loop_Data *pd) 218_update_loop_time(Efl_Loop_Data *pd)
216{ 219{
217 double loop_time = ecore_time_get(); 220 double loop_time = ecore_time_get();
218 if (loop_time > pd->loop_time) 221 if (loop_time > pd->loop_time)
219 pd->loop_time = loop_time; 222 pd->loop_time = loop_time;
223 _ecore_main_loop_wakeup_time = loop_time;
220} 224}
221 225
222#ifdef EFL_EXTRA_SANITY_CHECKS 226#ifdef EFL_EXTRA_SANITY_CHECKS
@@ -1196,7 +1200,11 @@ _ecore_main_loop_begin(Eo *obj, Efl_Loop_Data *pd)
1196 if (obj == ML_OBJ) 1200 if (obj == ML_OBJ)
1197 { 1201 {
1198#ifdef HAVE_SYSTEMD 1202#ifdef HAVE_SYSTEMD
1199 sd_notify(0, "READY=1"); 1203 if (getenv("NOTIFY_SOCKET"))
1204 {
1205 _ecore_sd_init();
1206 if (_ecore_sd_notify) _ecore_sd_notify(0, "READY=1");
1207 }
1200#endif 1208#endif
1201#ifdef HAVE_LIBUV 1209#ifdef HAVE_LIBUV
1202 if (!_dl_uv_run) 1210 if (!_dl_uv_run)
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 8e9b796c2c..f87e5e753f 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -511,6 +511,12 @@ extern Eina_Bool _ecore_glib_always_integrate;
511extern Ecore_Select_Function main_loop_select; 511extern Ecore_Select_Function main_loop_select;
512extern int in_main_loop; 512extern int in_main_loop;
513 513
514#ifdef HAVE_SYSTEMD
515void _ecore_sd_init(void);
516
517extern int (*_ecore_sd_notify) (int unset_environment, const char *state);
518#endif
519
514Eina_Bool ecore_mempool_init(void); 520Eina_Bool ecore_mempool_init(void);
515void ecore_mempool_shutdown(void); 521void ecore_mempool_shutdown(void);
516#define GENERIC_ALLOC_FREE_HEADER(TYPE, Type) \ 522#define GENERIC_ALLOC_FREE_HEADER(TYPE, Type) \
diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index 05ab26cdea..f38c7880c1 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -40,6 +40,7 @@
40# define PHE(x, y) eina_thread_equal(x, y) 40# define PHE(x, y) eina_thread_equal(x, y)
41# define PHS() eina_thread_self() 41# define PHS() eina_thread_self()
42# define PHC(x, f, d) eina_thread_create(&(x), EINA_THREAD_BACKGROUND, -1, (void *)f, d) 42# define PHC(x, f, d) eina_thread_create(&(x), EINA_THREAD_BACKGROUND, -1, (void *)f, d)
43# define PHC2(x, f, d)eina_thread_create(&(x), EINA_THREAD_URGENT, -1, (void *)f, d)
43# define PHJ(x) eina_thread_join(x) 44# define PHJ(x) eina_thread_join(x)
44 45
45typedef struct _Ecore_Pthread_Worker Ecore_Pthread_Worker; 46typedef struct _Ecore_Pthread_Worker Ecore_Pthread_Worker;
@@ -953,7 +954,7 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
953 eina_threads_init(); 954 eina_threads_init();
954 955
955retry_direct: 956retry_direct:
956 if (PHC(t, _ecore_direct_worker, worker)) 957 if (PHC2(t, _ecore_direct_worker, worker))
957 { 958 {
958 SLKL(_ecore_pending_job_threads_mutex); 959 SLKL(_ecore_pending_job_threads_mutex);
959 _ecore_thread_count_no_queue++; 960 _ecore_thread_count_no_queue++;
diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build
index 34c32e753d..637761dcc4 100644
--- a/src/lib/ecore/meson.build
+++ b/src/lib/ecore/meson.build
@@ -192,10 +192,6 @@ if get_option('g-mainloop') == true
192 endif 192 endif
193endif 193endif
194 194
195if get_option('systemd') == true
196 ecore_deps += systemd
197endif
198
199ecore_lib = library('ecore', 195ecore_lib = library('ecore',
200 ecore_src, pub_eo_file_target, 196 ecore_src, pub_eo_file_target,
201 dependencies: ecore_pub_deps + [m, buildsystem, ecore_deps], 197 dependencies: ecore_pub_deps + [m, buildsystem, ecore_deps],
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 8a4e0fb43e..dd7fc23d4b 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -34,10 +34,6 @@
34# include <sys/filio.h> 34# include <sys/filio.h>
35#endif 35#endif
36 36
37#ifdef HAVE_SYSTEMD
38# include <systemd/sd-daemon.h>
39#endif
40
41#ifdef _WIN32 37#ifdef _WIN32
42# include <ws2tcpip.h> 38# include <ws2tcpip.h>
43# include <evil_private.h> /* evil_init|shutdown */ 39# include <evil_private.h> /* evil_init|shutdown */
@@ -107,7 +103,11 @@ ecore_con_init(void)
107 EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED; 103 EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED;
108 104
109#ifdef HAVE_SYSTEMD 105#ifdef HAVE_SYSTEMD
110 sd_fd_max = sd_listen_fds(0); 106 if (getenv("LISTEN_PID") && getenv("LISTEN_FDS"))
107 {
108 _ecore_con_sd_init();
109 if (_ecore_sd_listen_fds) sd_fd_max = _ecore_sd_listen_fds(0);
110 }
111#endif 111#endif
112 112
113 eina_log_timing(_ecore_con_log_dom, 113 eina_log_timing(_ecore_con_log_dom,
@@ -389,11 +389,16 @@ efl_net_ip_port_split(char *buf, const char **p_host, const char **p_port)
389Eina_Error 389Eina_Error
390efl_net_ip_socket_activate_check(const char *address, int family, int type, Eina_Bool *listening) 390efl_net_ip_socket_activate_check(const char *address, int family, int type, Eina_Bool *listening)
391{ 391{
392 SOCKET fd = SD_LISTEN_FDS_START + sd_fd_index; 392 SOCKET fd = /*SD_LISTEN_FDS_START*/3 + sd_fd_index;
393 int r; 393 int r;
394 394
395 // check first as this will return if we're not socket activated...
396 // or systemd not found, which means the below init will not be done then
395 if (sd_fd_index >= sd_fd_max) return ENOENT; 397 if (sd_fd_index >= sd_fd_max) return ENOENT;
396 398
399 _ecore_con_sd_init();
400 if ((!_ecore_sd_is_socket_unix) || (!_ecore_sd_is_socket)) return ENOENT;
401
397 if (family == AF_UNIX) 402 if (family == AF_UNIX)
398 { 403 {
399 char buf[sizeof(struct sockaddr_un)] = ""; 404 char buf[sizeof(struct sockaddr_un)] = "";
@@ -424,7 +429,7 @@ efl_net_ip_socket_activate_check(const char *address, int family, int type, Eina
424 len = strlen(address) + 1; 429 len = strlen(address) + 1;
425 } 430 }
426 431
427 r = sd_is_socket_unix(fd, type, 0, sun_path, len); 432 r = _ecore_sd_is_socket_unix(fd, type, 0, sun_path, len);
428 if (r < 0) 433 if (r < 0)
429 { 434 {
430 ERR("socket " SOCKET_FMT " is not of family=%d, type=%d", fd, family, type); 435 ERR("socket " SOCKET_FMT " is not of family=%d, type=%d", fd, family, type);
@@ -443,7 +448,7 @@ efl_net_ip_socket_activate_check(const char *address, int family, int type, Eina
443 Eina_Error err; 448 Eina_Error err;
444 int x; 449 int x;
445 450
446 r = sd_is_socket(fd, family, type, (type == SOCK_DGRAM) ? -1 : 0); 451 r = _ecore_sd_is_socket(fd, family, type, (type == SOCK_DGRAM) ? -1 : 0);
447 if (r < 0) 452 if (r < 0)
448 { 453 {
449 ERR("socket " SOCKET_FMT " is not of family=%d, type=%d", fd, family, type); 454 ERR("socket " SOCKET_FMT " is not of family=%d, type=%d", fd, family, type);
@@ -2588,3 +2593,49 @@ ecore_con_libproxy_proxies_free(char **proxies)
2588 free(*itr); 2593 free(*itr);
2589 free(proxies); 2594 free(proxies);
2590} 2595}
2596
2597#ifdef HAVE_SYSTEMD
2598static Eina_Module *_libsystemd = NULL;
2599static Eina_Bool _libsystemd_broken = EINA_FALSE;
2600
2601int (*_ecore_sd_listen_fds) (int unset_environment) = NULL;
2602int (*_ecore_sd_is_socket_unix) (int fd, int type, int listening, const char *path, size_t length) = NULL;
2603int (*_ecore_sd_is_socket) (int fd, int family, int type, int listening) = NULL;
2604
2605void
2606_ecore_con_sd_init(void)
2607{
2608 if (_libsystemd_broken) return;
2609 _libsystemd = eina_module_new("libsystemd.so.0");
2610 if (_libsystemd)
2611 {
2612 if (!eina_module_load(_libsystemd))
2613 {
2614 eina_module_free(_libsystemd);
2615 _libsystemd = NULL;
2616 }
2617 }
2618 if (!_libsystemd)
2619 {
2620 _libsystemd_broken = EINA_TRUE;
2621 return;
2622 }
2623 _ecore_sd_listen_fds =
2624 eina_module_symbol_get(_libsystemd, "sd_listen_fds");
2625 _ecore_sd_is_socket_unix =
2626 eina_module_symbol_get(_libsystemd, "sd_is_socket_unix");
2627 _ecore_sd_is_socket =
2628 eina_module_symbol_get(_libsystemd, "sd_is_socket");
2629 if ((!_ecore_sd_listen_fds) ||
2630 (!_ecore_sd_is_socket_unix) ||
2631 (!_ecore_sd_is_socket))
2632 {
2633 _ecore_sd_listen_fds = NULL;
2634 _ecore_sd_is_socket_unix = NULL;
2635 _ecore_sd_is_socket = NULL;
2636 eina_module_free(_libsystemd);
2637 _libsystemd = NULL;
2638 _libsystemd_broken = EINA_TRUE;
2639 }
2640}
2641#endif
diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c
index fae182e133..993487880a 100644
--- a/src/lib/ecore_con/ecore_con_local.c
+++ b/src/lib/ecore_con/ecore_con_local.c
@@ -17,10 +17,6 @@
17#endif 17#endif
18#include <libgen.h> 18#include <libgen.h>
19 19
20#ifdef HAVE_SYSTEMD
21# include <systemd/sd-daemon.h>
22#endif
23
24#ifdef _WIN32 20#ifdef _WIN32
25# include <ws2tcpip.h> 21# include <ws2tcpip.h>
26#endif 22#endif
diff --git a/src/lib/ecore_con/ecore_con_private.h b/src/lib/ecore_con/ecore_con_private.h
index 7f0c95d61d..805abbecb6 100644
--- a/src/lib/ecore_con/ecore_con_private.h
+++ b/src/lib/ecore_con/ecore_con_private.h
@@ -90,6 +90,13 @@ struct Ecore_Con_Socks_v5
90#ifdef HAVE_SYSTEMD 90#ifdef HAVE_SYSTEMD
91extern int sd_fd_index; 91extern int sd_fd_index;
92extern int sd_fd_max; 92extern int sd_fd_max;
93
94void _ecore_con_sd_init(void);
95
96extern int (*_ecore_sd_listen_fds) (int unset_environment);
97extern int (*_ecore_sd_is_socket_unix) (int fd, int type, int listening, const char *path, size_t length);
98extern int (*_ecore_sd_is_socket) (int fd, int family, int type, int listening);
99
93#endif 100#endif
94 101
95/* init must be called from main thread */ 102/* init must be called from main thread */
diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c
index d3d61ca46f..62fef94eed 100644
--- a/src/lib/ecore_con/efl_net_server_fd.c
+++ b/src/lib/ecore_con/efl_net_server_fd.c
@@ -14,10 +14,6 @@
14# include <sys/socket.h> 14# include <sys/socket.h>
15#endif 15#endif
16 16
17#ifdef HAVE_SYSTEMD
18# include <systemd/sd-daemon.h>
19#endif
20
21#define MY_CLASS EFL_NET_SERVER_FD_CLASS 17#define MY_CLASS EFL_NET_SERVER_FD_CLASS
22 18
23typedef struct _Efl_Net_Server_Fd_Data 19typedef struct _Efl_Net_Server_Fd_Data
@@ -233,7 +229,7 @@ _efl_net_server_fd_socket_activate(Eo *o, Efl_Net_Server_Fd_Data *pd EINA_UNUSED
233 } 229 }
234 else 230 else
235 { 231 {
236 SOCKET fd = SD_LISTEN_FDS_START + sd_fd_index; 232 SOCKET fd = /*SD_LISTEN_FDS_START*/3 + sd_fd_index;
237 int family; 233 int family;
238 socklen_t len = sizeof(family); 234 socklen_t len = sizeof(family);
239 235
diff --git a/src/lib/ecore_con/efl_net_socket_windows.c b/src/lib/ecore_con/efl_net_socket_windows.c
index 717f0a0256..d01f9d7d84 100644
--- a/src/lib/ecore_con/efl_net_socket_windows.c
+++ b/src/lib/ecore_con/efl_net_socket_windows.c
@@ -634,7 +634,7 @@ _efl_net_socket_windows_efl_object_constructor(Eo *o, Efl_Net_Socket_Windows_Dat
634} 634}
635 635
636EOLIAN static void 636EOLIAN static void
637_efl_net_socket_windows_efl_object_invalidate(Eo *o, Efl_Net_Socket_Windows_Data *pd) 637_efl_net_socket_windows_efl_object_invalidate(Eo *o, Efl_Net_Socket_Windows_Data *pd EINA_UNUSED)
638{ 638{
639 if (efl_io_closer_close_on_invalidate_get(o) && 639 if (efl_io_closer_close_on_invalidate_get(o) &&
640 (!efl_io_closer_closed_get(o))) 640 (!efl_io_closer_closed_get(o)))
diff --git a/src/lib/ecore_con/meson.build b/src/lib/ecore_con/meson.build
index fc53d3210f..44faa486af 100644
--- a/src/lib/ecore_con/meson.build
+++ b/src/lib/ecore_con/meson.build
@@ -184,7 +184,7 @@ ecore_con_deps += crypto
184 184
185ecore_con_lib = library('ecore_con', 185ecore_con_lib = library('ecore_con',
186 ecore_con_src, pub_eo_file_target, 186 ecore_con_src, pub_eo_file_target,
187 dependencies: [ecore, ecore_con_deps, http_parser, eldbus, eet, systemd, buildsystem, dl], 187 dependencies: [ecore, ecore_con_deps, http_parser, eldbus, eet, buildsystem, dl],
188 include_directories : config_dir, 188 include_directories : config_dir,
189 install: true, 189 install: true,
190 c_args : package_c_args, 190 c_args : package_c_args,
diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c
index f5792a774c..4266239a84 100644
--- a/src/lib/ecore_drm/ecore_drm_logind.c
+++ b/src/lib/ecore_drm/ecore_drm_logind.c
@@ -36,12 +36,62 @@
36static Ecore_Event_Handler *active_hdlr; 36static Ecore_Event_Handler *active_hdlr;
37 37
38#ifdef HAVE_SYSTEMD 38#ifdef HAVE_SYSTEMD
39static inline Eina_Bool 39static Eina_Module *_libsystemd = NULL;
40static Eina_Bool _libsystemd_broken = EINA_FALSE;
41
42static int (*_ecore_sd_session_get_vt) (const char *session, unsigned *vtnr) = NULL;
43static int (*_ecore_sd_pid_get_session) (pid_t pid, char **session) = NULL;
44static int (*_ecore_sd_session_get_seat) (const char *session, char **seat) = NULL;
45
46void
47_ecore_drm_sd_init(void)
48{
49 if (_libsystemd_broken) return;
50 _libsystemd = eina_module_new("libsystemd.so.0");
51 if (_libsystemd)
52 {
53 if (!eina_module_load(_libsystemd))
54 {
55 eina_module_free(_libsystemd);
56 _libsystemd = NULL;
57 }
58 }
59 if (!_libsystemd)
60 {
61 _libsystemd_broken = EINA_TRUE;
62 return;
63 }
64 _ecore_sd_session_get_vt =
65 eina_module_symbol_get(_libsystemd, "sd_session_get_vt");
66 _ecore_sd_pid_get_session =
67 eina_module_symbol_get(_libsystemd, "sd_pid_get_session");
68 _ecore_sd_session_get_seat =
69 eina_module_symbol_get(_libsystemd, "sd_session_get_seat");
70 if ((!_ecore_sd_session_get_vt) ||
71 (!_ecore_sd_pid_get_session) ||
72 (!_ecore_sd_session_get_seat))
73 {
74 _ecore_sd_session_get_vt = NULL;
75 _ecore_sd_pid_get_session = NULL;
76 _ecore_sd_session_get_seat = NULL;
77 eina_module_free(_libsystemd);
78 _libsystemd = NULL;
79 _libsystemd_broken = EINA_TRUE;
80 }
81}
82
83static inline Eina_Bool
40_ecore_drm_logind_vt_get(Ecore_Drm_Device *dev) 84_ecore_drm_logind_vt_get(Ecore_Drm_Device *dev)
41{ 85{
42 int ret; 86 int ret;
43 87
44 ret = sd_session_get_vt(dev->session, &dev->vt); 88 _ecore_drm_sd_init();
89 if (!_ecore_sd_session_get_vt)
90 {
91 ERR("Could not get systemd tty");
92 return EINA_FALSE;
93 }
94 ret = _ecore_sd_session_get_vt(dev->session, &dev->vt);
45 if (ret < 0) 95 if (ret < 0)
46 { 96 {
47 ERR("Could not get systemd tty"); 97 ERR("Could not get systemd tty");
@@ -142,20 +192,26 @@ _ecore_drm_logind_cb_activate(void *data, int type EINA_UNUSED, void *event)
142 return ECORE_CALLBACK_PASS_ON; 192 return ECORE_CALLBACK_PASS_ON;
143} 193}
144 194
145Eina_Bool 195Eina_Bool
146_ecore_drm_logind_connect(Ecore_Drm_Device *dev) 196_ecore_drm_logind_connect(Ecore_Drm_Device *dev)
147{ 197{
148#ifdef HAVE_SYSTEMD 198#ifdef HAVE_SYSTEMD
149 char *seat; 199 char *seat = NULL;
150 200
201 _ecore_drm_sd_init();
202 if ((!_ecore_sd_pid_get_session) ||
203 (!_ecore_sd_session_get_seat))
204 {
205 ERR("Could not get systemd session");
206 return EINA_FALSE;
207 }
151 /* get session id */ 208 /* get session id */
152 if (sd_pid_get_session(getpid(), &dev->session) < 0) 209 if (_ecore_sd_pid_get_session(getpid(), &dev->session) < 0)
153 { 210 {
154 ERR("Could not get systemd session"); 211 ERR("Could not get systemd session");
155 return EINA_FALSE; 212 return EINA_FALSE;
156 } 213 }
157 214 if (_ecore_sd_session_get_seat(dev->session, &seat) < 0)
158 if (sd_session_get_seat(dev->session, &seat) < 0)
159 { 215 {
160 ERR("Could not get systemd seat"); 216 ERR("Could not get systemd seat");
161 return EINA_FALSE; 217 return EINA_FALSE;
@@ -166,9 +222,7 @@ _ecore_drm_logind_connect(Ecore_Drm_Device *dev)
166 free(seat); 222 free(seat);
167 return EINA_FALSE; 223 return EINA_FALSE;
168 } 224 }
169
170 free(seat); 225 free(seat);
171
172 if (!_ecore_drm_logind_vt_get(dev)) return EINA_FALSE; 226 if (!_ecore_drm_logind_vt_get(dev)) return EINA_FALSE;
173#endif 227#endif
174 228
diff --git a/src/lib/ecore_drm/ecore_drm_private.h b/src/lib/ecore_drm/ecore_drm_private.h
index 5e292372fd..0be6a61ef8 100644
--- a/src/lib/ecore_drm/ecore_drm_private.h
+++ b/src/lib/ecore_drm/ecore_drm_private.h
@@ -53,10 +53,6 @@
53# include <linux/input.h> 53# include <linux/input.h>
54# include <libinput.h> 54# include <libinput.h>
55 55
56# ifdef HAVE_SYSTEMD
57# include <systemd/sd-login.h>
58# endif
59
60# include <Eldbus.h> 56# include <Eldbus.h>
61# include <Ecore_Drm.h> 57# include <Ecore_Drm.h>
62 58
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 46112d9537..2bcd8e14ea 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -5490,7 +5490,7 @@ static Eina_Bool
5490_deliver_cb(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice) 5490_deliver_cb(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice)
5491{ 5491{
5492 Ecore_Evas_Selection_Seat_Buffers *buffers; 5492 Ecore_Evas_Selection_Seat_Buffers *buffers;
5493 Eina_Content *content; 5493 Eina_Content *content = NULL;
5494 Eina_Content *converted = NULL; 5494 Eina_Content *converted = NULL;
5495 Eina_Bool result = EINA_FALSE; 5495 Eina_Bool result = EINA_FALSE;
5496 5496
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index 8f26737778..ea07300e7a 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -7,8 +7,8 @@
7#include <string.h> 7#include <string.h>
8#include <stdlib.h> 8#include <stdlib.h>
9 9
10#include "Ecore.h" 10#include <Ecore.h>
11#include "Ecore_Input.h" 11#include <Ecore_Input.h>
12 12
13#include "Ecore_Input_Evas.h" 13#include "Ecore_Input_Evas.h"
14#include "ecore_input_evas_private.h" 14#include "ecore_input_evas_private.h"
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index 94b612abc6..eb4b08761d 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -18,6 +18,8 @@
18# define EAPI 18# define EAPI
19#endif // ifdef __GNUC__ 19#endif // ifdef __GNUC__
20 20
21EAPI double _ecore_x_vxync_wakeup_time_get(void);
22
21#define ECORE_X_VERSION_MAJOR EFL_VERSION_MAJOR 23#define ECORE_X_VERSION_MAJOR EFL_VERSION_MAJOR
22#define ECORE_X_VERSION_MINOR EFL_VERSION_MINOR 24#define ECORE_X_VERSION_MINOR EFL_VERSION_MINOR
23/** 25/**
diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c
index 74e50efd01..573322a57f 100644
--- a/src/lib/ecore_x/ecore_x.c
+++ b/src/lib/ecore_x/ecore_x.c
@@ -2540,8 +2540,10 @@ ecore_x_xkb_track_state(void)
2540{ 2540{
2541 Eina_Bool ret = EINA_FALSE; 2541 Eina_Bool ret = EINA_FALSE;
2542#ifdef ECORE_XKB 2542#ifdef ECORE_XKB
2543 unsigned mask = XkbNewKeyboardNotifyMask | XkbMapNotifyMask |
2544 XkbStateNotifyMask | XkbCompatMapNotifyMask;
2543 EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE); 2545 EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE);
2544 ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, XkbStateNotifyMask, XkbStateNotifyMask); 2546 ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, mask, mask);
2545 if (_ecore_xlib_sync) ecore_x_sync(); 2547 if (_ecore_xlib_sync) ecore_x_sync();
2546#endif 2548#endif
2547 return ret; 2549 return ret;
diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c
index 637ff0c546..a777b48053 100644
--- a/src/lib/ecore_x/ecore_x_events.c
+++ b/src/lib/ecore_x/ecore_x_events.c
@@ -2511,10 +2511,16 @@ _ecore_x_event_handle_xkb(XEvent *xevent)
2511 2511
2512 if (xkbev->any.xkb_type == XkbMapNotify) 2512 if (xkbev->any.xkb_type == XkbMapNotify)
2513 { 2513 {
2514 XkbMapNotifyEvent *xkbmapping; 2514 XkbMapNotifyEvent *xkbmapping = (XkbMapNotifyEvent *)xkbev;
2515 2515
2516 xkbmapping = (XkbMapNotifyEvent *)xkbev; 2516 _ecore_x_window_grab_suspend();
2517 _ecore_x_key_grab_suspend();
2518 XkbGetMap(_ecore_x_disp, XkbAllMapComponentsMask,
2519 xkbmapping->device);
2517 XkbRefreshKeyboardMapping(xkbmapping); 2520 XkbRefreshKeyboardMapping(xkbmapping);
2521 _ecore_x_modifiers_get();
2522 _ecore_x_window_grab_resume();
2523 _ecore_x_key_grab_resume();
2518 } 2524 }
2519 else 2525 else
2520 { 2526 {
diff --git a/src/lib/ecore_x/ecore_x_vsync.c b/src/lib/ecore_x/ecore_x_vsync.c
index e002e48302..d9b8529296 100644
--- a/src/lib/ecore_x/ecore_x_vsync.c
+++ b/src/lib/ecore_x/ecore_x_vsync.c
@@ -154,6 +154,9 @@ static Ecore_Thread *drm_thread = NULL;
154static Eina_Spinlock tick_queue_lock; 154static Eina_Spinlock tick_queue_lock;
155static int tick_queue_count = 0; 155static int tick_queue_count = 0;
156static Eina_Bool tick_skip = EINA_FALSE; 156static Eina_Bool tick_skip = EINA_FALSE;
157static Eina_Bool threaded_vsync = EINA_FALSE;
158static Ecore_Timer *fail_timer = NULL;
159static Ecore_Timer *fallback_timer = NULL;
157 160
158typedef struct 161typedef struct
159{ 162{
@@ -167,6 +170,37 @@ typedef struct
167# define D(args...) 170# define D(args...)
168#endif 171#endif
169 172
173static void _drm_send_time(double t);
174
175static Eina_Bool
176_fallback_timeout(void *data EINA_UNUSED)
177{
178 if (drm_event_is_busy)
179 {
180 _drm_send_time(ecore_loop_time_get());
181 return EINA_TRUE;
182 }
183 fallback_timer = NULL;
184 return EINA_FALSE;
185}
186
187static Eina_Bool
188_fail_timeout(void *data EINA_UNUSED)
189{
190 fail_timer = NULL;
191 _drm_fail_count++;
192 if (_drm_fail_count >= 10)
193 {
194 _drm_fail_count = 10;
195 if (!fallback_timer)
196 fallback_timer = ecore_timer_add
197 (1.0 / 60.0, _fallback_timeout, NULL);
198 }
199 if (drm_event_is_busy)
200 _drm_send_time(ecore_loop_time_get());
201 return EINA_FALSE;
202}
203
170static Eina_Bool 204static Eina_Bool
171_drm_tick_schedule(void) 205_drm_tick_schedule(void)
172{ 206{
@@ -196,7 +230,33 @@ _drm_tick_begin(void *data EINA_UNUSED)
196{ 230{
197 _drm_fail_count = 0; 231 _drm_fail_count = 0;
198 drm_event_is_busy = 1; 232 drm_event_is_busy = 1;
199 _tick_send(1); 233 if (threaded_vsync)
234 {
235 _tick_send(1);
236 }
237 else
238 {
239 if (fail_timer) ecore_timer_reset(fail_timer);
240 else fail_timer = ecore_timer_add(1.0 / 15.0, _fail_timeout, NULL);
241 if (_drm_fail_count < 10)
242 {
243 if (!_drm_tick_schedule())
244 {
245 _drm_fail_count = 999999;
246 if (!fallback_timer)
247 fallback_timer = ecore_timer_add
248 (1.0 / 60.0, _fallback_timeout, NULL);
249 }
250 }
251 else
252 {
253 if (!_drm_tick_schedule())
254 _drm_fail_count = 999999;
255 if (!fallback_timer)
256 fallback_timer = ecore_timer_add
257 (1.0 / 60.0, _fallback_timeout, NULL);
258 }
259 }
200} 260}
201 261
202static void 262static void
@@ -204,22 +264,64 @@ _drm_tick_end(void *data EINA_UNUSED)
204{ 264{
205 _drm_fail_count = 0; 265 _drm_fail_count = 0;
206 drm_event_is_busy = 0; 266 drm_event_is_busy = 0;
207 _tick_send(0); 267 if (threaded_vsync)
268 {
269 _tick_send(0);
270 }
271 else
272 {
273 if (fail_timer)
274 {
275 ecore_timer_del(fail_timer);
276 fail_timer = NULL;
277 }
278 if (fallback_timer)
279 {
280 ecore_timer_del(fallback_timer);
281 fallback_timer = NULL;
282 }
283 }
208} 284}
209 285
210static void 286static void
211_drm_send_time(double t) 287_drm_send_time(double t)
212{ 288{
213 double *tim = malloc(sizeof(*tim)); 289 if (threaded_vsync)
214 if (tim)
215 { 290 {
216 *tim = t; 291 double *tim = malloc(sizeof(*tim));
217 DBG(" ... send %1.8f", t); 292 if (tim)
218 D(" @%1.5f ... send %1.8f\n", ecore_time_get(), t); 293 {
219 eina_spinlock_take(&tick_queue_lock); 294 *tim = t;
220 tick_queue_count++; 295 DBG(" ... send %1.8f", t);
221 eina_spinlock_release(&tick_queue_lock); 296 D(" @%1.5f ... send %1.8f\n", ecore_time_get(), t);
222 ecore_thread_feedback(drm_thread, tim); 297 eina_spinlock_take(&tick_queue_lock);
298 tick_queue_count++;
299 eina_spinlock_release(&tick_queue_lock);
300 ecore_thread_feedback(drm_thread, tim);
301 }
302 }
303 else
304 {
305 if (drm_event_is_busy)
306 {
307 if (_drm_fail_count == 0)
308 {
309 if (fallback_timer)
310 {
311 ecore_timer_del(fallback_timer);
312 fallback_timer = NULL;
313 }
314 }
315 ecore_loop_time_set(t);
316 ecore_animator_custom_tick();
317 if (drm_event_is_busy)
318 {
319 if (fail_timer) ecore_timer_reset(fail_timer);
320 else fail_timer = ecore_timer_add(1.0 / 15.0, _fail_timeout, NULL);
321 if (!_drm_tick_schedule())
322 _drm_fail_count = 999999;
323 }
324 }
223 } 325 }
224} 326}
225 327
@@ -272,6 +374,7 @@ _drm_vblank_handler(int fd EINA_UNUSED,
272 tdelta_avg = 0.0; 374 tdelta_avg = 0.0;
273 tdelta_n = 0; 375 tdelta_n = 0;
274 } 376 }
377 _drm_fail_count = 0;
275 _drm_send_time(t); 378 _drm_send_time(t);
276 pframe = frame; 379 pframe = frame;
277 } 380 }
@@ -282,6 +385,13 @@ _drm_vblank_handler(int fd EINA_UNUSED,
282 } 385 }
283} 386}
284 387
388static double _ecore_x_vsync_wakeup_time = 0.0;
389
390EAPI double _ecore_x_vxync_wakeup_time_get(void)
391{
392 return _ecore_x_vsync_wakeup_time;
393}
394
285static void 395static void
286_drm_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread) 396_drm_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread)
287{ 397{
@@ -357,6 +467,20 @@ _drm_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread)
357 tv.tv_usec = _drm_fail_time * 1000000; 467 tv.tv_usec = _drm_fail_time * 1000000;
358 D(" @%1.5f wait %ims\n", ecore_time_get(), (int)(tv.tv_usec /1000)); 468 D(" @%1.5f wait %ims\n", ecore_time_get(), (int)(tv.tv_usec /1000));
359 ret = select(max_fd + 1, &rfds, &wfds, &exfds, &tv); 469 ret = select(max_fd + 1, &rfds, &wfds, &exfds, &tv);
470 _ecore_x_vsync_wakeup_time = ecore_time_get();
471#if 0
472 static double pt = 0.0;
473 double t = ecore_time_get();
474 double f = 1.0 / (t - pt);
475 char buf[1024];
476 int i, fps;
477 fps = 30 + ((f - 60.0) * 10.0);
478 if (fps > 1000) fps = 1000;
479 for (i = 0; i < fps; i++) buf[i] = '#';
480 buf[i] = 0;
481 printf("WAKE %1.5f [%s>\n", 1.0 / (t - pt), buf);
482 pt = t;
483#endif
360 if ((ret == 1) && (FD_ISSET(drm_fd, &rfds))) 484 if ((ret == 1) && (FD_ISSET(drm_fd, &rfds)))
361 { 485 {
362 D(" @%1.5f have event\n", ecore_time_get()); 486 D(" @%1.5f have event\n", ecore_time_get());
@@ -387,21 +511,35 @@ _drm_tick_notify(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED, void
387 D("notify.... %3.3f %i\n", *((double *)msg), drm_event_is_busy); 511 D("notify.... %3.3f %i\n", *((double *)msg), drm_event_is_busy);
388 if (drm_event_is_busy) 512 if (drm_event_is_busy)
389 { 513 {
390 double *t = msg; 514 double *t = msg, rt, lt;
391 static double pt = 0.0; 515 static double pt = 0.0, prt = 0.0, plt = 0.0;
392 516
393 DBG("VSYNC %1.8f = delt %1.8f", *t, *t - pt); 517 rt = ecore_time_get();
394 D("VSYNC %1.8f = delt %1.8f\n", *t, *t - pt); 518 lt = ecore_loop_time_get();
519 DBG("VSYNC %1.8f = delt %1.8f | real = %1.8f | loop = %1.8f", *t, *t - pt, rt - prt, lt - plt);
520 D("VSYNC %1.8f = delt %1.8f | real = %1.8f | loop = %1.8f", *t, *t - pt, rt - prt, lt - plt);
521// printf("VSYNC %1.8f = delt %1.5f | real = %1.5f | loop = %1.5f\n", *t, 1.0 / (*t - pt), 1.0 / (rt - prt), 1.0 / (lt - plt));
395 if ((!tick_skip) || (tick_queued == 1)) 522 if ((!tick_skip) || (tick_queued == 1))
396 { 523 {
397 ecore_loop_time_set(*t); 524 ecore_loop_time_set(*t);
398 ecore_animator_custom_tick(); 525 ecore_animator_custom_tick();
399 } 526 }
400 pt = *t; 527 pt = *t;
528 prt = rt;
529 plt = lt;
401 } 530 }
402 free(msg); 531 free(msg);
403} 532}
404 533
534static Eina_Bool
535_ecore_vsync_fd_handler(void *data EINA_UNUSED,
536 Ecore_Fd_Handler *fd_handler EINA_UNUSED)
537{
538 _ecore_x_vsync_wakeup_time = ecore_time_get();
539 sym_drmHandleEvent(drm_fd, &drm_evctx);
540 return ECORE_CALLBACK_RENEW;
541}
542
405// yes. most evil. we dlopen libdrm and libGL etc. to manually find smbols 543// yes. most evil. we dlopen libdrm and libGL etc. to manually find smbols
406// so we can be as compatible as possible given the whole mess of the 544// so we can be as compatible as possible given the whole mess of the
407// gl/dri/drm etc. world. and handle graceful failure at runtime not 545// gl/dri/drm etc. world. and handle graceful failure at runtime not
@@ -675,11 +813,20 @@ checkdone:
675 } 813 }
676 814
677 if (getenv("ECORE_ANIMATOR_SKIP")) tick_skip = EINA_TRUE; 815 if (getenv("ECORE_ANIMATOR_SKIP")) tick_skip = EINA_TRUE;
678 tick_queue_count = 0; 816 if (threaded_vsync)
679 eina_spinlock_new(&tick_queue_lock); 817 {
680 thq = eina_thread_queue_new(); 818 tick_queue_count = 0;
681 drm_thread = ecore_thread_feedback_run(_drm_tick_core, _drm_tick_notify, 819 eina_spinlock_new(&tick_queue_lock);
682 NULL, NULL, NULL, EINA_TRUE); 820 thq = eina_thread_queue_new();
821 drm_thread = ecore_thread_feedback_run(_drm_tick_core, _drm_tick_notify,
822 NULL, NULL, NULL, EINA_TRUE);
823 }
824 else
825 {
826 ecore_main_fd_handler_add(drm_fd, ECORE_FD_READ,
827 _ecore_vsync_fd_handler, NULL,
828 NULL, NULL);
829 }
683 return 1; 830 return 1;
684} 831}
685 832
@@ -759,6 +906,7 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
759 const char *home; 906 const char *home;
760 struct stat st; 907 struct stat st;
761 908
909 if (getenv("ECORE_VSYNC_TRHEAD")) threaded_vsync = EINA_TRUE;
762 home = eina_environment_home_get(); 910 home = eina_environment_home_get();
763 if (!home) eina_environment_tmp_get(); 911 if (!home) eina_environment_tmp_get();
764 snprintf(buf, sizeof(buf), "%s/.ecore-no-vsync", home); 912 snprintf(buf, sizeof(buf), "%s/.ecore-no-vsync", home);
diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c
index 2c0e9d9065..b60e36bae4 100644
--- a/src/lib/eina/eina_log.c
+++ b/src/lib/eina/eina_log.c
@@ -29,10 +29,6 @@
29#include <assert.h> 29#include <assert.h>
30#include <errno.h> 30#include <errno.h>
31 31
32#ifdef HAVE_SYSTEMD
33# include <systemd/sd-journal.h>
34#endif
35
36#ifdef _WIN32 32#ifdef _WIN32
37# include <windows.h> 33# include <windows.h>
38#endif 34#endif
@@ -51,6 +47,7 @@
51#include "eina_thread.h" 47#include "eina_thread.h"
52#include "eina_convert.h" 48#include "eina_convert.h"
53#include "eina_strbuf.h" 49#include "eina_strbuf.h"
50#include "eina_module.h"
54 51
55/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 52/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
56#include "eina_safety_checks.h" 53#include "eina_safety_checks.h"
@@ -2091,6 +2088,43 @@ eina_log_print_cb_stdout(const Eina_Log_Domain *d,
2091#endif 2088#endif
2092} 2089}
2093 2090
2091#ifdef HAVE_SYSTEMD
2092static Eina_Module *_libsystemd = NULL;
2093static Eina_Bool _libsystemd_broken = EINA_FALSE;
2094
2095static int (*_eina_sd_journal_send_with_location) (const char *file, const char *line, const char *func, const char *format, ...) = NULL;
2096
2097static void
2098_eina_sd_init(void)
2099{
2100 if (_libsystemd_broken) return;
2101 _libsystemd = eina_module_new("libsystemd.so.0");
2102 if (_libsystemd)
2103 {
2104 if (!eina_module_load(_libsystemd))
2105 {
2106 eina_module_free(_libsystemd);
2107 _libsystemd = NULL;
2108 }
2109 }
2110 if (!_libsystemd)
2111 {
2112 _libsystemd_broken = EINA_TRUE;
2113 return;
2114 }
2115 _eina_sd_journal_send_with_location =
2116 eina_module_symbol_get(_libsystemd, "sd_journal_send_with_location");
2117 if (!_eina_sd_journal_send_with_location)
2118 {
2119 _eina_sd_journal_send_with_location = NULL;
2120 eina_module_free(_libsystemd);
2121 _libsystemd = NULL;
2122 _libsystemd_broken = EINA_TRUE;
2123 }
2124}
2125
2126#endif
2127
2094EAPI void 2128EAPI void
2095eina_log_print_cb_journald(const Eina_Log_Domain *d, 2129eina_log_print_cb_journald(const Eina_Log_Domain *d,
2096 Eina_Log_Level level, 2130 Eina_Log_Level level,
@@ -2108,6 +2142,9 @@ eina_log_print_cb_journald(const Eina_Log_Domain *d,
2108 Eina_Thread cur; 2142 Eina_Thread cur;
2109 int r; 2143 int r;
2110 2144
2145 _eina_sd_init();
2146 if (!_eina_sd_journal_send_with_location) goto nosystemd;
2147
2111 r = asprintf(&file_prefixed, "CODE_FILE=%s", file); 2148 r = asprintf(&file_prefixed, "CODE_FILE=%s", file);
2112 if (r == -1) 2149 if (r == -1)
2113 { 2150 {
@@ -2134,12 +2171,12 @@ eina_log_print_cb_journald(const Eina_Log_Domain *d,
2134#ifdef EINA_LOG_BACKTRACE 2171#ifdef EINA_LOG_BACKTRACE
2135 if (EINA_LIKELY(level > _backtrace_level)) 2172 if (EINA_LIKELY(level > _backtrace_level))
2136#endif 2173#endif
2137 sd_journal_send_with_location(file_prefixed, line_str, fnc, 2174 _eina_sd_journal_send_with_location(file_prefixed, line_str, fnc,
2138 "PRIORITY=%i", level, 2175 "PRIORITY=%i", level,
2139 "MESSAGE=%s", message, 2176 "MESSAGE=%s", message,
2140 "EFL_DOMAIN=%s", d->domain_str, 2177 "EFL_DOMAIN=%s", d->domain_str,
2141 "THREAD=%lu", cur, 2178 "THREAD=%lu", cur,
2142 NULL); 2179 NULL);
2143#ifdef EINA_LOG_BACKTRACE 2180#ifdef EINA_LOG_BACKTRACE
2144 else 2181 else
2145 { 2182 {
@@ -2159,14 +2196,14 @@ eina_log_print_cb_journald(const Eina_Log_Domain *d,
2159 else 2196 else
2160 eina_strbuf_append_printf(bts, "[%s], ", strings[i]); 2197 eina_strbuf_append_printf(bts, "[%s], ", strings[i]);
2161 2198
2162 sd_journal_send_with_location(file_prefixed, line_str, fnc, 2199 _eina_sd_journal_send_with_location(file_prefixed, line_str, fnc,
2163 "PRIORITY=%i", level, 2200 "PRIORITY=%i", level,
2164 "MESSAGE=%s", message, 2201 "MESSAGE=%s", message,
2165 "EFL_DOMAIN=%s", d->domain_str, 2202 "EFL_DOMAIN=%s", d->domain_str,
2166 "THREAD=%lu", cur, 2203 "THREAD=%lu", cur,
2167 "BACKTRACE=%s", 2204 "BACKTRACE=%s",
2168 eina_strbuf_string_get(bts), 2205 eina_strbuf_string_get(bts),
2169 NULL); 2206 NULL);
2170 eina_strbuf_free(bts); 2207 eina_strbuf_free(bts);
2171 free(strings); 2208 free(strings);
2172 } 2209 }
@@ -2176,10 +2213,10 @@ finish:
2176 free(file_prefixed); 2213 free(file_prefixed);
2177 free(line_str); 2214 free(line_str);
2178 free(message); 2215 free(message);
2179 2216 return;
2180#else 2217nosystemd:
2181 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, data, args);
2182#endif 2218#endif
2219 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, data, args);
2183} 2220}
2184 2221
2185EAPI void 2222EAPI void
diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c
index c1a1ef0d22..dc186175c4 100644
--- a/src/lib/eina/eina_thread.c
+++ b/src/lib/eina/eina_thread.c
@@ -141,11 +141,53 @@ _eina_internal_call(void *context)
141 141
142 EINA_THREAD_CLEANUP_PUSH(free, c); 142 EINA_THREAD_CLEANUP_PUSH(free, c);
143 143
144 if (c->prio == EINA_THREAD_BACKGROUND ||
145 c->prio == EINA_THREAD_IDLE)
146 eina_sched_prio_drop();
147
148 self = pthread_self(); 144 self = pthread_self();
145
146 if (c->prio == EINA_THREAD_IDLE)
147 {
148 struct sched_param params;
149 int min;
150#ifdef SCHED_IDLE
151 int pol = SCHED_IDLE;
152#else
153 int pol;
154 pthread_getschedparam(self, &pol, &params);
155#endif
156 min = sched_get_priority_min(pol);
157 params.sched_priority = min;
158 pthread_setschedparam(self, pol, &params);
159 }
160 else if (c->prio == EINA_THREAD_BACKGROUND)
161 {
162 struct sched_param params;
163 int min, max;
164#ifdef SCHED_BATCH
165 int pol = SCHED_BATCH;
166#else
167 int pol;
168 pthread_getschedparam(self, &pol, &params);
169#endif
170 min = sched_get_priority_min(pol);
171 max = sched_get_priority_max(pol);
172 params.sched_priority = (max - min) / 2;
173 pthread_setschedparam(self, pol, &params);
174 }
175// do nothing for normal
176// else if (c->prio == EINA_THREAD_NORMAL)
177// {
178// }
179 else if (c->prio == EINA_THREAD_URGENT)
180 {
181 struct sched_param params;
182 int max, pol;
183
184 pthread_getschedparam(self, &pol, &params);
185 max = sched_get_priority_max(pol);
186 params.sched_priority += 5;
187 if (params.sched_priority > max) params.sched_priority = max;
188 pthread_setschedparam(self, pol, &params);
189 }
190
149 _eina_debug_thread_add(&self); 191 _eina_debug_thread_add(&self);
150 EINA_THREAD_CLEANUP_PUSH(_eina_debug_thread_del, &self); 192 EINA_THREAD_CLEANUP_PUSH(_eina_debug_thread_del, &self);
151 r = c->func((void*) c->data, eina_thread_self()); 193 r = c->func((void*) c->data, eina_thread_self());
diff --git a/src/lib/eina/meson.build b/src/lib/eina/meson.build
index baa90f334f..2b5dff03b3 100644
--- a/src/lib/eina/meson.build
+++ b/src/lib/eina/meson.build
@@ -265,14 +265,7 @@ if default_mempool
265endif 265endif
266 266
267if get_option('systemd') == true 267if get_option('systemd') == true
268 systemd = dependency('libsystemd')
269 eina_deps += systemd
270 config_h.set('HAVE_SYSTEMD', '1') 268 config_h.set('HAVE_SYSTEMD', '1')
271 if systemd.version().version_compare('>=209')
272 config_h.set('HAVE_SYSTEMD_LOGIN_209', '1')
273 endif
274else
275 systemd = []
276endif 269endif
277 270
278 271
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index ffc5fd43c5..e2d0cf6abe 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -40,13 +40,6 @@
40#include <alloca.h> 40#include <alloca.h>
41#endif 41#endif
42 42
43#ifdef ELM_WIN32
44#include <malloc.h>
45#ifndef alloca
46#define alloca _alloca
47#endif
48#endif
49
50#ifdef _WIN32 43#ifdef _WIN32
51# define WIN32_LEAN_AND_MEAN 44# define WIN32_LEAN_AND_MEAN
52# include <winsock2.h> 45# include <winsock2.h>
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 7cb96970b0..4dea543391 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -181,6 +181,7 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
181{ 181{
182 Evas_Coord x = 0, y = 0, w = 1, h = 1; 182 Evas_Coord x = 0, y = 0, w = 1, h = 1;
183 int ox, oy, ow, oh; 183 int ox, oy, ow, oh;
184 Eina_Bool img_no_resize = EINA_FALSE;
184 185
185 evas_object_geometry_get(obj, &ox, &oy, &ow, &oh); 186 evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
186 if (efl_isa(img, EFL_CANVAS_LAYOUT_CLASS)) 187 if (efl_isa(img, EFL_CANVAS_LAYOUT_CLASS))
@@ -202,9 +203,7 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
202 //Exception Case 203 //Exception Case
203 if ((iw == 0) || (ih == 0) || (ow == 0) || (oh == 0)) 204 if ((iw == 0) || (ih == 0) || (ow == 0) || (oh == 0))
204 { 205 {
205 evas_object_resize(img, 0, 0); 206 img_no_resize = EINA_TRUE;
206 evas_object_resize(sd->hit_rect, 0, 0);
207 return;
208 } 207 }
209 208
210 iw = ((double)iw) * sd->scale; 209 iw = ((double)iw) * sd->scale;
@@ -306,7 +305,10 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
306 } 305 }
307 } 306 }
308done: 307done:
309 evas_object_geometry_set(img, x, y, w, h); 308 if (img_no_resize)
309 evas_object_geometry_set(img, 0, 0, 0, 0);
310 else
311 evas_object_geometry_set(img, x, y, w, h);
310 312
311 evas_object_geometry_set(sd->hit_rect, x, y, w, h); 313 evas_object_geometry_set(sd->hit_rect, x, y, w, h);
312} 314}
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 34a9c2967e..1839406cb0 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -1000,13 +1000,6 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd)
1000 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 1000 efl_canvas_group_del(efl_super(obj, MY_CLASS));
1001} 1001}
1002 1002
1003EOLIAN static void
1004_efl_ui_layout_efl_canvas_group_group_calculate(Eo *obj, void *_pd EINA_UNUSED)
1005{
1006 efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
1007 _sizing_eval(obj, efl_data_scope_get(obj, MY_CLASS), NULL);
1008}
1009
1010/* rewrite or extend this one on your derived class as to suit your 1003/* rewrite or extend this one on your derived class as to suit your
1011 * needs */ 1004 * needs */
1012EOLIAN static void 1005EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo
index 39a10b4a99..ab4d67c1e3 100644
--- a/src/lib/elementary/efl_ui_layout.eo
+++ b/src/lib/elementary/efl_ui_layout.eo
@@ -19,6 +19,5 @@ class Efl.Ui.Layout extends Efl.Ui.Layout_Base implements Efl.File
19 Efl.File.load; 19 Efl.File.load;
20 Efl.File.unload; 20 Efl.File.unload;
21 Efl.Object.constructor; 21 Efl.Object.constructor;
22 Efl.Canvas.Group.group_calculate;
23 } 22 }
24} 23}
diff --git a/src/lib/elementary/elm_dnd.c b/src/lib/elementary/elm_dnd.c
index 18ae659bdf..f0d1824aca 100644
--- a/src/lib/elementary/elm_dnd.c
+++ b/src/lib/elementary/elm_dnd.c
@@ -182,7 +182,8 @@ elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format,
182 target->format = format; 182 target->format = format;
183 183
184 efl_event_callback_array_add(obj, drop_target_cb(), target); 184 efl_event_callback_array_add(obj, drop_target_cb(), target);
185 _drop_event_register(obj); //this is ensuring that we are also supporting none widgets 185 if (!efl_isa(obj, EFL_UI_WIDGET_CLASS))
186 _drop_event_register(obj); //this is ensuring that we are also supporting none widgets
186 if (!target_register) 187 if (!target_register)
187 target_register = eina_hash_pointer_new(NULL); 188 target_register = eina_hash_pointer_new(NULL);
188 eina_hash_list_append(target_register, &obj, target); 189 eina_hash_list_append(target_register, &obj, target);
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 707272be55..8446db8cab 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -165,8 +165,10 @@ _item_cache_free(Item_Cache *itc)
165 /* does not exist if cache item has just been reused */ 165 /* does not exist if cache item has just been reused */
166 if (itc->base_view) 166 if (itc->base_view)
167 { 167 {
168 Evas_Object *view = itc->base_view;
168 efl_wref_del(itc->base_view, &itc->base_view); 169 efl_wref_del(itc->base_view, &itc->base_view);
169 efl_del(itc->base_view); 170 efl_del(view);
171 itc->base_view = NULL;
170 } 172 }
171 eina_stringshare_del(itc->item_style); 173 eina_stringshare_del(itc->item_style);
172 EINA_LIST_FREE(itc->contents, c) 174 EINA_LIST_FREE(itc->contents, c)
@@ -1494,7 +1496,10 @@ _item_unrealize_cb(Elm_Gen_Item *it)
1494 Evas_Object *c; 1496 Evas_Object *c;
1495 if (!_item_cache_add(it, _content_cache_add(it, &cache))) 1497 if (!_item_cache_add(it, _content_cache_add(it, &cache)))
1496 { 1498 {
1497 ELM_SAFE_FREE(VIEW(it), evas_object_del); 1499 Evas_Object *view = VIEW(it);
1500 efl_wref_del(VIEW(it), &VIEW(it));
1501 ELM_SAFE_FREE(view, evas_object_del);
1502 VIEW(it) = NULL;
1498 ELM_SAFE_FREE(it->spacer, evas_object_del); 1503 ELM_SAFE_FREE(it->spacer, evas_object_del);
1499 EINA_LIST_FREE(cache, c) 1504 EINA_LIST_FREE(cache, c)
1500 evas_object_del(c); 1505 evas_object_del(c);
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 5da1517fc8..6866b14965 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -1555,8 +1555,10 @@ _item_cache_free(Item_Cache *itc)
1555 /* does not exist if cache item has just been reused */ 1555 /* does not exist if cache item has just been reused */
1556 if (itc->base_view) 1556 if (itc->base_view)
1557 { 1557 {
1558 Evas_Object *view = itc->base_view;
1558 efl_wref_del(itc->base_view, &itc->base_view); 1559 efl_wref_del(itc->base_view, &itc->base_view);
1559 efl_del(itc->base_view); 1560 efl_del(view);
1561 itc->base_view = NULL;
1560 } 1562 }
1561 itc->item_class = NULL; 1563 itc->item_class = NULL;
1562 EINA_LIST_FREE(itc->contents, c) 1564 EINA_LIST_FREE(itc->contents, c)
@@ -5386,7 +5388,10 @@ _item_unrealize(Elm_Gen_Item *it)
5386 5388
5387 if (!_item_cache_add(it, _content_cache_add(it, &cache))) 5389 if (!_item_cache_add(it, _content_cache_add(it, &cache)))
5388 { 5390 {
5389 ELM_SAFE_FREE(VIEW(it), efl_del); 5391 Evas_Object *view = VIEW(it);
5392 efl_wref_del(VIEW(it), &VIEW(it));
5393 ELM_SAFE_FREE(view, efl_del);
5394 VIEW(it) = NULL;
5390 it->callbacks = EINA_FALSE; 5395 it->callbacks = EINA_FALSE;
5391 ELM_SAFE_FREE(it->spacer, evas_object_del); 5396 ELM_SAFE_FREE(it->spacer, evas_object_del);
5392 EINA_LIST_FREE(cache, c) 5397 EINA_LIST_FREE(cache, c)
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index fdf7842930..0cb3b9d3b9 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -963,8 +963,6 @@ config_h.set_quoted('ICON_DIR', join_paths(dir_lib, 'icons'))
963 963
964if sys_windows == false 964if sys_windows == false
965 elm_options.set('ELM_UNIX', '1') 965 elm_options.set('ELM_UNIX', '1')
966else
967 elm_options.set('DLL_EXPORT', '1')
968endif 966endif
969 967
970elm_options.set('ELM_EFREET', '1') 968elm_options.set('ELM_EFREET', '1')
diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index eb9e0a15db..7a05f8e795 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -2,22 +2,21 @@
2# define _ELPUT_H 2# define _ELPUT_H
3 3
4# ifdef EFL_BETA_API_SUPPORT 4# ifdef EFL_BETA_API_SUPPORT
5# include <Eina.h> 5# include <Eina.h>
6 6
7# ifdef EAPI 7# ifdef EAPI
8# undef EAPI 8# undef EAPI
9# endif 9# endif
10 10
11# ifdef __GNUC__ 11# ifdef __GNUC__
12# if __GNUC__ >= 4 12# if __GNUC__ >= 4
13# define EAPI __attribute__ ((visibility("default"))) 13# define EAPI __attribute__ ((visibility("default")))
14# else
15# define EAPI
16# endif
14# else 17# else
15# define EAPI 18# define EAPI
16# endif 19# endif
17# else
18# define EAPI
19# endif
20
21 20
22typedef enum 21typedef enum
23{ 22{
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index cca5ea7eb7..c57b2e5611 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -1,6 +1,68 @@
1#include "elput_private.h" 1#include "elput_private.h"
2 2
3#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) 3#ifdef HAVE_SYSTEMD
4static Eina_Module *_libsystemd = NULL;
5static Eina_Bool _libsystemd_broken = EINA_FALSE;
6
7static int (*_elput_sd_session_get_vt) (const char *session, unsigned *vtnr) = NULL;
8static int (*_elput_sd_session_get_tty) (const char *session, char **display) = NULL;
9static int (*_elput_sd_pid_get_session) (pid_t pid, char **session) = NULL;
10static int (*_elput_sd_session_get_seat) (const char *session, char **seat) = NULL;
11
12void
13_elput_sd_init(void)
14{
15 if (_libsystemd_broken) return;
16 _libsystemd = eina_module_new("libsystemd.so.0");
17 if (_libsystemd)
18 {
19 if (!eina_module_load(_libsystemd))
20 {
21 eina_module_free(_libsystemd);
22 _libsystemd = NULL;
23 }
24 }
25 if (!_libsystemd)
26 {
27 _libsystemd = eina_module_new("libelogind-shared.so.0");
28 if (_libsystemd)
29 {
30 if (!eina_module_load(_libsystemd))
31 {
32 eina_module_free(_libsystemd);
33 _libsystemd = NULL;
34 }
35 }
36 }
37 if (!_libsystemd)
38 {
39 _libsystemd_broken = EINA_TRUE;
40 return;
41 }
42 // sd_session_get_vt == newere in systemd 207
43 _elput_sd_session_get_vt =
44 eina_module_symbol_get(_libsystemd, "sd_session_get_vt");
45 // sd_session_get_tty == older api in ssystemd 198
46 _elput_sd_session_get_tty =
47 eina_module_symbol_get(_libsystemd, "sd_session_get_tty");
48 _elput_sd_pid_get_session =
49 eina_module_symbol_get(_libsystemd, "sd_pid_get_session");
50 _elput_sd_session_get_seat =
51 eina_module_symbol_get(_libsystemd, "sd_session_get_seat");
52 if (((!_elput_sd_session_get_vt) && (!_elput_sd_session_get_tty)) ||
53 (!_elput_sd_pid_get_session) ||
54 (!_elput_sd_session_get_seat))
55 {
56 _elput_sd_session_get_vt = NULL;
57 _elput_sd_session_get_tty = NULL;
58 _elput_sd_pid_get_session = NULL;
59 _elput_sd_session_get_seat = NULL;
60 eina_module_free(_libsystemd);
61 _libsystemd = NULL;
62 _libsystemd_broken = EINA_TRUE;
63 }
64}
65
4 66
5static void 67static void
6_logind_session_active_cb_free(void *data EINA_UNUSED, void *event) 68_logind_session_active_cb_free(void *data EINA_UNUSED, void *event)
@@ -140,13 +202,16 @@ _cb_device_resumed(void *data, const Eldbus_Message *msg)
140static Eina_Bool 202static Eina_Bool
141_logind_session_vt_get(const char *sid, unsigned int *vt) 203_logind_session_vt_get(const char *sid, unsigned int *vt)
142{ 204{
143# ifdef HAVE_SYSTEMD_LOGIN_209
144 return (sd_session_get_vt(sid, vt) >= 0);
145# else
146 int ret = 0; 205 int ret = 0;
147 char *tty; 206 char *tty;
148 207
149 ret = sd_session_get_tty(sid, &tty); 208 _elput_sd_init();
209 if ((!_elput_sd_session_get_vt) && (!_elput_sd_session_get_tty))
210 return EINA_FALSE;
211 if (_elput_sd_session_get_vt)
212 return (_elput_sd_session_get_vt(sid, vt) >= 0);
213
214 ret = _elput_sd_session_get_tty(sid, &tty);
150 if (ret < 0) return ret; 215 if (ret < 0) return ret;
151 216
152 ret = sscanf(tty, "tty%u", vt); 217 ret = sscanf(tty, "tty%u", vt);
@@ -154,7 +219,6 @@ _logind_session_vt_get(const char *sid, unsigned int *vt)
154 219
155 if (ret != 1) return EINA_FALSE; 220 if (ret != 1) return EINA_FALSE;
156 return EINA_TRUE; 221 return EINA_TRUE;
157# endif
158} 222}
159 223
160static Eina_Bool 224static Eina_Bool
@@ -489,13 +553,16 @@ _logind_connect(Elput_Manager **manager, const char *seat, unsigned int tty)
489 int ret = 0; 553 int ret = 0;
490 char *s = NULL; 554 char *s = NULL;
491 555
556 _elput_sd_init();
557 if (!_elput_sd_pid_get_session) return EINA_FALSE;
558
492 em = calloc(1, sizeof(Elput_Manager)); 559 em = calloc(1, sizeof(Elput_Manager));
493 if (!em) return EINA_FALSE; 560 if (!em) return EINA_FALSE;
494 561
495 em->interface = &_logind_interface; 562 em->interface = &_logind_interface;
496 em->seat = eina_stringshare_add(seat); 563 em->seat = eina_stringshare_add(seat);
497 564
498 ret = sd_pid_get_session(getpid(), &em->sid); 565 ret = _elput_sd_pid_get_session(getpid(), &em->sid);
499 566
500 if (ret < 0) 567 if (ret < 0)
501 { 568 {
@@ -508,7 +575,7 @@ _logind_connect(Elput_Manager **manager, const char *seat, unsigned int tty)
508 575
509 if (!em->sid) goto session_err; 576 if (!em->sid) goto session_err;
510 577
511 ret = sd_session_get_seat(em->sid, &s); 578 ret = _elput_sd_session_get_seat(em->sid, &s);
512 if (ret < 0) 579 if (ret < 0)
513 { 580 {
514 ERR("Failed to get session seat"); 581 ERR("Failed to get session seat");
diff --git a/src/lib/elput/elput_manager.c b/src/lib/elput/elput_manager.c
index 987e73759b..93f39ea261 100644
--- a/src/lib/elput/elput_manager.c
+++ b/src/lib/elput/elput_manager.c
@@ -2,7 +2,7 @@
2 2
3static Elput_Interface *_ifaces[] = 3static Elput_Interface *_ifaces[] =
4{ 4{
5#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) 5#ifdef HAVE_SYSTEMD
6 &_logind_interface, 6 &_logind_interface,
7#endif 7#endif
8 NULL, 8 NULL,
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index 744c5a92e3..fd7d843d2e 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -23,14 +23,6 @@
23# include <xkbcommon/xkbcommon.h> 23# include <xkbcommon/xkbcommon.h>
24# include <xkbcommon/xkbcommon-compose.h> 24# include <xkbcommon/xkbcommon-compose.h>
25 25
26# ifdef HAVE_SYSTEMD
27# include <systemd/sd-login.h>
28# endif
29
30# ifdef HAVE_ELOGIND
31# include <elogind/sd-login.h>
32# endif
33
34#ifndef ELPUT_NODEFS 26#ifndef ELPUT_NODEFS
35# ifdef ELPUT_DEFAULT_LOG_COLOR 27# ifdef ELPUT_DEFAULT_LOG_COLOR
36# undef ELPUT_DEFAULT_LOG_COLOR 28# undef ELPUT_DEFAULT_LOG_COLOR
diff --git a/src/lib/elput/meson.build b/src/lib/elput/meson.build
index 2aa3590d2b..8fde7b5ac7 100644
--- a/src/lib/elput/meson.build
+++ b/src/lib/elput/meson.build
@@ -1,6 +1,5 @@
1elput_deps = [ecore, ecore_input, eeze, eo, m] 1elput_deps = [ecore, ecore_input, eeze, eo, m]
2elput_pub_deps = [eina, eldbus] 2elput_pub_deps = [eina, eldbus]
3pub_eo_file_target = []
4 3
5elput_header_src = [ 4elput_header_src = [
6 'Elput.h' 5 'Elput.h'
@@ -19,12 +18,6 @@ elput_src = [
19elput_deps += dependency('libinput', version : ['>=1.7.0']) 18elput_deps += dependency('libinput', version : ['>=1.7.0'])
20elput_deps += dependency('xkbcommon', version : ['>=0.3.0']) 19elput_deps += dependency('xkbcommon', version : ['>=0.3.0'])
21elput_deps += dependency('libudev') 20elput_deps += dependency('libudev')
22if get_option('systemd')
23 elput_deps += systemd
24endif
25if get_option('elogind')
26 elput_deps += dependency('libelogind')
27endif
28 21
29elput_lib = library('elput', 22elput_lib = library('elput',
30 elput_src, pub_eo_file_target, 23 elput_src, pub_eo_file_target,
diff --git a/src/lib/elua/Elua.h b/src/lib/elua/Elua.h
index 289f9112d7..cf93d65e53 100644
--- a/src/lib/elua/Elua.h
+++ b/src/lib/elua/Elua.h
@@ -18,6 +18,14 @@
18#ifndef _ELUA_H 18#ifndef _ELUA_H
19#define _ELUA_H 19#define _ELUA_H
20 20
21#ifdef EFL_BETA_API_SUPPORT
22
23#include <Eina.h>
24
25#include <lua.h>
26#include <lualib.h>
27#include <lauxlib.h>
28
21#ifdef EAPI 29#ifdef EAPI
22# undef EAPI 30# undef EAPI
23#endif 31#endif
@@ -92,14 +100,6 @@ extern "C" {
92 * @{ 100 * @{
93 */ 101 */
94 102
95#ifdef EFL_BETA_API_SUPPORT
96
97#include <Eina.h>
98
99#include <lua.h>
100#include <lualib.h>
101#include <lauxlib.h>
102
103/** Opaque Elua state 103/** Opaque Elua state
104 * 104 *
105 * @ingroup Elua 105 * @ingroup Elua
diff --git a/src/lib/elua/cache.c b/src/lib/elua/cache.c
index b18d690569..c731b0495a 100644
--- a/src/lib/elua/cache.c
+++ b/src/lib/elua/cache.c
@@ -1,10 +1,10 @@
1#include "elua_private.h"
2
3#include <sys/types.h> 1#include <sys/types.h>
4#include <sys/stat.h> 2#include <sys/stat.h>
5#include <fcntl.h> 3#include <fcntl.h>
6#include <unistd.h> 4#include <unistd.h>
7 5
6#include "elua_private.h"
7
8/* bytecode caching */ 8/* bytecode caching */
9 9
10static Eina_File * 10static Eina_File *
diff --git a/src/lib/elua/io.c b/src/lib/elua/io.c
index 77ac3df94c..142f61b716 100644
--- a/src/lib/elua/io.c
+++ b/src/lib/elua/io.c
@@ -1,9 +1,9 @@
1#include "elua_private.h"
2
3#ifdef _WIN32 1#ifdef _WIN32
4# include <evil_private.h> /* realpath */ 2# include <evil_private.h> /* realpath */
5#endif 3#endif
6 4
5#include "elua_private.h"
6
7/* expand fname to full path name (so that PATH is ignored) plus turn 7/* expand fname to full path name (so that PATH is ignored) plus turn
8 * stuff into a command, and also verify whether the path exists */ 8 * stuff into a command, and also verify whether the path exists */
9static char * 9static char *
diff --git a/src/lib/embryo/embryo_main.c b/src/lib/embryo/embryo_main.c
index 852b1903f2..452a272787 100644
--- a/src/lib/embryo/embryo_main.c
+++ b/src/lib/embryo/embryo_main.c
@@ -6,6 +6,8 @@
6#include <stdlib.h> 6#include <stdlib.h>
7#include <time.h> 7#include <time.h>
8 8
9#include <Eina.h>
10
9#include "Embryo.h" 11#include "Embryo.h"
10#include "embryo_private.h" 12#include "embryo_private.h"
11 13
diff --git a/src/lib/embryo/embryo_private.h b/src/lib/embryo/embryo_private.h
index 4bf8ceb2c6..e63351b2c7 100644
--- a/src/lib/embryo/embryo_private.h
+++ b/src/lib/embryo/embryo_private.h
@@ -1,8 +1,6 @@
1#ifndef _EMBRYO_PRIVATE_H 1#ifndef _EMBRYO_PRIVATE_H
2#define _EMBRYO_PRIVATE_H 2#define _EMBRYO_PRIVATE_H
3 3
4#include <Eina.h>
5
6typedef enum _Embryo_Opcode Embryo_Opcode; 4typedef enum _Embryo_Opcode Embryo_Opcode;
7 5
8enum _Embryo_Opcode 6enum _Embryo_Opcode
diff --git a/src/lib/embryo/embryo_str.c b/src/lib/embryo/embryo_str.c
index d7da4e0dd3..6fafa83db0 100644
--- a/src/lib/embryo/embryo_str.c
+++ b/src/lib/embryo/embryo_str.c
@@ -16,6 +16,8 @@
16#include <string.h> 16#include <string.h>
17#include <fnmatch.h> 17#include <fnmatch.h>
18 18
19#include <Eina.h>
20
19#include "Embryo.h" 21#include "Embryo.h"
20#include "embryo_private.h" 22#include "embryo_private.h"
21 23
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index 37b59405c3..61bd74e7c3 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -493,7 +493,11 @@ evas_vg_container_add(Evas_Object *parent)
493{ 493{
494 /* Warn it because the usage has been changed. 494 /* Warn it because the usage has been changed.
495 We can remove this message after v1.21. */ 495 We can remove this message after v1.21. */
496 if (!parent) CRI("Efl_VG Container doesn't allow null parent!"); 496 if (!parent)
497 {
498 ERR("Efl_VG Container doesn't allow null parent!");
499 return NULL;
500 }
497 return efl_add(MY_CLASS, parent); 501 return efl_add(MY_CLASS, parent);
498} 502}
499 503
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 956e13dbcf..b6eab9f411 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -363,6 +363,7 @@ _evas_canvas_efl_object_constructor(Eo *eo_obj, Evas_Public_Data *e)
363 EVAS_ARRAY_SET(e, glyph_unref_queue); 363 EVAS_ARRAY_SET(e, glyph_unref_queue);
364 EVAS_ARRAY_SET(e, texts_unref_queue); 364 EVAS_ARRAY_SET(e, texts_unref_queue);
365 365
366 eina_array_step_set(&e->render_post_change_objects, sizeof(e->render_post_change_objects), 10);
366 eina_array_step_set(&e->map_clip_objects, sizeof(e->map_clip_objects), 64); 367 eina_array_step_set(&e->map_clip_objects, sizeof(e->map_clip_objects), 64);
367 368
368 e->active_objects.version = EINA_ARRAY_VERSION; 369 e->active_objects.version = EINA_ARRAY_VERSION;
@@ -648,6 +649,7 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
648 eina_array_flush(&e->texts_unref_queue); 649 eina_array_flush(&e->texts_unref_queue);
649 eina_array_flush(&e->map_clip_objects); 650 eina_array_flush(&e->map_clip_objects);
650 eina_hash_free(e->focused_objects); 651 eina_hash_free(e->focused_objects);
652 eina_array_flush(&e->render_post_change_objects);
651 653
652 SLKL(e->post_render.lock); 654 SLKL(e->post_render.lock);
653 EINA_INLIST_FREE(e->post_render.jobs, job) 655 EINA_INLIST_FREE(e->post_render.jobs, job)
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index cad6291286..1e8e32cd94 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1142,6 +1142,10 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
1142{ 1142{
1143 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 1143 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
1144 1144
1145 has_alpha = !!has_alpha;
1146 if (has_alpha == o->cur->has_alpha)
1147 return;
1148
1145 evas_object_async_block(obj); 1149 evas_object_async_block(obj);
1146 if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data)) 1150 if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data))
1147 { 1151 {
@@ -1149,10 +1153,6 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
1149 ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE); 1153 ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE);
1150 } 1154 }
1151 1155
1152 has_alpha = !!has_alpha;
1153 if (has_alpha == o->cur->has_alpha)
1154 return;
1155
1156 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) 1156 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
1157 { 1157 {
1158 state_write->has_alpha = has_alpha; 1158 state_write->has_alpha = has_alpha;
@@ -3256,7 +3256,7 @@ evas_object_image_render_post(Evas_Object *eo_obj EINA_UNUSED,
3256 /* FIXME: copy strings across */ 3256 /* FIXME: copy strings across */
3257 3257
3258 //Somehow(preloading cancelled) image has been changed, need to redraw. 3258 //Somehow(preloading cancelled) image has been changed, need to redraw.
3259 if (o->changed) evas_object_change(eo_obj, obj); 3259 if (o->changed) evas_render_post_change_object_push(obj);
3260} 3260}
3261 3261
3262static void * 3262static void *
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 1d47ba06af..139e292ad3 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3761,6 +3761,14 @@ evas_render_updates_internal(Evas *eo_e,
3761 } 3761 }
3762 eina_evlog("-render_post_reset", eo_e, 0.0, NULL); 3762 eina_evlog("-render_post_reset", eo_e, 0.0, NULL);
3763 3763
3764 for (i = 0; i < e->render_post_change_objects.count; ++i)
3765 {
3766 obj = eina_array_data_get(&e->render_post_change_objects, i);
3767 eo_obj = obj->object;
3768 evas_object_change(eo_obj, obj);
3769 }
3770 OBJS_ARRAY_CLEAN(&e->render_post_change_objects);
3771
3764 eina_evlog("+render_end", eo_e, 0.0, NULL); 3772 eina_evlog("+render_end", eo_e, 0.0, NULL);
3765 e->changed = EINA_FALSE; 3773 e->changed = EINA_FALSE;
3766 e->viewport.changed = EINA_FALSE; 3774 e->viewport.changed = EINA_FALSE;
@@ -4327,5 +4335,16 @@ evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data)
4327 SLKU(pd->post_render.lock); 4335 SLKU(pd->post_render.lock);
4328} 4336}
4329 4337
4338void
4339evas_render_post_change_object_push(Evas_Object_Protected_Data *obj)
4340{
4341 Evas_Public_Data *e;
4342
4343 if (!obj || !obj->layer || !obj->layer->evas) return;
4344
4345 e = obj->layer->evas;
4346 OBJ_ARRAY_PUSH(&e->render_post_change_objects, obj);
4347}
4348
4330/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ 4349/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
4331 4350
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 4a1239637f..38071d40e8 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -206,7 +206,7 @@ _efl_canvas_gesture_manager_callback_add_hook(void *data, Eo *target, const Efl_
206 { 206 {
207 //Add it to the gesture context. 207 //Add it to the gesture context.
208 Eina_Hash *thisisreallystupid = eina_hash_find(pd->m_gesture_contex, &target); 208 Eina_Hash *thisisreallystupid = eina_hash_find(pd->m_gesture_contex, &target);
209 int count = 0; 209 intptr_t count = 0;
210 /* already present */ 210 /* already present */
211 if (thisisreallystupid) 211 if (thisisreallystupid)
212 count = (intptr_t)eina_hash_find(thisisreallystupid, &type); 212 count = (intptr_t)eina_hash_find(thisisreallystupid, &type);
@@ -216,7 +216,7 @@ _efl_canvas_gesture_manager_callback_add_hook(void *data, Eo *target, const Efl_
216 eina_hash_set(pd->m_gesture_contex, &target, thisisreallystupid); 216 eina_hash_set(pd->m_gesture_contex, &target, thisisreallystupid);
217 } 217 }
218 count++; 218 count++;
219 eina_hash_set(thisisreallystupid, &type, (intptr_t*)(long)count); 219 eina_hash_set(thisisreallystupid, &type, (intptr_t*)count);
220 } 220 }
221} 221}
222 222
@@ -234,13 +234,13 @@ _efl_canvas_gesture_manager_callback_del_hook(void *data, Eo *target, const Efl_
234 if (recognizer) 234 if (recognizer)
235 { 235 {
236 Eina_Hash *thisisreallystupid = eina_hash_find(pd->m_gesture_contex, &target); 236 Eina_Hash *thisisreallystupid = eina_hash_find(pd->m_gesture_contex, &target);
237 int count; 237 intptr_t count;
238 238
239 if (!thisisreallystupid) return; 239 if (!thisisreallystupid) return;
240 count = (intptr_t)eina_hash_find(thisisreallystupid, &type); 240 count = (intptr_t)eina_hash_find(thisisreallystupid, &type);
241 if (!count) return; 241 if (!count) return;
242 count--; 242 count--;
243 eina_hash_set(thisisreallystupid, &type, (intptr_t*)(long)count); 243 eina_hash_set(thisisreallystupid, &type, (intptr_t*)count);
244 if (count) return; 244 if (count) return;
245 eina_hash_del_by_key(thisisreallystupid, &type); 245 eina_hash_del_by_key(thisisreallystupid, &type);
246 if (eina_hash_population(thisisreallystupid)) return; 246 if (eina_hash_population(thisisreallystupid)) return;
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 3a24821dd2..6d00cd7a21 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -455,6 +455,7 @@ struct _Evas_Public_Data
455 Eina_Array texts_unref_queue; 455 Eina_Array texts_unref_queue;
456 Eina_Array map_clip_objects; 456 Eina_Array map_clip_objects;
457 Eina_List *finalize_objects; 457 Eina_List *finalize_objects;
458 Eina_Array render_post_change_objects;
458 459
459 struct { 460 struct {
460 Evas_Post_Render_Job *jobs; 461 Evas_Post_Render_Job *jobs;
@@ -1283,6 +1284,7 @@ void evas_unref_queue_image_put(Evas_Public_Data *pd, void *image);
1283void evas_unref_queue_glyph_put(Evas_Public_Data *pd, void *glyph); 1284void evas_unref_queue_glyph_put(Evas_Public_Data *pd, void *glyph);
1284void evas_unref_queue_texts_put(Evas_Public_Data *pd, void *glyph); 1285void evas_unref_queue_texts_put(Evas_Public_Data *pd, void *glyph);
1285void evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data); 1286void evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data);
1287void evas_render_post_change_object_push(Evas_Object_Protected_Data *obj);
1286 1288
1287void evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj, 1289void evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj,
1288 void *engine, void *data, void *context, void *surface, 1290 void *engine, void *data, void *context, void *surface,
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index ca0f61413c..c8f0eb8c24 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -721,6 +721,7 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se
721 ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL); 721 ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL);
722 722
723 if (!edata->once) t = ecore_time_get(); 723 if (!edata->once) t = ecore_time_get();
724// printf("ECORE_EVAS: drm tick %1.5f @ %1.5f\n", t, ecore_time_get());
724 ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h}, 725 ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h},
725 t - edata->offset); 726 t - edata->offset);
726 } 727 }
diff --git a/src/modules/ecore_evas/engines/drm/meson.build b/src/modules/ecore_evas/engines/drm/meson.build
index 584cc56159..58071010d0 100644
--- a/src/modules/ecore_evas/engines/drm/meson.build
+++ b/src/modules/ecore_evas/engines/drm/meson.build
@@ -1,7 +1,3 @@
1if get_option('opengl') != 'none'
2 config_h.set('BUILD_ECORE_EVAS_GL_DRM', '1')
3endif
4
5engine_src = files(['ecore_evas_drm.c']) 1engine_src = files(['ecore_evas_drm.c'])
6engine_deps = [ecore_drm2, ecore_input, eeze, elput, libdrm, engine_drm] 2engine_deps = [ecore_drm2, ecore_input, eeze, elput, libdrm, engine_drm]
7 3
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index bd1022e3e5..c52022b333 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -37,16 +37,23 @@ static void _ecore_evas_wl_selection_init(Ecore_Evas *ee);
37 37
38/* local functions */ 38/* local functions */
39static void 39static void
40_anim_cb_tick(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp EINA_UNUSED, void *data) 40_anim_cb_tick(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp, void *data)
41{ 41{
42 Ecore_Evas *ee = data; 42 Ecore_Evas *ee = data;
43 Ecore_Evas_Engine_Wl_Data *edata; 43 Ecore_Evas_Engine_Wl_Data *edata;
44 double t, rt;
45 static double pt = 0.0, prt = 0.0;
44 46
45 edata = ee->engine.data; 47 edata = ee->engine.data;
46 48
47 if (!edata->ticking) return; 49 if (!edata->ticking) return;
48 50 t = ((double)timestamp / 1000.0);
49 ecore_evas_animator_tick(ee, NULL, ecore_loop_time_get()); 51 ecore_loop_time_set(t);
52 rt = ecore_time_get();
53// printf("ECORE_EVAS: wl client anim tick %p | %p - %1.5f @ %1.5f delt=%1.5f | %1.5f\n", ee, edata, t, ecore_time_get(), t - pt, rt - prt);
54 ecore_evas_animator_tick(ee, NULL, t);
55 pt = t;
56 prt = rt;
50} 57}
51 58
52static void 59static void
@@ -140,7 +147,8 @@ _ecore_evas_wl_common_cb_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED,
140 ev = event; 147 ev = event;
141 ee = ecore_event_window_match((Ecore_Window)ev->window); 148 ee = ecore_event_window_match((Ecore_Window)ev->window);
142 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 149 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
143 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 150 if ((Ecore_Window)ev->window != ee->prop.window)
151 return ECORE_CALLBACK_PASS_ON;
144 if (!_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON; 152 if (!_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON;
145 153
146 ecore_event_evas_seat_modifier_lock_update(ee->evas, 154 ecore_event_evas_seat_modifier_lock_update(ee->evas,
@@ -162,7 +170,8 @@ _ecore_evas_wl_common_cb_focus_in(void *data EINA_UNUSED, int type EINA_UNUSED,
162 ev = event; 170 ev = event;
163 ee = ecore_event_window_match((Ecore_Window)ev->window); 171 ee = ecore_event_window_match((Ecore_Window)ev->window);
164 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 172 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
165 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 173 if ((Ecore_Window)ev->window != ee->prop.window)
174 return ECORE_CALLBACK_PASS_ON;