Commit Graph

51853 Commits

Author SHA1 Message Date
Bruno Dilly 6f9deb976a Merge branch 'devs/bdilly/edje_multiseat'
This series implement multiseat support on Edje:
 * emit signals with seat name as suffix
 * handle multiseat focus
 * add optional argument to FOCUS_SET and FOCUS_OBJECT actions
   to specify a seat
 * add Edje naming for seats (incremental) with flag
   to disable this behaviour - so custom (evas) names will be used
 * add 3 examples exploring all these new features

Reviewed By: cedric, iscaro, jpeg

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

@feature
2016-12-19 15:19:06 -02:00
Bruno Dilly 4449ec8698 edje/examples: add example of use_custom_seat_names flag
Since seat names defined on evas will depend on evas backends,
maybe udev rules, etc, we aren't able to demonstrate it
without manually setting another name for such seats
with efl_input_devices_name_set(). Otherwise
we wouldn't have guarantees it would match
names on EDC.
2016-12-19 14:58:35 -02:00
Bruno Dilly 60b160f47c edje/examples: add example for focus actions
Just a regular (non multiseat) focus example for
actions FOCUS_SET and FOCUS_OBJECT
2016-12-19 14:58:35 -02:00
Bruno Dilly 287486e920 edje: add flag to choose between evas or edje seat naming
collections.group.use_custom_seat_names should be set to '1'
to use seat names on signals as provided by Evas.

By default just follow Edje naming approach
("seat1", "seat2", ...)
2016-12-19 14:58:35 -02:00
Bruno Dilly f34220f089 examples/edje: add dynamic seats example
It's an example of how themes can be implemented even if the number
of seats using the UI is unknown, and how it can be done
using scripts or C code.
2016-12-19 14:58:35 -02:00
Bruno Dilly c6399665dd edje: support action seats on edje_edit 2016-12-19 14:58:35 -02:00
Bruno Dilly 0ab6567b3e edje: accept optional seat parameter on FOCUS_OBJECT
If not provided, FOCUS_OBJECT action will keep acting
over default seat.

Also include a usage on edje-multiseat test
(actually no example was exercising this action).
2016-12-19 14:58:35 -02:00
Bruno Dilly 7ef5f6c3a0 examples/edje: add multiseat example 2016-12-19 14:58:35 -02:00
Bruno Dilly bb3fd015de edje: add names for seats following an incremental pattern
This way it'll be possible to write EDC with seat names that
will work no matter how seats are named by each ecore_evas
backend or users.
2016-12-19 14:58:35 -02:00
Bruno Dilly 5cfdf3ec3a edje: support seat on focus action and signals
Seat goes as an optional parameter for FOCUS_SET (if not
provided, act over default seat), and emit signals
with seat suffix:
 * focus,in,$SEAT
 * focus,out,$SEAT
 * focus,part,in,$SEAT
 * focus,part,out,$SEAT
2016-12-19 14:58:35 -02:00
Bruno Dilly fecd59fe32 edje: add new signals providing seat information
Add the following signals:
 * mouse,in,$SEAT
 * mouse,out,$SEAT
 * mouse,move,$SEAT
 * mouse,clicked,$BUTTON,$SEAT
 * hold,on,$SEAT
 * hold,off,$SEAT
 * drag,$SEAT
 * drag,start,$SEAT
 * drag,stop,$SEAT
2016-12-19 14:58:35 -02:00
Bruno Dilly 2958aba23a evas: add getter for devices by name
Make it possible to get the evas device given
its name. It sounds useful for Edje since
programs will reference seats by name.
2016-12-19 14:58:35 -02:00
Mike Blumenkrantz 25792d6416 build: enable -Wfloat-equal for compiling
#WarningOfTheMonth
2016-12-19 11:12:02 -05:00
Gustavo Sverzut Barbieri a7657e821f ecore_con/ecore_ipc: flush should wait for connection.
Some applications will create the handle, immediately send data, flush
and delete it, expecting the data to be sent to remote peer.

This is a bad behavior as the application would become unresponsive
until the connection is established, data can be written (since
depends on server consuming it), then allow it to be closed.

A proper behavior here would be to chain based on events, with the
usage of a copier would be simply wait for "done" event.

However the legacy API allowed this and terminology depends on this
awkward "feature", thus be bug-compatible.

This fixes T5015.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri fe668ef52c efl_io_file: initialize all fd to -1.
Since 0 is a valid fd, we should initialize these to -1.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri b4c80b50bc efl_net_socket_fd: initialize fds to INVALID_SOCKET
Since 0 is a valid fd, then we'd try to do socket operations on it,
which would generate misleading errors.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri ae054e6c0b ecore_con/ecore_ipc legacy: fail early for local sockets.
In the old/legacy API the socket would be opened early in non-blocking
mode (connect returned errno==EINPROGRESS), with UNIX socket being
path-validated early and returning NULL as 'server' handle.

Some applications relied on this instead of monitoring the "ERROR"
events, considering the connection to be successful if there was a
handle -- this was the case with Terminology after it moved from DBus
to Ecore_Ipc.

Although this is not correct, we must keep compatibility and thus we
stat() in compatibility layer, failing early as the old API would do.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri 482437ee14 ecore_con/ecore_ipc: keep log domain alive after shutdown.
These legacy API had the nasty behavior of keeping handles alive until
the pending events were dispatched, this could happen after the module
itself was shutdown, resulting in log to unregistered domains.

Then do not unregister the domain -- eina_shutdown will avoid leaks
anyway.
2016-12-19 13:03:33 -02:00
Chris Michael d0a6263519 elput: Fix resource leak
Coverty reports that we leak 'reply' here if we fall into the error
condition.

CID1367506

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-19 09:49:36 -05:00
Chris Michael fe27a8d440 elput: Fix resource leak
Coverity reports that 'reply' is leaked here if we fall into the error
condition.

CID1367507

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-19 09:48:30 -05:00
Gustavo Sverzut Barbieri 3ff5dc33e2 coverity: add modeling file to reduce false positives. 2016-12-19 11:09:02 -02:00
Gustavo Sverzut Barbieri 7de5146a3b efl_net: fix CID 1367489 due copy & paste.
we're looking at "x" since it's the return of getaddrinfo(), not "r"
which is used for something else.
2016-12-19 10:37:21 -02:00
Gustavo Sverzut Barbieri 74d8148da3 efl_debug_common: remove stale code/macros.
These are not needed anymore.
2016-12-19 09:52:30 -02:00
Jean-Philippe Andre 72f98a0649 evas/ply: Fix some memleaks
I have a strong feeling that this parser is not very robust...

Closes T5001
2016-12-19 12:06:24 +09:00
Andy Williams 34c28918d5 elm_code: Don't assume control characters make a change
@fix
2016-12-17 13:12:46 +00:00
Ivan Furs 1c0b3668e1 Eio_monitor: support native monitor for Win32 (T4978)
Test Plan:
eio_monitor_backend_add()  and eio_monitor_fallback_add use different structures
**eio_monitor_backend_add()  **
struct _Eio_Monitor_Backend
{
   Eio_Monitor               *parent;
   Eio_Monitor_Win32_Watcher *watcher_file;
   Eio_Monitor_Win32_Watcher *watcher_dir;
   Eio_Monitor_Win32_Watcher *watcher_parent;
};

**eio_monitor_fallback_add()**
struct _Eio_Monitor_Backend
{
   Eio_Monitor *parent;

   Eina_Stat self;
   Eina_Hash *children;

   Ecore_Timer *timer;
   Ecore_Idler *idler;
   Ecore_Thread *work;

   int version;

   Eina_Bool delete_me : 1;
   Eina_Bool initialised : 1;
   Eina_Bool destroyed : 1;
};

therefore, an error occurs
**void eio_monitor_backend_del**(Eio_Monitor *monitor)
{

   if (!_eio_monitor_win32_native)          <------_eio_monitor_win32_native is EINA_TRUE
     {

        eio_monitor_fallback_del(monitor);  <------ignored------
        return;                             <------ignored------
     }

   _eio_monitor_win32_watcher_free(monitor->backend->watcher_parent);
   _eio_monitor_win32_watcher_free(monitor->backend->watcher_dir);
   _eio_monitor_win32_watcher_free(monitor->backend->watcher_file);
   free(monitor->backend);
   monitor->backend = NULL;
}

Reviewers: raster, vtorri, an.kroitor, jpeg, reutskiy.v.v, FurryMyad, cedric

Reviewed By: cedric

Subscribers: vtorri, artem.popov, cedric, jpeg

Tags: #windows, #efl

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-16 15:27:14 -08:00
Hosang Kim 2b3bee1301 scrollable_interface: fixed logic for calcualting position to scroll.
Summary:
When width of parameter(w) is bigger than or equal to scroller's width(pw),
scrollable object must be scrolled to x position.

Test Plan: elementary_test -> focus 4

Reviewers: woohyun, SanghyeonLee, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4491
2016-12-16 15:26:00 -08:00
Hosang Kim 763478c091 elm_widget: add logic for updating geometry after moving
Summary:
scrollable object.

In multiple scrollable case, the target object should be updated.
Because the first object is scrolled. So the parent of the first object should be scrolled.

Reviewers: woohyun, Hermet, jpeg, cedric, raster

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-16 15:24:04 -08:00
Cedric BAIL 0f65bde10c edje: handle case when strdup would be NULL.
alternate solution to D4488. Would be better to have a buffer and recycle it.
2016-12-16 15:15:17 -08:00
Jee-Yong Um 4ea7effe70 elm.hoversel: fix item size calculation
Summary:
The way to find the position of hoversel expansion is based on geometry
currently, but it causes errors when theme is not made as expected.
This patch makes hoversel use string to find the right position and
calculate item width correctly when items are shorter than hoversel itself.

Test Plan:
elementary_test -to hoversel
(error case shows in tizen mobile device when screen is rotated)

Reviewers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-16 15:02:09 -08:00
Cedric BAIL 9393560178 eio: check error case for eina_value_get.
CID 1356609
2016-12-16 14:10:58 -08:00
Cedric BAIL 2b7a68eb1b ecore: add test for efl_promise_connect. 2016-12-16 14:10:58 -08:00
Cedric BAIL 637073813b ecore: add helper to automatically connect a future result to a promise.
This helper is to be used likely with next and an external request.
2016-12-16 14:10:58 -08:00
Cedric BAIL b7635be57d ecore: add tests for new promise delayed behavior. 2016-12-16 14:10:58 -08:00
Cedric BAIL c1811de61f ecore: fix test to generate one main loop iteration to see promise fulfilled. 2016-12-16 14:10:58 -08:00
Cedric BAIL ca1762be21 ecore: delay promise fulfillment to next loop iteration. 2016-12-16 14:10:58 -08:00
Cedric BAIL b85332fc89 ecore: remove useless information from header. 2016-12-16 10:42:59 -08:00
Cedric BAIL 5882c30a98 ecore: refactor promise propagation code. 2016-12-16 10:19:37 -08:00
Derek Foreman c11b66434f evas engines: Stop using arrays of 1 member for egl context and surface
There's actually an array of 2 in gl_x11, but it appears we only use the
first 1, except in an #if 0 block.

I gather this is legacy for some reason - it sure doesn't seem to make
any sense now, so I'm chopping off all the extra array indexes.

Note: I've not changed gl_sdl - it looks like it doesn't use the context
or surface at all and they could just be removed, but I don't build that
one here and don't want to touch it.
2016-12-16 09:48:15 -06:00
Vyacheslav Reutskiy 6f41b7a690 edje_pick: copy images from image sets
@fix
2016-12-16 15:32:48 +02:00
Vyacheslav Reutskiy ca11f5d678 edje_pick: use separate Eina_List vars for different EINA_LIST_FOREACH 2016-12-16 15:32:20 +02:00
Jean-Philippe Andre a07877bd57 elm: Add a test case for evas masking
This tests masks of masks in a genlist, with maybe a map.
Nothing crazy.
2016-12-16 19:18:29 +09:00
Jean-Philippe Andre 584e17ae84 elm_layout: Implement Efl.Text
This implements support for efl_text_set() for the default
part (NULL). This also adds support for efl_text_set(efl_part())
for layouts. This should cover a LOT of widgets :)

The next step is to remove Elm.Layout.text but it's used in too
many places at the moment. @herdsman!!
2016-12-16 18:53:33 +09:00
Jean-Philippe Andre 03eb4c6409 evas: Fix issues with masking (make check)
After a previous patch, mask_subrender worked differently, and
didn't reset the object's cache clip color. This made evas_suite
fail. But also it seems some other issues creeped in and it was
necessary to fix the test case by adding data_updates (mistake!)
and removing an invalid draw call.
2016-12-16 17:10:01 +09:00
Carsten Haitzler 0bf269d966 elm - add test for efl ui win stacking api 2016-12-16 16:16:53 +09:00
Carsten Haitzler 4b96738443 efl_ui_win - use ecore_x window stack api to set up property in x11 2016-12-16 16:16:53 +09:00
Carsten Haitzler 75a429328a efl_ui_win - teamwork really has issues and i think needs deprecation
teamwork api in elm win (efl_ui_win) has a few issues:

1. it directly ddigs into ecore_wl2 and uses internal headers to use
zwp_* api's directly... which effectively tied elementary directly to
libwayland and thats not a good thing - thats why ecore_wl2 exists -
to act as a layer in between
2. the only thing that supports it is e and only wiht a module and
there is no fallback code in elm to work outside this environment, so
it's kind of broken by design and will not actually reliably work
3. from a stability and security point of view, and api and protocol
that allow a client to ask your wm/compositor to open ANY url - go
make a network request possibly to a hostile url/site is bad. needing
to handle so so so so many protocols, file types etc. etc. is going to
lead to issues that SHOULD at least be isolated in the app, but now it
spreads into your wm/compositor too. :(
4. there is ZERO benefit to asking the wm to do this. the app is
using efl already. it already has all the same abilities with the same
libraries to download/display etc. so why doesnt the app do it itself?
5. doesnt work in windows, osx, framebuffer (fbcon or drm)... only in
x11 and wayland. (and then only with e + module)
6. there is no way to detect if it's going to work and write your own
fallback (which shouldnt be needed/done anyway).

nice work and enthusiasm on making teamwork but it just isn't the right
thing - not in its current form and not by design (security reasons) :(

@deprecate
2016-12-16 16:16:53 +09:00
Carsten Haitzler 56b0b6490d ecore-x - add missing atom fetches!
ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE
ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY
ECORE_X_ATOM_E_KEYROUTER_SUPPORTED
ECORE_X_ATOM_E_KEYROUTER_WINDOW_KEYTABLE

all had no atom fetches! fix..

@fix
2016-12-16 16:16:53 +09:00
Carsten Haitzler 90be06df9e ecore-x - add e stack type atom and api's to set and get it 2016-12-16 16:16:53 +09:00
Carsten Haitzler 48ac4747b1 efl_ui_win - add window "view stack" api's and ability
this adds the a stack of windows (view stack, something like naviframe
but using multiple windows instead) to elementary allowing windows to
be put into a stack and treated as one "application" when ijn such a
stack with the newest window on top being the active/focused one (or
should be). this allows for special show/hide animations as well as
possibly special sizing policies and placement policies.

@feature
2016-12-16 16:16:53 +09:00