Commit Graph

8320 Commits

Author SHA1 Message Date
Mike Blumenkrantz 7171135792 ecore evas should not crash when unsetting pointer
ref D812

disappointed.jpg
2015-02-06 17:54:08 -05:00
Jean-Philippe Andre 88e5369eee Evas masking: Add forgotten file in previous commit 2015-02-06 12:35:12 +09:00
Jean-Philippe Andre 73b16a4962 Evas masking: Also fix map masking with non-bgra images 2015-02-06 12:33:29 +09:00
Chris Michael 92954b707c ecore-drm: Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-05 11:21:36 -05:00
Chris Michael 773897b09b ecore-drm: Fix issue with ecore_drm_output_crtc_Find sending back an
invalid id. Fix T2086

Summary: In order to avoid getting returned an invalid id, we should
not be checking the currently active encoder and crtc combination
because outputs may have changed, encoders/crtc combinations could
have changed, etc, etc.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-05 11:08:36 -05:00
Michelle Legrand 73634580f8 ecore_cocoa: Handle more special characters and capital characters.
This improve the situation and only affect Ecore_Cocoa code base by
detecting a useful charactere.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Michelle Legrand 48fff1478c ecore_cocoa: add ecore event on mouse scroll for cocoa.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Michelle Legrand c9dd8fde7d ecore_cocoa: replace "keyname" by "key".
Ecore_Event_Key attribute "key" cannot be NULL. This
raise a segmentation fault in Enventor when hitting on
modifier keys.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Nicolas Aguirre 72baccaf44 ecore_cocoa: create a log domain and use Eina_Log.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Nicolas Aguirre 61fbb2ffd9 ecore_cocoa: don't send mouse event with negative x or y values.
With cocoa you may have negatives values when Mouse Down or Up. This
changes fix this behavior by sending mouse event only if x and y are
inside the ecore_evas space.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier ff9eb2e8e7 ecore_cocoa: add new events type for multiple window support.
This commit adds a method in Ecore_Cocoa_Window to be able to retrieve an unique
identifier for each window. It adds new events type and modify existing ones to
pass these windows identifiers through the event call chain. Resize, GotFocus and
LotFocus events are also updated to pass these identifiers to event handlers.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier c6945c075e ecore_cocoa: use the right Cocoa notification handlers for focus events
Don't use NSAppKitDefined events subtype for focus events, which contain NULL
window object most of the time. Use the NSWindowDelegate method designed for that
purpose instead. It fixes random focus issues in windows which was caused by
incorrect window identifier not found in ecore_evas_cocoa.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier 382957c2b3 ecore_cocoa: add on the fly resizing support.
Until now, video_resize events was received only when application returned control
to the event loop. When a window is resized dynamically a lot of video_resize
events are emitted from EcoreCocoaWindow::windowDidResize and not handled
immediatly, only when the main thread is back to the ecore main loop. This is why
there are not refreshed window areas. Call ecore_main_loop_iterate() from
windowDidResize solves the issue.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier 2f6c564cc9 ecore_cocoa: fix _nsevent_window_is_type_of() type check
isKindOfClass should receive an instance of a class and a class as arguments and
not two class. It fixes Mouse events sent to a window on OSX.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Michelle Legrand 1d18543719 ecore_cocoa: handle more special characters and capital characters.
This patch is self contained for Mac OS X and improve its keyboard handling.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
pierre lamot 8c56edbdf5 eina: fix eina_test_rwlock test on OSX.
add a reimplementation of clock_gettime for OSX within the test in
order to be able to test eina_condition_timedwait

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
pierre lamot 9ee7f46eb3 ecore: check that a test doesn't enter in an infitie loop.
check that ecore_test_ecore_thread_eina_thread_queue_t6 doesn't
enter in an infinite loop if something goes wrong, if the main thread
doesn't receive the message number 10000

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
pierre lamot 6fd31ab552 eina: fix semaphore initialisation
This patch fix the semaphore initialisation on posix plateform

there was a preconditon test which returned the semaphore
uninitialised when count_init was 1, this caused the semaphore to
be unusable on OSX plateform. Furthermore, it seems that we need to
unlink the semaphore before its initialisation on OSX as there seems
to have some kind of persistence of the semaphore accross execution.

warning, this patch change the signification of the parametter
count_init on linux plateform, this parametter is now consistent on
every plateform, with the meaning of setting the initial count value
of the semaphore.

This used to be on linux 1 -> the semaphore is shared and initialised
at 1 and 0 -> the semaphore is not initialised, thus, by side effect
not shared and initialised at 0.

This patch set on linux plateform the semaphore as systematically
shared

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
pierre lamot 17e73dca05 evas: jpeg decoders alows a difference of 1 bit per component.
The required precision of decompressed images allows a difference of
1 bit for each pixel compoment [1] . Such difference has been noticed
on OSX when using libjpeg9 from macports.

evas_suite images tests has been modified to compare jpeg images with
this tolerance. Other image formats are still compare with exact
precision

[1] http://en.wikipedia.org/wiki/JPEG#Required_precision

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
pierre lamot 66c0f3261d ecore: fix path comparison in Ecore_File test suite.
The Ecore_File test suite was comparing path with strcmp,
which can lead to incorect comparison in some case (comparing
realpath and expected path for instance)

This patch adds a function to compare paths within this tests. Paths
are compared by getting the "realpath" of each operand

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
pierre lamot 019b9e55c9 eina: memcmp can't be used to compare timeval due to potential padding on 64bit architecture.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
Nicolas Aguirre 71dd24a481 edje: epp - fix build of edje file in cas of recursive includes.
Amitesh Singh fixed this issue with Commit
e66e132d9d, but this commit has been reverted
recently, by a commit freeing ressources
(6d0b834a76). It's clear that we are leaking here
if we remove the free, but there is also a valgrind error when this memory is
freed. After trying to debug and understand the code of epp, i can only
propose to remove this free, we will need to include a lot of files before this
memory leak could be visible.

It is also not a real problem, the memory leak only concern the file name passed
in the include directive and epp is started per file anyway. It is unlikely to
create any real life problem and we better spend our time on more pressing matter.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:59:10 +01:00
Oleksandr Shcherbina 8802ce2051 evas: Evas_3D - fix order of transformation while updating bounding object.
Summary:
The order of tranformation changed to scale, orientation, position as
in some cases it can lead to incorrect value for the bounding box.

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1942

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Oleksandr Shcherbina 0c4de0235c evas: Evas_3D - fix evas_3d_scene_pick when trying to get empty texcoords from mesh.
Summary:
During filling evas pick public data by API evas_3d_scene_pick
segfault can occur if mesh was created without texcoords.
See functions - _pick_data_mesh_add, _pick_data_texcoord_update

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1941

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Guilherme Lepsch c5c70e54fc eldbus: eina_value not allocated from mempool.
Summary: Eina_Value must be allocated with eina_value_new() to be freed by eina_value_free().
@fix

Reviewers: felipealmeida, larryolj, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1927

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Bogdan Devichev 36515241b9 evas: Evas_3D - fix when bounding sphere is large, situation with incorrect frustum calculation was possible.
Summary: When center of bounding sphere was out of frustum and number of intersections between bs and planes of frustum was more then 3, objects disappeared.
@fix

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1938

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Daniel Hirt d503dbeed1 eina: Eina_File - add test case for path resolution.
Summary:
This is a follow-up to the 7cbf22212f
revert commit. It's a bit late, as the issue has already been fixed with
the later 7143bd7fb5 commit.

This test checks eina_file_sanitize "../" case with absolute paths (i.e.
that start with "/"), and should fail prior the revert mentioned above.

Should come up with more tests like this one.

Reviewers: stefan_schmidt, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1937

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
vivek e1eff60c80 eina: Eina_Value - use eina_mempool_free to cleanup the memory
Summary:
The new value is allocated using Eina_Mempool, it should be freed using
eina_mempool, not using libc free.

@fix

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1940

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Jean-Philippe Andre 7d6bb7fe5a Evas masking: Fix GL masking with maps and stuff
This fixes an issue spotted after the previous fix.
Passing the Y-invert flag is necessary because in the usual
case a map is rendered with Y-invert (OpenGL coords vs. Evas coords)
but in case a map is rendered in an FBO (another map's surface)
then Y-invert must be unset.
2015-02-05 22:31:35 +09:00
Jean-Philippe Andre 69818e7c45 Evas masking: Fix another issue with masking
Fixes rendering in the following case:
- Object with a map has a mask
- Object is child of smart object which also has a map (eg. transit)
--> Masking did not apply to the children before this patch.

NOTE: This works fine in SW but still didn't work in GL, see the
      following commit...
2015-02-05 22:31:16 +09:00
Daniel Kolesa 8abe1a06f8 elua: correct eo inheritance behavior
Now we try to treat first inherit as a parent and everything else as a mixin.
If the first inherit is not a class (interface or mixin), every inherit is
treated as a mixin.

@fix
2015-02-05 11:10:29 +00:00
Guilherme Lepsch cd0cca6f80 eldbus: fix memory leak.
Summary:

@fix

Reviewers: felipealmeida, larryolj, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1920

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:28:37 +01:00
Srivardhan Hebbar a2d40968df Ecore_con: fix initialisation clean up and avoid memory leak.
Summary: When ecore_init failed or when failed to initialize ecore_con_log_domain, then evil_shutdown was not called. So cleaned up code and added the fix.

@fix

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1921

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:27:00 +01:00
Srivardhan Hebbar a9a027509c evil: prevent _evil_init_count from going below zero.
Summary: _evil_init_count should never go below zero. This can occur, if a developer mistakenly calls evil_shutdown before calling evil_init. So fixing the code so that it never goes below zero.

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1922

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:24:40 +01:00
Guilherme Lepsch 629b5e3d2b eldbus: production code inside Eina Safety Check assert.
Summary: Eina Safety Checks assert macros don't do anything (no-op) if EINA_SAFETY_CHECKS is undefined.

@fix

Reviewers: felipealmeida, larryolj, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1926

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:23:44 +01:00
Dmytro Dadyka dad7df18b8 evas: Evas_3D - fix bug with uninit Evas_Mat4 flag.
Reviewers: Hermet, raster, cedric

@fix

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1930

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:17:01 +01:00
Daniel Juyung Seo 63bdc07a1a edje: Fix typo in a documentation while reading it. 2015-02-05 10:50:03 +09:00
Chris Michael 5030782290 ecore-x: Port deprecated API and new API function to xcb
Summary: This ports the deprecated screensaver_suspend and new API
screensaver_suspend to work with xcb.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:28:01 -05:00
Chris Michael 52564251bc ecore-x: Deprecate old misspelled API function and add new one
Summary: This deprecates the old misspelled screensaver_suspend API
function and adds a new one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:26:53 -05:00
Chris Michael cf9f64cfc6 ecore-x: Deprecate misspelled screensaver API function
Summary: This API function is misspelled, so after speaking with
Stefan, we've decided to deprecate this function add add a properly
spelled one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:26:46 -05:00
Srivardhan Hebbar 6fedf6819a Ecore_con: preventing _init_con_ssl_init_count to go below zero.
Summary: _init_con_ssl_init_count should not go below zero. This can occur if a developer mistakenly calls ssl shutdown before calling ssl init. So adding the check to prevent this.

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1925

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-04 14:09:38 +01:00
Daniel Hirt 7143bd7fb5 eina: fix valgrind invalid read of size in eina_file_path_sanitize.
Summary:
Apparently eina_tmpstr_strlen counts the null character as well. This
doesn't follow how strlen works, as the latter excludes it from the count.
This resulted in mistreatment of the string in _eina_file_escape, with
tmp_str paths that had "../".

This fix will do for now, but it is advised that we avoid using
eina_tmpstr_strlen, to prevent such confusions in the future.

Test Plan:
The following lines will throw a valgrind 'invalid read of size 1' error
prior this fix:
  char *path = "home/mydir/../myfile";
  Eina_Tmpstr *tmp_str = eina_tmpstr_add(path);
  char *ret_path = eina_file_path_sanitize(path);

@fix

Reviewers: cedric, stefan_schmidt

Subscribers: tasn, cedric

Differential Revision: https://phab.enlightenment.org/D1929

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-04 14:08:36 +01:00
Cedric BAIL 6a3971ec3d edje: quick fix to guarantee that ed->path is always correctly set.
NOTE: It will be better to completly remove ed->path in favor of using ed->file->f,
but that would be way to intrusive for this release cycle.
2015-02-04 14:08:07 +01:00
Carsten Haitzler e483d25082 ecore-x - undo api/abi break with input selecting before release 2015-02-04 18:58:48 +09:00
Carsten Haitzler b86579bed6 eet - fix endianess break added by cedric a year ago in image decoding
@fix

this fixes T1987 - the commit that broke it was:

commit 18d494489c
Author: Cedric BAIL <cedric.bail@samsung.com>
Date:   Fri Jan 3 16:20:53 2014 +0900

    eet: use eina_swap*() function instead of custom slower one.
2015-02-04 18:04:55 +09:00
Jean-Philippe Andre 9466f32dae Evas masking: Fix rendering of restacked masks of masks in a map
I know. This title does not explain anything. Whatever.

This fixes the following issue:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
    small icons with masks.

Note: Once again this patch only affects code paths where an
      object is a mask.
2015-02-04 15:03:41 +09:00
Jean-Philippe Andre a688ba45c8 Evas masking: Fix some remaining issues with animations
Yeah, mixing maps and masks of masks in a genlist leads
to tons of amazing bugs :)

This commit removes x,y from the "mask" field in an object,
as they are duplicates of cur->geometry.{x,y} but were not
properly kept in sync.

This patch fixes a situation of:
- A genlist in a map
- Each item has an icon masked
- Scrolling the genlist
--> The masked items would not render properly before this
    patch.

Remaining known problem:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
    small icons with masks.

Note: These changes look scary just before the release
      but I would have to backport them to 1.13.x as they
      definitely are bug fixes. Also, they only concern
      code paths used exclusively by masking.
2015-02-04 15:03:37 +09:00
Jean-Philippe Andre fbacbf7350 Evas masking: Fix masking of multiple objects in a map
All those masking bug fixes become harder to explain. But here goes:

 - Take a genlist, apply a mask to it (for example put everything
   in an elm_layout). Also play with various objects in the genlist.
 - Also apply a map to it (for instance, elm_transit zoom).

 --> Now some elements will be masked, some others will not,
     and some may even not render at all.

This patch restores a mask in the current drawing context, instead
of just unsetting it.
2015-02-04 12:48:10 +09:00
Jean-Philippe Andre 5fb43d3559 Evas masking: Forward previous mask where needed
In a situation where an object with mask of mask is in a map
(Yes! It can happen!) the masks would not get properly "multiplied".

Now the problem is that some objects still seem to bypass some
masks... Hmm...
2015-02-04 12:48:10 +09:00
Jean-Philippe Andre 89ee8e1446 Evas masking: Prevent drawing masks in the wrong surface
Masks should be actually rendered only to their specific target
surface.
2015-02-04 12:39:49 +09:00