Commit Graph

531 Commits

Author SHA1 Message Date
Derek Foreman b23797c55a ecore_evas_wayland: Make rotation_set common
Rotation set can be moved into common now - should be no functional
change.
2016-11-02 13:37:01 -05:00
Derek Foreman 5d2a25a01d ecore_evas_wayland: Make transparent_set common
Moves transparent set into the common implementation - there is a
functional change here - the egl engine now calls transparent_set in
render_updates like the shm engine.

It is probable the this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 9ca6e274a4 ecore_evas_wayland: Make alpha set common
Moves alpha set into the common implementation - there is a functional
change here - the egl engine now calls alpha_do in render_updates like
the shm engine.

It is probable that this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 82277ae6b3 ecore_evas_wayland: Move more functions into the common implementation
Show and hide can be made common with almost no functional changes.
2016-11-02 13:37:01 -05:00
Derek Foreman af4a71bcf0 wayland evas engines: share engine info structure
These engines are incredibly similar - by sharing the same engine info
structure we'll be able to simplify the wayland ecore_evas bits and
make them much more maintainable.
2016-11-02 13:37:01 -05:00
Derek Foreman 55de5c61cd ecore_evas_wayland: Don't include Evas_Engine_Wayland_Egl.h
There doesn't seem to be any need for this.
2016-11-02 13:37:01 -05:00
Derek Foreman 0b9f77ac96 wayland_egl: Remove unused wl_egl_window variables 2016-11-02 13:37:01 -05:00
Derek Foreman 54cf6dac4a wayland evas engines: rename wayland display to wl_display
Continuing to make the shm and egl engines closer to eachother.
2016-11-02 13:37:00 -05:00
Derek Foreman 3f75c45122 wayland_egl: Rename surface to wl_surface
Making this code more closely match the wayland_shm engine
2016-11-02 13:37:00 -05:00
Derek Foreman 9e43a15526 wayland_egl: Remove pre_post_swap_callback_set
This stuff seems copied from gl_x11 which actually has API to use it.

In this engine nothing can actually set it, so it's just all dead code.
2016-11-02 13:37:00 -05:00
Derek Foreman b898d3f929 wayland ecore evas: move move_resize to common
It's identical in both shm and egl variants, share it.
2016-11-02 13:37:00 -05:00
Derek Foreman d960adee72 wayland_egl: Remove some leftovers from www
The render post callback and "wobbling" variable were only required for
the client side effect.
2016-11-02 13:37:00 -05:00
Bruno Dilly 8bf74da7bc ecore_wl2: associate evas devices to input ecore events
So users would be able to differentiate between source
seats.
2016-11-01 16:06:19 -02:00
Bruno Dilly 7aab35961f ecore_wl2: add ecore event for seat capabilities change
So when mouse / keyboard are present or not it will
generate events.

ecore_evas/wayland will handle that creating or
deleting evas devices for each one (seat device
will be used as parent).
2016-11-01 16:06:19 -02:00
Bruno Dilly d7b1a5dfeb ecore_wl2: add ecore event for seat name change
And handle it on ecore_evas/wayland, properly
setting the evas device names.
2016-11-01 16:06:19 -02:00
Bruno Dilly 44fc1c6ecc ecore_evas/wayland: handle added / removed seats
Create or delete evas_devices with class EVAS_DEVICE_CLASS_SEAT
for seats on each ecore_evas created so far.

Initially it's named considering its Wayland id.
2016-11-01 16:06:19 -02:00
Bruno Dilly 26c1a564d9 ecore_evas/wayland: remove unnecessary NULL attributions
When freeing wdata there is no reason to set each
freed field to NULL.
2016-11-01 16:06:19 -02:00
Guilherme Iscaro 4bffa7bfa7 ecore_evas: refactor VNC as an Eina Module.
Summary:
This change removes the necessity to link EFL against the libvncserver

Please ignore the first three commits, they're being reviewed here:

https://phab.enlightenment.org/D4323

Reviewers: bdilly, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-28 09:56:47 -07:00
Guilherme Iscaro 8040d20f90 This series fixes two problems in the VNC implementation.
One deadlock and one segfault.

Patch 1:

Software X11 Evas Engine: Fix deadlock

Summary:
The patch bc6e8d2692 introduced a callback responsible to notify the pixels
that were sent to the X server. Since all EFL rendering is done by another
thread, the callback should be called from the main thread context.
To achieve this behaviour evas_software_x11_region_push_hook_call()
was using ecore_thread_main_loop_begin(), which may cause deadlocks, since
evas mainloop waits for the render thread and the render thread waits
the mainloop.

In order to fix this problem, the function
ecore_main_loop_thread_safe_call_async() will be used to
schedule the callback to run in the main loop context.

Since a callback is schedule to run in async manner, the pixels that
were sent to the X server must not be deleted until the user is informed.
In order to avoid more mallocs(), this patch adds the support for refcounts to the
X_Output_Buffer and Xcb_Output_Buffer.

Patch 2:

Ecore_Evas VNC: Use the image size to create the buffer.

In same cases they may differ and may lead to a segfault, since
memcpy() causes a buffer overrun.

Reviewers: bdilly, raster

Reviewed By: raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4323
2016-10-21 13:56:00 +09:00
Derek Foreman 54582858d8 ecore_evas_wayland: Don't use frame callbacks on windows with no shell surface
If we set a frame callback on a window with no shell surface (ie: and unmapped
window), the frame callback will never fire.  This was preventing some
applications like rage from ever posting a frame.
2016-10-14 16:07:08 -05:00
Carsten Haitzler f9f94bcb5f ecore_evas - fix setting urgent immediately after show
fixes T4726
2016-10-14 11:11:07 +09:00
Guilherme Iscaro ca53a21504 Ecore Evas Cocoa: Properly unregister the window events.
Fix T4624
2016-10-10 14:20:48 -03:00
Carsten Haitzler 690319b2f3 ecore-evas - x fix intial iconified state so terminology -I works
this fixes intitial iconic state for x11 as demonstrated by

terminology -I

but enlightenment is broken though... xterm -iconic also shows the
same break with a black window.

@fix
2016-10-06 11:00:52 +09:00
Carsten Haitzler 2d0be47290 ecore_evas x - dont set withdrawn to fals on show but wait for wm state
so we handled override cases and set withdrawn to false on show, but
when normally managed it might be nicer to wait for a state change via
the wm state property to know we are "normal"

this should fix T4699

@fix
2016-10-06 11:00:52 +09:00
Carsten Haitzler 9a2e14faad Revert "ecore_evas x - dont set withdrawn to fals on show but wait for wm state"
This reverts commit 2c736adc87.

well that was totally unexpected. - efl app windows dont show at all..
wtf? this should not have affected that at all..
2016-10-06 08:53:19 +09:00
Carsten Haitzler 2c736adc87 ecore_evas x - dont set withdrawn to fals on show but wait for wm state
so we handled override cases and set withdrawn to false on show, but
when normally managed it might be nicer to wait for a state change via
the wm state property to know we are "normal"

this should fix T4699
2016-10-06 08:40:27 +09:00
Guilherme Iscaro 50f5704cc6 Evas_Device: Fix API name.
Summary:
It should be evas_device_add_full() in order to follow the EFL
name pattern.

Reviewers: DaveMDS, bdilly

Reviewed By: DaveMDS, bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4325
2016-09-29 17:51:15 -03:00
Youngbok Shin ceb0eab402 ecore_evas_wayland: Add NULL checking for surface
Summary: Need to NULL check before using surface like other cases.

Test Plan: N/A

Reviewers: jpeg, raster, ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4301
2016-09-27 08:50:05 -04:00
Guilherme Iscaro 491fda4796 Ecore_Evas_X: Dispatch Ecore_Events for VNC clients.
This patch adds the support for Ecore events from a remove
VNC client. Every time it happens a VNC mouse move/click/wheel or a
VNC keyboard event an Ecore event event will be created and dispatched.
2016-09-26 22:06:59 -03:00
Guilherme Iscaro bc6e8d2692 Ecore_Evas_X: Add VNC draw support.
This patch adds the support to draw the X11 screen contents to
all remove VNC clients.
2016-09-26 22:06:59 -03:00
Carsten Haitzler b07cc74107 evas drm engine - fix build if gl not enabled for drm engine build
this fixes the build after a derek b0rk :)
2016-09-09 19:21:53 +09:00
Derek Foreman 0f534dc3bd ecore_evas_drm: Use pageflips, not vblanks, to drive animation
This should sort some timing problems.
2016-09-08 13:55:24 -05:00
Derek Foreman b4cbf860b9 ecore_drm2: Add a page flip completion call
Add a function for ecore_evas_drm to call after a page flip happens so
ecore_drm2 can track busy status for fbs itself (including for the fb
that's currently being flipped to scanout)

Also, call the completion function from ecore_evas_drm
2016-09-08 13:55:24 -05:00
Derek Foreman ce7991b993 ecore_drm2: Implicitly set buffer busy status when flipping
This simplifies other code that shouldn't need to deal with this.
2016-09-08 13:55:23 -05:00
Derek Foreman 794798f559 ee_drm: Move all ticking into ecore_evas_drm and use new tick system
Combines all the gl_drm and drm ticking code into one set in
ecore_evas_drm and uses the new evas tick register/unregister callbacks
to set it up.
2016-09-08 13:55:23 -05:00
Derek Foreman 316ca09b0d ecore_evas_drm: Refactor common code
ecore_evas_gl_drm_new_internal and ecore_Evas_drm_new_internal are huge
functions differing in very few lines.  Combined them.
2016-09-08 13:55:23 -05:00
Derek Foreman 31de16d408 ecore_evas_drm: check for libglapi presence first
Minor refactor
2016-09-08 13:55:23 -05:00
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Jean-Philippe Andre b29847e0da wayland_egl: Fix double free in case of failure
When trying to create a window, the WL EGL engine creates
an ecore_evas and connects to the wayland display. But if
EGL is not supported (in weston with nvidia for instance),
the egl initialization fails and the window must be detroyed
in order to fallback to wayland_shm.

This led to a double disconnect from the wayland display
as both the ecore_evas del and the error handling code
were trying to disconnect.

Also, use ref == 0 in two places rather than ref <= 0, as
it can prevent double frees in bad situations (ref < 0).
And reset a global variable to NULL on shutdown.
2016-08-11 11:37:41 +09:00
Minkyoung Kim 1733b09e1b ecore_evas_extn: Check whether server_data sender is client's server.
Summary:
Sometimes, In ipc_server_data, extn->ipc.server's data is different with e->server's data.

The case is as follows.

Process'A' has a server.
Process'B' has 'A's client(ee address : 0xB0).
Process'B's client die, and 'B's server created. and server's ee address is same with destroyed client's ee(0xB0).
At the same time, 'A's server send the message to 'B's client.
but 'B's client is died! so _ipc_server_data would manipulate 'B's server data.

Test Plan: Tizen Mobile Text.

Reviewers: raster, spacegrapher, jpeg, wonsik, dkdk

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4158
2016-07-13 21:00:07 +09:00
Chris Michael 0da58a8d78 ecore-evas-wayland: Fix issue of passing wrong values to resize
Coverity detected that the same code was being passed to resize
regardless of canvas orientation. This patch fixes the issue by
passing the proper values to window_resize.

Fixes Coverity CID1357150

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 11:03:07 -04:00
Chris Michael 1fb3c33286 ecore-evas: Fix error handling issues in wayland_shm engine
This patch fixes 2 Coverity issues where engine_info_set was being
called, but the return was never being checked.

Fixes Coverity CID1357141 and CID1357142

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 10:51:29 -04:00
Chris Michael c163e51dd3 ecore-evas-wayland: Minor formatting fixes
NB: no functional changes

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-13 16:19:46 -04:00
Chris Michael fb569d7eb0 ecore-evas-drm: Re-enable direct input callback
As it seems the jpeg breakage is over wrt direct input callbacks, we
can re-enable these for the drm engines

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-13 16:19:46 -04:00
Jean Guyomarc'h 1f69a7cfa7 ecore_evas_cocoa: better handling of resize callback 2016-06-05 12:12:02 +02:00
Jean-Philippe Andre 014295fbc9 ecore_evas: Fix mouse in/out events
Apparently I broke some inputs in E (efm) like mouse wheel.
Somehow the list of objects where the pointer is in was NULL.
This was because the mouse_in/out events were not matched to
the proper window ID.

Fixes T3760
2016-06-02 14:19:18 +09:00
Chris Michael e01ac62e5f ecore-evas-drm: Disable direct input callback
For ecore_evas drm engine(s), disable setting of
ecore_event_window_direct_callback as this Completely Breaks all input
when running Enlightenment Wayland.

NB: This can likely be re-enabled at some point, when the jpeg
breakage is over ;)

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-31 09:49:43 -04:00
Chris Michael 1ca1f8b06d ecore-evas-drm: Register direct input callback for gl_drm also
@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-31 09:23:20 -04:00
Jean-Philippe Andre 8e31929aab Efl.Pointer.Event: Add dup() method to copy an event 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 05dfab8442 ecore_x: Pass in/out through ecore_input_evas
This whole input system is a massive mess. It looks like spaghetti.
Long live the giant flying monster.

This commit changes how some events are propagated in X.

Before:
 ecore_x -> evas_event -> evas

After:
 ecore_x -> ecore_input_evas -> ecore_evas -> evas_event -> evas

There are still inconsistencies between events and between X and WL,
but ecore_evas should be used for all events since it rotates the
inputs.
2016-05-31 19:03:04 +09:00