Commit Graph

52920 Commits

Author SHA1 Message Date
Stefan Schmidt 19d4f31839 release: Update NEWS and bump version for 1.19.0-beta4 release 2017-03-31 15:26:47 +02:00
Jean Guyomarc'h cd5e755951 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-03-31 14:11:01 +02:00
Jaeun Choi e2d1da14b8 elm_flipselector: delete ecore job in group del function
ecore_job_del was missing in a4d2c51d14
2017-03-31 14:17:12 +09:00
Jaeun Choi a4d2c51d14 elm_flipselector: fixed flipselector item deletion process
flipselector item destructor had a severe drawback and this patch fixes it.
when deleting multiple items at once, the view needs to be updated only once.
however, the destructor updated the view on deletion of
every single item and it caused a severe performance issue.
the worst case happened when deleting a flipselector object -
with 10000 items, it took 10 seconds to finish deletion.

this patch has two points:
1. if a flipselector object is on deletion, item destructor doesn't update the view
2. otherwise, view update is handled in one job for multiple item deletion
2017-03-31 13:30:53 +09:00
Al Poole 36ab489a6f Fixes latest crash w/rage
Summary:
eina_file_virtualize is causing issues.

memfile_set is better but see attached bt.

What to do???

Reviewers: raster, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4743
2017-03-31 11:13:04 +09:00
Andy Williams 6fb1782576 elm_code: Fix newline crash on BSD
@fix
2017-03-30 23:20:22 +01:00
Gustavo Sverzut Barbieri 13cd93f729 evil_string: fix strndup() for non-NULL terminated strings.
If the given string is not null-terminated, then strlen() will go out
of boundaries, we must limit the lookup to given 'n' parameter.

To do so use strnlen(), that is a strlen() bounded by a maximum size.
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 9486225744 ecore_con: remove warnings if FD_CLOEXEC is undefined.
currently it's being defined in evil_fcntl.h, but the actual
implementation of fcntl() in evil_fcntl.c is causing problems with
sockets. So one possibility is to remove the ifdef, another is to
change the implementation.
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 13a8842614 eina: fix compilation warning on _WIN32 due missing strndup()
Eina.h will include Evil.h, but those using direct include of internal
headers must include it as well.
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri a93c2740f2 others: support efl_net_dialer_windows.
these are not working on windows yet due other factors, anyway add the
proper ifdefs
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 6877ee8ad4 ecore_ipc: use new efl_net_*_windows classes. 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri a4be1e479c ecore_con_local_path_new(): implemented for Windows 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri fa0e2865a1 implement efl_net_{socket,dialer,server}_windows
This is the local socket for windows, analogous to AF_UNIX.

`Efl_Net_Socket_Windows` is the base class doing `ReadFile()` and
`WriteFile()` using overlapped I/O, as well as the close procedure
(`FlushFileBuffers()`, `DisconnectNamedPipe()` and
`CloseHandle()`). These are done on top of an existing HANDLE that is
set by `Efl_Net_Dialer_Windows` (from `CreateFile()`) or
`Efl_Net_Server_Windows` (from `CreateNamedPipe()`).

The overlapped I/O will return immediately, either with operation
completed or `ERROR_IO_PENDING`, which means the kernel will execute
that asynchronously and will later `SetEvent(overlapped.hEvent)` which
is an event we wait on our main loop. That `overlapped` handle must
exist during the call lifetime, thus cannot be bound to `pd`, as we
may call `CancelIo()` but there is no guarantee the memory won't be
touched, in that case we keep the overlapped around, but without an
associated object.

Windows provides no notification "can read without blocking" or
non-blocking calls that returns partial data. The way to go is to use
these overlapped I/O, with an initial `ReadFile()` to an internal
buffer, once that operation finishes, we callback the user to says
there is something to read (`efl_io_reader_can_read_set()`) and wait
until `efl_io_reader_read()` is called to consume the available data,
then `ReadFile()` is called again to read more data to the same
internal buffer.

Likewise, there is no "can write without blocking" or non-blocking
calls that sends only partial data. The way to go is to get user bytes
in `efl_io_writer_write()` and copy them in an internal buffer, then
call `WriteFile()` on that and inform the user nothing else can be
written until that operation completes
(`efl_io_writer_can_write_set()`).

This is cumbersome since we say we "sent" stuff when we actually
didn't, it's still in our internal buffer (`pd->send.bytes`), but
nonetheless the kernel and the other peer may be adding even more
buffers, in this case we need to do a best effort to get it
delivery. A particular case is troublesome: `write() -> close()`, this
may result in `WriteFile()` pending, in this case we wait using
`GetOverlappedResult()`, *this is nasty and may block*, but it's the
only way I see to cope with such common use case.

Other operations, like ongoing `ReadFile()` or `ConnectNamedPipe()`
will be canceled using `CancelIo()`.

Q: Why no I/O Completion Port (IOCP) was used? Why no
   CreateThreadpoolIo()? These perform much better!

A: These will call back from secondary threads, but in EFL we must
   report back to the user in order to process incoming data or get
   more data to send. That is, we serialize everything to the main
   thread, making it impossible to use the benefits of IOCP and
   similar such as CreateThreadpoolIo(). Since we'd need to wakeup the
   main thread anyways, using `OVERLAPPED.hEvent` with
   `ecore_main_win32_handler_add()` does the job as we expect.

Thanks to Vincent Torri (vtorri) for his help getting this code done
with an example on how to do the NamedPipe handling on Windows.
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 17444557de ecore_con_*_example: compile on win32.
- win32 doesn't provide getline().
 - _write() exists, use _write_() instead
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 8f6e3265b6 ecore_ipc_client_example: win32 doesn't provide getline(). 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri bfe2988f4d efl_net_dialer_unix_example: read in loop while "can_read".
While in UNIX we use 'select()/poll()' to query for read fds and this
will eventually callback with "can_read" event, use the loop to match
other implementations where can_read keeps true if not all data was
read.
2017-03-29 12:44:19 -03:00
Carsten Haitzler eac53691f9 fix ecore con client exmaple to match cmdline help output for options 2017-03-29 16:49:03 +09:00
Carsten Haitzler feeff68401 fix ecore con server exmaple to match cmdline help output for options 2017-03-29 16:28:21 +09:00
Jean-Philippe Andre c234422357 win: Mark unstable APIs as @beta (stack API)
We have a tag for unstable API, use it. It'll be visible in the
doc and force users to add the macro before being able to compile
code.

This amends d8dd685966.
2017-03-29 09:51:28 +09:00
Carsten Haitzler d8dd685966 window stacks - make these unstable bta api for now
until settled, make these as beta for now.
2017-03-28 13:51:39 +09:00
Carsten Haitzler 479fd24650 ecore timeline animators - actually state the starting time
the starting time has always been "now" like in timers (loop time). it
would appear some people don't know this.
2017-03-28 11:44:22 +09:00
Carsten Haitzler 1fa1b46ebf ecore pub headers - use __sun not __sun__ for ifdef for solaris 2017-03-27 19:09:25 +09:00
Vincent Torri eff7bab48f Eina_Value: strdup() is used, so include string.h 2017-03-27 08:22:06 +09:00
Vincent Torri ac47c93330 Ecore: siginfo_t type is defined in sys/siginfo.h on Solaris 2017-03-27 08:22:06 +09:00
Amitesh Singh ecd89e0591 gengrid: fix the crash in _elm_gengrid_item_edge_check
_elm_gengrid_item_edge_check can have eo_it as NULL if none of widget item
is focused. This could happen if item_focus is not enabled on items.

test case: elm test -> gengrid 2 (enable only "focus hightligt set") and move focus.

@fix

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-03-26 20:48:02 +05:30
Umesh Tanwar dd627324f9 Gengrid: Bring the item into view scope before swapping.
Summary:
The gengrid item should be into view scope while reordering the items.

@fix
Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Test Plan: elmementary_test -> gengrid 2 -> horizontal mode + reordering

Reviewers: singh.amitesh, cedric

Subscribers: cedric, atulfokk, jpeg

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

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-03-26 20:26:15 +05:30
Vincent Torri 02b6ee3ed8 Ecore_Con: Fix compilation on Solaris
FIONREAD is defined in sys/filio.h
2017-03-26 23:50:02 +09:00
Andy Williams d15faf08fe elm_code: fix CID 1368489
@fix
2017-03-25 12:59:13 +00:00
Derek Foreman 67e07e5d2d efreet: Don't prefer the second perfect over the first in desktop_exec_find()
We test a second match for a perfect match, then stop all further processing,
but we never test the first match. This leads to a situation where a system
wide .desktop file is given precedence over a local override.

Instead, check the first match too.

 #test-e
2017-03-24 14:59:11 -05:00
Mike Blumenkrantz acf4c35fd6 ecore-evas: better handling for pointer_warp with buffer canvas
if buffer canvas is not image object, this needs to emit a move event
to be consistent with other engines

probably this should emit events in all cases, but adding for image buffers
this close to release seems potentially risky so I'll leave that for later

ref 4a691f79df
2017-03-24 13:24:24 -04:00
Bruno Dilly e0170c2b0d evas_events: look for seats on hash instead of input devices
Summary:
Otherwise it won't ever find the modifier masks.

Fixes T5146

@fix

Reviewers: iscaro, Jaehyun_Cho

Subscribers: cedric, jpeg

Maniphest Tasks: T5146

Differential Revision: https://phab.enlightenment.org/D4738
2017-03-24 14:14:38 -03:00
Chris Michael 1a3bae8133 ecore-drm2: Remove unused field in Output structure
The 'planes' field in Ecore_Drm2_Output structure is unused and can
thus be removed here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-24 08:54:52 -04:00
Carsten Haitzler 8b8c8bf7df eet cmdline tool - dont give garbage certificate length if there is none 2017-03-24 14:14:51 +09:00
Jiwon Kim 25fcdde356 ecore audio: Fix loss of last stream
Summary:
pa_stream's write callback requires to size of stream data
using 'len' parameter.
This size depend on pulse audio's internal status and not
consistent.

When a efl read audio's last stream, length of read('bread')
is less than write callback's 'len' parameter.
If the gap between 'len' and 'bread' is small,
last stream is played fortunately.
Otherwise, the last stream is discarded.
(It is doubtful about pa_stream's pre-buffering.)

To prevent it, push silent stream which is amount
of deficient length.

@fix T5281

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, jpeg, woohyun

Maniphest Tasks: T5281

Differential Revision: https://phab.enlightenment.org/D4726
2017-03-24 10:34:54 +09:00
Jean Guyomarc'h 35a7e7ff18 ecore_evas: delete exit idler when done with it 2017-03-23 21:17:50 +01:00
Artem Popov 8d6c90351c Eina_Xattr: fix memory corruption
Summary:
There should be reallocation +1 (for last '\0') and also
checking >0, not !=0, because of getxattr can return -1 in case of error
@fix

Reviewers: cedric, raster, NikaWhite, jpeg

Reviewed By: NikaWhite

Subscribers: myoungwoon

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D4734
2017-03-23 16:27:22 +02:00
Carsten Haitzler 02a7e00c01 ecore_evas extn - fix buffer n check for lock files with untrusted val
the code added by minkyoung has a definite security flaw here trusting
e->response to be within a small range when all it is is an int -
range is not limited other than that... so fix the code to check for
range like further code below does.

this commit went in 2 days ago... so not an existing bug fix.
2017-03-23 16:27:19 +09:00
Jean-Philippe Andre 2787f0fe5d evas: Fix a rare issue with GL and map and mask
The things you learn to love...

The situation was:
- An object is mapped (naviframe in an animation)
- One of its children has a mask
- The window is rotated by 90 or 270 degrees (landscape)

The mask glsl code to invert the x,y coordinate depends on the
screen rotation and this somehow was wrong.

Tested on Tizen and in elm_test "Masking", made with @jiin.moon.

@fix
2017-03-22 14:29:02 +09:00
Andy Williams 2c0b850f57 elm_code: fix keyboard selection forward
@fix
2017-03-21 22:36:53 +00:00
se.osadchy a63ce8c2e2 elm_map: Fix work of elm_map_overlay_icon_set if icon is NULL.
Summary:
Delete check on NULL for icon object due to incorrect work. Function must delete
icon in map overlay (according to documentation) if we set NULL, but with this check -
nothing happening and after elm_map_overlay_icon_get we have not NULL returned value.
@fix

Reviewers: cedric, Hermet, raster, jpeg

Reviewed By: cedric

Subscribers: artem.popov

Differential Revision: https://phab.enlightenment.org/D4720
2017-03-21 11:13:15 -07:00
Umesh Tanwar b313b30cf7 ecore: proper macro usage for double comparision. Summary: The comparisions are done between doubles. EINA_FLT_EQ -> EINA_DBL_EQ
Summary: Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: singh.amitesh, cedric

Subscribers: jpeg, atulfokk

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-03-21 11:11:23 -07:00
Minkyoung Kim 38e6780262 ecore_evas_extn: do not update plug image when lockfile is invalid.
Summary:
This prevent invalid shared memory access.
Invalid access occur when server is resized sequentially from now to A-size
to B-size, and client receive A resize message after resizing B.
Then client try to render plug image with A-size, but shared memory is B-size
buffer. Size are mismatch. This makes segmentation fault when uploading texture(gl)
or rendering image(sw).

Test Plan: Indicator rendering on Tizen3.0 platform.

Reviewers: jypark, wonsik, dkdk, scholb.kim, jiin.moon, jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-03-21 11:05:58 -07:00
Jean-Philippe Andre 76b5749ea0 genlist: Fix another issue with insert sorted
Fixes T5274

@fix
2017-03-20 22:25:32 +09:00
Jean-Philippe Andre bcb8a7e8b8 evas gl: Fix a compilation warning
The fallback lib handle is not required unless EGL/GLES is used.
2017-03-20 12:51:50 +09:00
Marcel Hollerbach 12d01c1259 eina_debug: do not leak a spinlock when the path is not given 2017-03-18 22:10:43 +01:00
Derek Foreman 7b687c1a25 gl_drm: Fix KHR partial update support
I fixed this in other engines but missed this one.  The result is some
terrible flickering on gl_drm on recent mali drivers.
2017-03-17 15:32:26 -05:00
Derek Foreman 39da430878 ecore_drm2: Move function call after the NULL check
Was dereferencing ob before NULL checking it.  What could possibly go
wrong?
2017-03-17 15:06:39 -05:00
Derek Foreman 3b50c86985 gl_drm: Properly disable EGL_EXT_buffer_age when we don't have it
If we don't have EGL_EXT_buffer_age then we don't have buffer age - it's
a completely independent extension to KHR partial update.

This partially fixes partial update on recent mali drivers.
2017-03-17 15:04:47 -05:00
Mike Blumenkrantz 833444ac2a theme: remove event gaps in enlightenment window frames
@fix
2017-03-17 15:15:25 -04:00
Mike Blumenkrantz d0e5564c18 efreet: CRI and fail after 10 attempts to connect to efreetd
if efreetd cannot be connected to, stop infinitely trying to spawn it
since this generates crazy cpu load

probably this path should also send some cache events so that watchers
do not simply idle forever

ref T5200
2017-03-17 15:15:25 -04:00