Commit Graph

12148 Commits

Author SHA1 Message Date
Cedric BAIL 8280e523ee evas: always send a proper event to simplify callee logic.
@fix
2017-04-06 13:31:53 -07:00
Bryce Harrington 65d7438466 ecore_evas: fix 'be delete' to 'be deleted'
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4766
2017-04-06 14:14:09 -04:00
Jean-Philippe Andre 1d5b65ab85 access: Fix warning hiding a potential crash
See 5da4c96087
2017-04-06 18:14:40 +09:00
Jaeun Choi 53e31eeede emile_image: add error handling code for ifd_offset value
Signed-off-by: JEONGHYUN YUN <jh0506.yun@samsung.com>
2017-04-06 15:34:53 +09:00
Carsten Haitzler c3372a5c7a fix evas canvas callbacks to use correct legacy callback function 2017-04-06 14:43:04 +09:00
Carsten Haitzler 987620390b elm - cache dump - disable this to fix jp's issues of proxies etc.
this will stop proxies, maps, and other filter object content from
being dropped whenever elm calls elm_cache_all_flush() to flush all
caches.

@fix
2017-04-06 14:31:19 +09:00
Andy Williams ddb189bb1f elm_code: Fix crashes with backspace on OpenBSD
@fix
2017-04-05 23:59:23 +01:00
Andy Williams 650606ab90 elm_code: better safety around widget edge cases
Fixes crashes when dragging selection out of widget.
@fix
2017-04-05 22:40:43 +01:00
Shinwoo Kim 5da4c96087 elementary: access calls "access,activated" smart callback
The "access,activated" smart callback is called when "Activate the selected item"
gesture occurs.
Application could do the activation action using elm_access_action_cb_set.
But we recommend not to use elm_access_action_cb_set for this purpose on atspi
environment. And this would be usual widget behavior as elm_button does.
2017-04-05 19:58:46 +09:00
Bryce Harrington a28f4e3ba3 ecore_evas: Fix some pluralization grammatical errors
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4729
2017-04-04 09:24:55 -04:00
Bryce Harrington cd60f0a1be Evas_Common: Fix assorted typos
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4730
2017-04-04 09:23:55 -04:00
Bryce Harrington 51381d4e20 Evas GL: Correct a couple typos in doxygen comments
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4737
2017-04-04 09:21:34 -04:00
Bryce Harrington bab7d2ec41 Evas_Loader: Fix pluralization in grammar
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4736
2017-04-04 09:20:48 -04:00
Bryce Harrington 72878655b7 evas: Correct typos in Evas_Eo.h docs
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4735
2017-04-04 09:20:24 -04:00
Youngbok Shin 5da69d7ac9 evas textblock: fix top/bottom valign tag reversed issue
Summary:
valign tag is for handling vertical align according to line's height and
text's height. But, it worked in a line which has only one font and
one font size, too. And the result was abnormal depending its font.
The line's height is [ascent + descent]. But, Textblock uses max ascent and
items's height(could be used max ascent + max descent according to its position)
when Textblock calculates item's yoff.
So, If Textblock calculate yoff based on line's height,
it should use only ascent and descent instead of max ascent and max descent.
@fix

Test Plan: Will attached in comment section.

Reviewers: raster, herdsman, jpeg, woohyun

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4760
2017-04-04 18:36:42 +09:00
Vincent Torri 58d52a2309 Evil: fix fcntl() with sockets
On Windows, fd and sockets are different. Sockets are actually HANDLES, hence
_get_osfhandle() should not be used with sockets, and GetHandleInformation()
 and SetHandleInformation() can be used directly with sockets.

This is fixed by adding a function to test if the 'fd passed to fcntl() is a
socket or not.
2017-04-03 11:24:34 +02:00
Marcel Hollerbach 87a25fd353 combobox: fix 0px height on first click
the height of a item is 0 because the item is not realized, so if no
item is realized we are waiting until one is realized, until then we
just take 1px as a height, so at minimum one item needs to be realized.

If there is a realized item (or we are getting the event that there is
one) we are just calling _table_resize again, and are getting the size
for real.
2017-04-01 10:41:35 +02:00
Marcel Hollerbach 9661ab7052 combobox: fix layer setting for the hover
in cases where a ui is using layers other objects could overlap the
hover object. Which is wrong, the genlist should stay above the rest of
the content, in any case.
2017-04-01 10:41:35 +02:00
Marcel Hollerbach 4ef3f6366f combobox: Fix combobox for the case the parent is not the window
if the parent is not a window the elm hover is created for the parent of
the combobox, which is a problem because the hover will not expand to
its full size of the window, and will stay in the size of the parent.

Adding the top widget instead of the parent widget fixes that.
2017-04-01 10:41:35 +02:00
Andy Williams b40b1052b5 elm_code: fix backspace newline in BSD 2017-03-31 21:53:14 +01:00
Mike Blumenkrantz 0f6139b9cb ecore-evas: add flag for buffer canvas to prevent deadlock in pixels_get
when calling pixels_get during a render callback, another render would trigger
which would cause a deadlock from evas spinlock usage

@fix
2017-03-31 14:57:25 -04:00
Mike Blumenkrantz d956f34021 doc: add explicit note for timeline animator about first frame position 2017-03-31 14:57:25 -04: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
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 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
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
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
Andy Williams 2c0b850f57 elm_code: fix keyboard selection forward
@fix
2017-03-21 22:36:53 +00:00