animating comp objects persist after the lifetime of their client, so
ensure that functions which are likely to be called after the client's free
will not attempt to access client struct members
==13853== Invalid read of size 8
==13853== at 0x5C7C56: _e_comp_wl_surface_destroy (e_comp_wl.c:1804)
==13853== by 0xA999971: destroy_resource (wayland-server.c:611)
==13853== by 0xA9A06F4: for_each_helper (wayland-util.c:374)
==13853== by 0xA9A073F: wl_map_for_each (wayland-util.c:387)
==13853== by 0xA999C87: wl_client_destroy (wayland-server.c:763)
==13853== by 0xA999216: wl_client_connection_data (wayland-server.c:283)
==13853== by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853== by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853== by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853== by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853== by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853== by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853== by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853== by 0x441DA9: main (e_main.c:1089)
==13853== Address 0x30ba5d90 is 176 bytes inside a block of size 1,424 free'd
==13853== at 0x4C2ED4A: free (vg_replace_malloc.c:530)
==13853== by 0x4603D6: _e_client_free (e_client.c:588)
==13853== by 0x5475A8: e_object_free (e_object.c:119)
==13853== by 0x5477C4: e_object_unref (e_object.c:152)
==13853== by 0x5473D7: e_object_del (e_object.c:60)
==13853== by 0x5C7C51: _e_comp_wl_surface_destroy (e_comp_wl.c:1803)
==13853== by 0xA999971: destroy_resource (wayland-server.c:611)
==13853== by 0xA9A06F4: for_each_helper (wayland-util.c:374)
==13853== by 0xA9A073F: wl_map_for_each (wayland-util.c:387)
==13853== by 0xA999C87: wl_client_destroy (wayland-server.c:763)
==13853== by 0xA999216: wl_client_connection_data (wayland-server.c:283)
==13853== by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853== by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853== by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853== by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853== by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853== by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853== by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853== by 0x441DA9: main (e_main.c:1089)
==13853== Block was alloc'd at
==13853== at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==13853== by 0x5471A4: e_object_alloc (e_object.c:20)
==13853== by 0x467AD5: e_client_new (e_client.c:2596)
==13853== by 0x5C7F11: _e_comp_wl_compositor_cb_surface_create (e_comp_wl.c:1858)
==13853== by 0xADBDC57: ffi_call_unix64 (in /usr/lib64/libffi.so.6.0.2)
==13853== by 0xADBD6B9: ffi_call (in /usr/lib64/libffi.so.6.0.2)
==13853== by 0xA99EEED: wl_closure_invoke (connection.c:935)
==13853== by 0xA999581: wl_client_connection_data (wayland-server.c:371)
==13853== by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853== by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853== by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853== by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853== by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853== by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853== by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853== by 0x441DA9: main (e_main.c:1089)
This reverts commit cd3490f35c.
this breaks many windows by preventing deferred resizing from occurring.
a window which is unable to resize at the time of this call must be queued
for a deferred resize, otherwise it may never resize at all and thus will
never be rendered
test case: screenshot dialog
warning found a bug - filling in chr fileds with an api that expects
ptrs to ints - this is doing really bad things like unaligned writes
and it's overiting adjacent memory. fix
we did cast to Evas_Native_Surface * but this just causes warnings due
to the input ptr being char * from memcup. as this will be aligned due
to allocation, we're ok, so use a void * cast instead
we're pointer playing anyway so types here are not really useful. we
have to get our ptrs right - including alignment, and these warnings
are not useful and just noise.
this clears up soem warnings and do the cast on providing the pointer
to ecore_x_window_prop_property_get() which since it has to allocate
the data will be fine for alignment anyway, so a void * cast will do.
so we cast a lot of ptrs to other types as that is then the actual
type of the object. all these objects are allocated by malloc nad
friends so this is ok. but gcc on arm is not happy and warns. maybe it
assume this ptr could be to an element in an array of structs of this
type and so on thus will have specific alignment enforced by compiler
but our casting may disturb it? anyway. cast via void first fixes it.
we can focus on other real warnings and errors instead.
manually initializing this meant it needed to be kept in sync with the
header, something that I'm unlikely to check every time client hooks are
added/removed