Commit Graph

193 Commits

Author SHA1 Message Date
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Carsten Haitzler 0fd8cd82e3 ecore evas init - init ecore then evas not the other way...
because as of... i don't know when, evas relies on ecore with
ecore_pipe_add to create the async fd... and if you init evas then
ecore this doesnt work. obviously. well now it isn't working. probably
due to new efl loop work. but the efl loop code is correct.
ecore_pipe_add should never work until you init ecore... it just
happesn to have managed to be gotten away with for a while.

@fix
2018-01-05 02:34:16 +09:00
Cedric Bail 3b7607d7f6 ecore_evas: improve ecore_evas fallback animator logic for legacy case.
In Enlightenment with internal window being WL window connected to the
X11 backend, you end up with the later requiring the former to tick, even
if the former do not have a proper animator source. To work around the
problem when there is one backend that is not providing support for
animator source, we do need to avoid switching on another window source
as they could be linked somehow and we can not know.
2017-11-09 18:07:31 -08:00
Cedric Bail e5d1cc731a ecore_evas: always find a source for ticking legacy animator.
As we do not know when a window won't be able to tick, and we do
not know which window a legacy animator is attached to, we require
all windows to tick as often as they can and only generate one tick
per loop run.

This might need more adjustement especially with multi output.
2017-11-02 15:26:08 -07:00
Cedric BAIL 83493bba73 ecore_evas: if an async rendering is still going on, there won't be a new one starting. 2017-11-01 15:33:44 -07:00
Cedric BAIL 925d558780 ecore_evas: do not propagate drawing change blindly from sub surface to parent.
It is not because a round of rendering happen for a child, that it result in
actually drawing anything in the parent. The parent will always be aware of
the rendering request of the sub surface and we should only track what the
parent think.

T6049

Tested-by: Derek Foreman <derekf@osg.samsung.com>
2017-11-01 15:32:36 -07:00
Cedric Bail 6232fa2a9b ecore_evas: skip deleted Ecore_Evas while searching for a general animator source. 2017-09-22 14:57:15 -07:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Cedric BAIL d179a5c2a9 efl: remove PS3 backend.
This backend has received no patch and maintenance from anyone who could
actually test it over the last few years. After talking with KaKaRoTo it
is best to remove it. If anyone want to take over its maintenance, you
are welcome to revert this patch.
2017-08-25 10:48:42 -07:00
Jean-Philippe Andre d4b4ee867b evas: Modify wheel events direction to bool (EO)
The orientation was overkill here. We only want a bool.

Ref T5870
2017-08-10 14:42:08 +09:00
Cedric BAIL 2330d4fec1 ecore_evas: make sure fn_post_render callback is called last.
Should fix T5595.
2017-07-17 11:51:15 -07:00
Mike Blumenkrantz 3d4bb3851c ecore-evas: make the window_get apis return null without errors on failure
the normal usage of these is something like

if (!strcmp(engine, my_engine))
  win = window_get(ee);

which is a waste of effort since the window_get() functions all check
the engine interface internally
2017-07-14 18:43:00 -04:00
Derek Foreman 981d851d57 ecore_evas: Perform a tick before a manual render if we're not ticking
If we turned off the ticking with manual_render_set then perform a
manual render, we need animators to update.

ref T5462
2017-07-13 18:07:42 -05:00
Derek Foreman b86e6611f3 ecore_evas: Don't start custom tickers for manually rendered canvases
When a canvas is manually rendered the ticker is just a waste of cpu, and
worse - it can wake the drm back-end from dpms sleep, as the display needs
to be awake to generate vblanks.

We fire a DBG message when attempting to start an animator in this state
because it's frequently a bug that wastes battery life - (like E doing idle
cursor animations or clock updates while the display is off)

However, dpms off is not the only potential usage of manual render, so
another commit will follow shortly to fix the bug this commit introduces -
when using a backend with a custom ticker and doing manual render with
the display on, calling ecore_evas_manual_render() will not draw with
updated animator state.

Fix T5462
Again.
Really.
2017-07-13 18:07:42 -05:00
Derek Foreman 7e0beea3f5 ecore_evas: Refactor event catchers to call custom_tick_begin/end
Make the event catcher functions call the custom_tick_begin/end helpers
instead of directly calling the engine functions.
2017-07-13 18:07:42 -05:00
Cedric BAIL 7d9f1dbfd3 ecore_evas: protect against application holding a reference on the canvas while destroying the ecore_evas. 2017-07-13 15:35:17 -07:00
Derek Foreman cae1927554 ecore_evas: Don't start backend ticking for manually rendered canvases
Shortcut the code that starts up a back-end ticker if we're manually
rendered.

ref T5462
2017-07-10 16:24:25 -05: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
Mike Blumenkrantz 43b6c2eeb1 ecore-evas: use pointer device with mouse move events instead of seat 2017-06-16 12:23:07 -04:00
Chris Michael a5d93a4ece ecore-evas: Fix return value in ecore_evas_aux_hint_val_set function
Small patch to fix misleading return value when
ecore_evas_aux_hint_val_set fails. In the above code, we will return
EINA_TRUE already if the aux_hints_set works, so this return value at
the bottom of the function should be EINA_FALSE.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:29 -04:00
Chris Michael 0d5d157559 ecore-evas: Support auxiliary hints for ecore-evas-wayland
Small patch to support using Ecore_Evas_Interface_Wayland in order to
add support for setting auxiliary hints on a surface

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:29 -04:00
Jean-Philippe Andre e8f9f109a6 evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where
   it's a keyword. Type is a little better. Also, the property
   was already named "device_type" and not "device_class".

2. Remove Efl.Input.Device.Sub_Class
   It's not used inside EFL upstream codebase, and unlikely to
   be used anywhere else (even in Tizen).

Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.

Ref T5540
2017-06-12 15:21:55 +09:00
Mike Blumenkrantz a777fcb679 ecore-evas: make focus-setting work with async device init
@fix
2017-06-09 19:14:58 -04:00
Mike Blumenkrantz 7e3c108382 ecore-evas: safety -> normal null check in _ecore_evas_focus_device_set()
when unsetting focus, if the specified seat doesn't exist then there is no
focus to unset
2017-06-09 19:14:58 -04:00
Mike Blumenkrantz 9828981585 ecore-evas: safety -> normal null check in ecore_evas_cursor_device_unset
if there is already no cursor then this is not an error
2017-06-09 19:14:58 -04:00
Mike Blumenkrantz 6632f4d906 ecore-evas: directly get the seat device instead of the parent
no functional changes
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz a7ed5d0540 ecore-evas: redo per-device cursor internals to be per-seat
seats have cursors, pointer devices do not.

@fix

fix T5531
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz 466456b4f0 ecore-evas: init cursors for all pointer-ish objects
all of these will use a cursor visual if one is set

@fix
2017-05-26 16:27:43 -04:00
Mike Blumenkrantz 50381e7911 ecore-evas: clear cursor object cache when setting default cursor
@fix
2017-05-26 16:27:43 -04:00
Mike Blumenkrantz e21847e3fd ecore-evas: only apply cursor object cache for default pointer
@fix
2017-05-26 16:27:43 -04:00
Jean-Philippe Andre 3082dc212e evas: Fix build for Windows without segv
Revert "Revert "evas: Fix build for Windows (hopefully)""
This reverts commit c8ec1cb2af.

The two efl_input_ functions need to be declared as EOAPI inside
the file where they are implemented. Otherwise the symbols aren't
exposed and weak linking means the function call crashes.

Sorry for the first untested patch and subsequent revert. Things
should be in order now.
2017-05-22 17:37:35 +09:00
Jean-Philippe Andre c8ec1cb2af Revert "evas: Fix build for Windows (hopefully)"
This reverts commit 1e2d382298.
This segfaults. Ouch... Will need more time to fix this.
2017-05-22 15:05:16 +09:00
Jean-Philippe Andre 1e2d382298 evas: Fix build for Windows (hopefully)
The declaration of some internal EO APIs was located in the wrong
library, which results on Windows to an invalid definition of
EAPI (dllexport vs dllimport).

Thanks @vtorri for the report!
2017-05-22 14:52:26 +09:00
Mike Blumenkrantz 0d9a7a6d98 ecore-evas: account for framespace when processing mouse movement
in some cases (e.g., the mouse-out emission from the ee wl engine),
this was calculating wrong coordinates, which would lead to a broken
chain of events like:
  object mouse out -> object mouse in -> object mouse out
which would severely break some apps

@fix
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 2fabed3255 ecore-evas: add function for unsetting a specific seat's cursor
@feature
2017-05-12 12:08:25 -04:00
Jean-Philippe Andre 5b4bb7f341 ecore_evas: Use proper enum values in axis events
Somehow the evas enum values were used instead of the ecore ones.
But I believe this is just a cosmetic change as their integral
values was the same.
2017-05-11 17:53:51 +09:00
Jean Guyomarc'h d340d85a1f ecore_evas: fix link issue on macOS
696ed3e2e8 introduced a build failure on
macOS. _ecore_evas_subregister is being used in a foreign code module,
but it was not exported. Enforcing EAPI gives this symbol enough
visibility to be used outside of ecore_evas.
2017-05-09 21:29:11 +02:00
Cedric Bail 696ed3e2e8 ecore_evas: add infrastructure to properly track sub ecore_evas. 2017-05-05 17:55:06 -07:00
Cedric Bail 7b4b7b6696 ecore_evas: add logic to allow partial refactoring of backends. 2017-05-05 17:55:06 -07:00
Cedric Bail 385acef7f9 ecore_evas: introduce a generic rendering function. 2017-05-05 17:55:06 -07:00
Bryce Harrington 10f1fedfec ecore_evas: Unnecessary to test p before calling free(p)
Summary:
Modern, standards-compliant compilers already test p, so as per the C
spec it is superfluous to do so before the call.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4791
2017-04-18 18:42:51 +09:00
Cedric BAIL e0bb9d6134 ecore_evas: change VNC API and use snapshot internally. 2017-04-12 15:13:19 -07:00
Jean Guyomarc'h 35a7e7ff18 ecore_evas: delete exit idler when done with it 2017-03-23 21:17:50 +01:00
Cedric BAIL 0cd43b45d9 ecore_evas: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Jean Guyomarc'h 85110c7dd9 ecore_evas: process mouse move even when there is no cursor 2017-03-08 08:59:59 +01:00
Cedric BAIL b4381fd2d5 ecore_evas: rely as much as possible on display source for animator to reduce spurious tick. 2017-02-28 11:04:34 -08:00
Cedric BAIL 67e350361f ecore_evas: animator eo event are not a legacy event. 2017-02-27 15:12:11 -08:00
Mike Blumenkrantz 67d193b92c ecore-evas: use ee->prop.window in ecore_evas_input_event_register()
this allows window events to match correctly

@fix
2017-02-24 14:13:11 -05:00
Jean-Philippe Andre 5be33ba1aa ecore_evas: Avoid safety check error log
If an engine can not be used (eg. GL inside a standard Xephyr),
some ERR logs will be printed out by ecore_evas_x. This patch
avoids extra eina_safety error logs from using a NULL pointer.
2017-02-14 15:21:50 +09:00