Commit Graph

3331 Commits

Author SHA1 Message Date
Daniel Hirt 36a2e29624 Canvas text: fix re-add of existing style to list
Styles were appended regardless their key already existing.
Now it's fixed.
Also, improved readability of 'style_set'.
2017-08-07 19:36:23 +03:00
Mike Blumenkrantz 3e0c287da2 evas image: add checks for ENDT existence during image free
this is null e.g., during enlightenment restart and causes crashes, probably
should be removed after underlying cause is resolved

@jpeg
2017-08-07 10:50:08 -04:00
Mike Blumenkrantz 1b1fdda931 evas_object_image: formatting
this was unreadable at parts due to mixed tabs/spaces
2017-08-07 10:50:08 -04:00
Stefan Schmidt dbf7057bca Revert "efl: terrible kludge so avoid termination crash on osx"
This reverts commit 9368eedd35.

The release is out so we can revert this bandaid again. In the hope to
find the real culprit and solution before the next release.
2017-08-07 11:53:00 +02:00
Jean-Philippe Andre 1990104b5f evas: More debug_name information 2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 0353eb5b7f evas: Add debug_name to image objects 2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 999dbd9764 eo debug name: Use strbuf instead of slstr
This should be a little bit more efficient, even if more "risky"
in terms of leaks. The final API still looks exactly the same.
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 569ad0bac4 evas/edje/elm: Override debug_name in core classes
This is really only a demonstration of what kind of information
we can print with efl_debug_name_get(). Hopefully this can help
debugging with printf/ERR logs and even help with live debugging
inside gdb.

This shouldn't be used for other purposes than debugging, as the
exact string format is not defined.

@feature
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre fd9cf1d3b6 evas: Make all EO canvas objects visible by default
All legacy objects remain invisible by default. Any call to
visible_set() will prevent the automatic show() to happen.

show() will be done just before render time, which may be a
bit too late in order to propagate the necessary changes.

This may break some things where some objects are created
internally using efl_add() instead of the legacy API, and
the intent was not to show the object.

@feature
2017-08-04 10:24:03 +09:00
Jean Guyomarc'h 9368eedd35 efl: terrible kludge so avoid termination crash on osx
Currently, elementary programs crash on termination on macOS (seems
Sierra-specific). This is very nasty, looks like deep memory corruption...
Without valgrind (or like) support on Sierra, it is difficult to
pinpoint the origin of the problem.

Due to the imminient release, and after discussion with @stefan, this
kludge will allow the release to happen.

This commit MUST be reverted just after the release, so we don't
blindfold ourselves!

Ref T5245
2017-08-03 10:31:26 +02:00
jiin.moon 49bb102d16 evas: Add safety code for smart object
Summary:
If user use the evas_object_smart_callback_add with no smart object,
it should be returned

@fix

Test Plan: self

Reviewers: jpeg, cedric, jypark

Differential Revision: https://phab.enlightenment.org/D5056
2017-08-02 20:28:09 +09:00
Jean-Philippe Andre b10be4e2ed evas filters: Disable extra debug
Forgot to remove that! It's better to disable for the release,
DBG() and XDBG() are disabled anyway.

CID 1308611
2017-08-02 20:15:58 +09:00
Jean-Philippe Andre de99a71c43 evas filters: Shut up coverity
Add some safety checks.

CID 1374271
2017-08-02 20:15:57 +09:00
Jean-Philippe Andre 4299905996 evas: Rename calculate property to calculating
Recently introduced by @cedric
I think the name is not very clear, and is clashing with the
actual method of the same name.
2017-08-02 19:12:13 +09:00
Cedric BAIL ea5675a6a0 evas: add a way to know if we are already computing smart object calc. 2017-08-01 13:17:10 -07:00
Mike Blumenkrantz f6c465dc59 Revert "evas: Always call show/hide intercept"
This reverts commit 936ea58cb9.

this is an ideal change, but it breaks previously-expected behaviors
for interceptors and thus enlightenment is completely broken
2017-08-01 13:29:46 -04:00
Carsten Haitzler c5a5302e06 evas - handle devices that on deletion delete other devices on shutdown
this fixes a whole bunch of warnings that just recently turned up...
2017-07-31 15:07:28 +09:00
Carsten Haitzler 6e82f90807 evas mem - remove redundenty unused evas mem absraction
was never used as was not practical to do so so it effectively does
nothing so remove it to reduce analyser warnings

found by PVS studio
2017-07-31 11:53:59 +09:00
Carsten Haitzler 26e93caec7 evas textblock - remove redundant check
found by PVS studio
2017-07-31 11:34:41 +09:00
Carsten Haitzler 6ac4ea2080 evas cache2 - remove excess file and key checks - only check file
no need for key as no key is handled and no file is handled too. cleaner
code.

found by PVS studio
2017-07-31 10:58:04 +09:00
Carsten Haitzler 29eebb44fc evas render - remove obj null check in proxy clip as obj not null
obj is never null. so this check is pointless. not a bug though.

found by PVS studio
2017-07-29 12:26:49 +09:00
Carsten Haitzler 3c27869c93 evas object textblock - fix append if cur node is null
then it will appeand totally as it should be. small buglet found. fixed

found by PVS studio

@fix
2017-07-29 12:20:12 +09:00
Carsten Haitzler 302731e1af evas events - remove set of list to null then back to value - confusing
eina_list_free always returns NULL. it's meant as a design pattern to
follow like the append/prepend that ensures a freed list is NULL, but
it can be confusing to analysers so remove the assing. not a bug
actually.

found by PVS studio
2017-07-29 09:08:40 +09:00
Carsten Haitzler e9ab26ae53 evas obj smart - remove pointless if
s is already checked for null... so no need to check again

found by PVS studio

@fix
2017-07-29 09:08:40 +09:00
Carsten Haitzler fec726e7e5 evas legacy event mask - cast to unit64_t before bitshift
this fixes a bit wraparound in the shift as the 1 is an int (32bit)
type that then gets shifted .. then after that cast to 64bit.

found by PVS studio

@fix
2017-07-29 09:08:31 +09:00
Mike Blumenkrantz 6dc937d26c Revert "evas: Fix use of invalid EO object"
This reverts commit 9b1e785f8e.

this breaks devices with vt switching under drm
2017-07-28 15:40:47 -04:00
Jean-Philippe Andre 936ea58cb9 evas: Always call show/hide intercept
Ref T5370
2017-07-27 15:53:43 +09:00
Carsten Haitzler 3826f21a29 evas seat focus add - handle other case where layer may be null
fix CID 1377522
2017-07-23 19:30:31 +09:00
Carsten Haitzler b3b0411a05 evas callbacks - check if obj->events is valid because it's cow alloced
it COULD be null and we do have other checks for it being not-null and
we dont check if the alloc fails...  so check. this SHOULD fix
CID 1377547
2017-07-23 18:53:46 +09:00
Carsten Haitzler 4095165385 efl canvas image - dbug ingo get - dont get if no root dbg info supplied
if root dbg info is null we'll leak and not have anything useful
stored somewhere for fetching anyway.

this should fix CID 1365656
2017-07-23 18:36:44 +09:00
Carsten Haitzler 60d2bd233b evas module load add comments pointing out this is intentional ptr loss 2017-07-23 18:29:57 +09:00
Daniel Hirt 01a693412f Evas textblock: add definition to 'cursor_equal'
This is a follow-up to c4ea25cbdb to fix
legacy API.
The definition was missing, so adding it.
2017-07-20 19:20:36 +03:00
Jean-Philippe Andre 7243b71a19 evas: Restore flag pre_render_done in render_mapped
Some objects don't go through render_pre (unchanged, child
of mapped parents), even though they will go through
evas_render_mapped. Those were marked as pre_render_done
inside evas_render_mapped since it seemed to fix some issues
a long time ago.

Unfortunately, if those objects are changed their flag may
not be reset to false, which means they never go through
render_pre, leading to render issues.

I believe simply restoring the value of the pre_render_done
flag should be good enough. I don't know why it is set to
true inside evas_render_mapped but I also don't want to find
out :)

See 9ac13e4aec (old)
See 87e5e70a9d (older)

Patch made with @jiin.moon
2017-07-20 15:17:36 +09:00
Jean-Philippe Andre cb19c77558 evas: Avoid infinite loop on evas shutdown
If an object fails to call efl_destructor() on all the parent
classes, then it may never be removed from the layer object
inlist and never would its data be deleted either (eo keeps
it safely alive).

Here's how to test: add a "return;" statement inside an object's
destructor (eg. the window class).

Fixes T5680
2017-07-20 14:59:25 +09:00
Jean-Philippe Andre bbfdf8909b evas focus: Fix crash when shutting down with errors
Example test: add many evas_object_ref() to a window and click
on its X to close it.
2017-07-20 14:46:49 +09:00
Jean-Philippe Andre b98bc51968 evas: Fix cmopilation warning
Oops I forgot to add that to the previous commit!
2017-07-19 14:01:07 +09:00
Jean-Philippe Andre 45c8e5e983 evas: Fix support for image_data_get on snapshot
evas_object_image_data_get() is a legacy API that I made work
with snapshot objects (evas_object_image_snapshot_set()). Some
changes in the engine broke the behaviour and this patch fixes
it.

When getting the pixels from an FBO, in read-only mode, we need
to create a temporary image (pixels surface) that contains the
copy of the pixels we get from glReadPixels. This image needs
to be deleted afterwards. It is thus stored by the image object
and freed upon _image_data_set() (good) or object deletion (bad).

FBO + read-write is not supported by this API (it is supported
through buffer_map as the filters had to use that).

Fixes T5754
2017-07-19 13:59:42 +09:00
Daniel Hirt 4923945f81 Text: move Annotation type to Efl.Text.Annotate namespace 2017-07-17 17:38:28 +03:00
Daniel Hirt d5f781da2b Efl text: replace all usages of cursor handle to same type
Changes cursor handle name from 'Efl.Text.Cursor.Cursor_Data' to
'Efl.Text.Cursor.Cursor'.
Also, replace all usages of Efl_Canvas_Text_Cursor
with Efl_Text_Cursor_Cursor as the handle for the cursor.
2017-07-17 16:51:45 +03:00
Daniel Hirt c4ea25cbdb Evas textblock: fix legacy header
Fix ABI changes with const qualifiers, as well as some missing docs.
2017-07-17 16:50:31 +03:00
Daniel Hirt bb2678d403 Canvas text: re-add support for tabs
Somehow this was left out. Fixes tabs, so you can now use "\t" and
press the "tab" key.
2017-07-17 16:50:31 +03:00
Andy Williams 77adf813d5 doc: Include two missing properties 2017-07-13 23:19:52 +01:00
Jean-Philippe Andre 9513fed85e evas_smart: Fix evas_smart_callback_description_find
bsearch was returnign a cb** not a cb*

Fixes T4540
2017-07-12 17:38:51 +09:00
Carsten Haitzler ea7dd2a9c2 evas mouse in/out/move event fix to remove "invalid move"
this should fix T5582 "properly" by emitting a move after an in only
if pointer x,y changed. this fixes rage and i hope still should handle
the original issue. let me know if it doesn't.

@fix
2017-07-12 15:45:47 +09:00
Youngbok Shin 5e5e408e58 evas font: append global font path when Evas initializes Fontconfig
Summary:
If there are appended font pathes before initializing Fontconfig,
Evas must care the font pathes after initializing Fontconfig.
@fix

Test Plan:
1. Call evas_font_path_global_append() with a private font path
   before adding any Evas Object.
2. Add a Evas Textblock object which uses a font from the private font path.
3. See the font is not loaded properly without the patch.

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D4867
2017-07-11 15:46:04 +09:00
Bryce Harrington 05344040ec evas: Improve the documentation for evas_init() and evas_shutdown()
Summary:
Rephrase the documentation to read a bit more clearly, and restructure
the inclusions of stanzas from evas-buffer-simple.c to reflect the
recent updates to that example.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5015
2017-07-11 12:22:11 +09:00
Jaehyun Cho 078f83f4bc Evas textblock: add null check in evas_textblock_cursor_free 2017-07-10 21:02:13 +09:00
Jean-Philippe Andre 7f724f6c5d evas: Fix mouse event info in global events
When using the legacy API (and in fact also with the EO API) to
listen to mouse events (move, in, out...) on a window instead
of an actual evas object, some information was missing:
 - buttons (bitmask of pressed buttons)
 - prev.x/y (previous position)

This is because Evas had not handled the event yet at this
point, it was coming directly from ecore_evas with incomplete
information. This patch involves evas a little bit earlier, and
also fixes evas_events_legacy.c to have consistent values for
cur/prev canvas/ouput coordinates. See also 890a91785 and
484dae76e6. Those commits were making the pointer coord
a seat-based property (instead of canvas-based) but the event
should already have those proper values before converting to
a legacy struct. This patch restores the meaning of the DUP
macros, as I observed 4 different coordinates from the app side
(instead of just 2: prev and cur).

Thanks to Andy for reporting the original issue on the ML!
2017-07-10 17:01:05 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Jean-Philippe Andre 722725dfc5 evas: Fix a crash in textblock
I could not reproduce it but the case should not happen,
so I'm adding a safety check rather than a silent return.

The private data should be NULL only after evas_object_free()
or before construction...

Fixes T5656
2017-07-05 17:43:59 +09:00