Currently, ecore_evas_extn only use exclusive lock.
so if there are many ecore_extn_plugs , there is competition among the ecore_extn_plugs.
since the ecore_extn_plugs dont need to use exclusive lock, add the shred lock mode.
We need a display unset path for software render to prevent an async
render completing after a disconnect from posting a frame and crashing
us.
As of this commit both software and gl session recovery work for me.
fix T5005
#SessionRecoveryWorksHere
Calling ecore_wl2_window_surface_get() has the side effect of creating
a new wayland surface if we don't already have one. If we do that
during a session recovery, we can try to create a new surface while
we have no connection to a compositor - that's Bad.
So we just use the one we already have stored - which we NULL out on
disconnect.
commit 81783ec75c combined two "identical"
pieces of code that weren't identical. The removed code never checked
if the evas was visible before performing operations to make it so,
the code left behind would bail if the evas was visible.
Reset the visible status during disconnect to make sure we properly show
windows after a session recovery.
ref https://phab.enlightenment.org/T5005
@fix
Session works on the software engines at this point. Use this as a bisect
point next time someone fubars it.
GL still broken. Window geometry seems like it doesn't get updated right
either, but at least clients reconnect again.
#SessionRecoveryWorksHere
As we already call the same functions inside
_ecore_evas_wl_common_show, there is no need to duplicate the same
code when we have defer_show set...just call the show function.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Calls to make a window fullscreen do require the window to already
have a shell surface with which to fullscreen. If an app sets the
window fullscreen property when the window is not shown yet, then the
app would never startup fullscreen. This patch fixes that issue by
adding a 'defer_fullscreen' flag to Ecore_Evas (wayland) so that when
the window does finally get shown, we can show it in fullscreen.
Addresses part of the T5044 ticket...
ref T5044
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to not call _ecore_evas_register unless we are showing the
window. This stops creation of rogue animators on cursors until the
window is actually going to be shown.
Fixes T5209
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we are in async render and a call to rotation_set has been made,
then we should delay setting that rotation until rendering is
completed. This patch fixes that issue by setting ee->delayed.rotation
and handling it during _drm_render_updates
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we are in async render when a call to set rotation happens, we
should not be setting the engine info->rotation until we have actually
handled the rotation. Old code here would set delayed.rotation on the
ecore_evas itself, but then it would tell the engine to rotate. What
we actually want here is If in async render, set the delayed rotation
property and let render_updates deal with any delayed setting.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Minor optimization to avoid always fetching framespace values even if
we were not going to use them.
@optimize
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to add a handler so we can listen for when the surface
configure event is complete and can then go ahead and attach buffers
to the surface. This allows rage <filename> to work again in Weston :)
NB: This does allow rage <filename> to work under Weston now, but
still fails under Enlightenment for some reason :(
ref T5090
Signed-off-by: Chris Michael <cp.michael@samsung.com>
With the change to xdg_shell v6, we need to wait for any pending
configure to be handled before we can render. This patch addresses
that issue and makes Elementary_Test work again under Weston :)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The common code was skipping frame callback when no shell surface was
present - cursors aren't shell surfaces.
Add the frame callback to the common path and remove the bespoke callback
from the cursor code.
Summary:
The function rfbScreenCleanup() does not close the open sockets,
a call to rfbShutdownServer() must be done to properly close them.
Reviewers: cedric, bdilly
Reviewed By: bdilly
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4459
As most of the "hard work" has been moved into
ecore_evas_wayland_common file, these includes are no longer needed
here.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to set all fields of the Evas Engine Info structure before
calling evas_engine_info_set function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch allows us to set a 'hidden' flag in the Evas Engine
information structure instead of setting a NULL surface. Setting this
flag allows us to hide/show a canvas without having to
destroy/recreate a wl_surface every time.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This function will set the modifiers/lock per seat in Evas.
Some places will still use ecore_event_evas_modifier_lock_update(),
since multi-seat is not supported.
This fixes the sizing of EDI. And elm_test "States 2"
The sizes stored in ecore_evas are the "window content" sizes,
excluding the framespace which thus must be added to all calls
to ecore_x / Xlib.
Summary:
New keys were added to the keytable, however since VNC will not
notify the VNC server about these new key types we will simple
increase the array size and keep the compiler happy.
Reviewers: cedric, barbieri, bdilly, jpeg
Reviewed By: jpeg
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4434
Small patch to implement support for ecore_evas_screen_dpi get on the
drm canvas. This will be used in enlightenment (e_scale) to get the
screen dpi of the compositor canvas when we call e_scale_update.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
After changes done on commit 9f8e2e0d9c
it was possible to have multiple devices with the same
id added throught the function
_ecore_evas_wl_common_cb_global_added().
To avoid such issue, let's check if the device was already
created first.
Reviewers: iscaro
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4428
Missed setting pending to true in one of the paths, this resulted in
an extra pageflip being scheduled too soon and returning EBUSY.
This was more likely to happen on slow systems, and is hopefully the last
remaining cause of render freeze on the RPI3.
Summary:
It's not possible to have an Ecore_Wl2_Input without a seat.
Ecore Evas Wayland: Remove seat existence check.
At this point every seat advertised is considered new, therefore
it will not be in the devices list.
Reviewers: barbieri, jpeg, cedric, bdilly
Reviewed By: bdilly
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4408
Summary:
When launching an Elementary App using Wayland the elm_config will
automatically connect to the Wayland's display server and all events
regarding seats are lost, since by the time that Ecore_Evas is created
the global events were already dispatched. To fix this problem,
everytime an Ecore_Evas is created, the code must check if there
are any seat capabilities available, if so, the devices will be created.
Reviewers: bdilly, barbieri, cedric, jpeg
Subscribers: devilhorns, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4390
As we don't compile-time link to libdrm anymore, we need to make a
call to ecore_drm2_event_handle in order to process drm events.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch addresses the case where we failed to allocate 'wdata' and
were calling free(ee) before going to an error handler. For the fix,
just don't free(ee) here and let the error handling do it's job.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Coverity reports an error handling issue here as we are not checking
the return value of evas_engine_info_set, so check that return and
issue a warning if it fails.
Fixes Coverity CID1365651
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Coverity reports that accessing 'einfo' here is a NULL pointer
dereference. evas_engine_info_get can return NULL, so we should be
checking for a valid return before trying to use it.
Fixes Coverity CID1365654
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Coverity reports a null pointer dereference here because
evas_engine_info_get can return NULL. Check for a valid return before
trying to use it.
Fixes Coverity CID1365655
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Coverity reports illegal access here as we are trying to pass a freed
pointer to ecore_evas_free. Rework error handling to avoid this.
Fixes Coverity CID1365657
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Ecore Evas VNC: Properly unregister the region push hook callback.
This callback must be unregistered when the VNC server is deleted.
Reviewers: bdilly, barbieri, cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4384
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.
@feature
draw_frame is a legacy feature that draws a very ugly window border
with a white rect and a black text as title bar. This could be
used in wayland when using only the ecore_evas APIs, rather than
elm_win.
Note that the API ecore_evas_draw_frame_set() can not possibly work
as the flag is checked when the ecore_evas is created, so changing
the flag has no effect on existing windows.
Finally bring these together as much as possible to avoid future
diversions when bugs are only fixed in one or the other.
There are functional changes - state tracking for client side effects is
now added to the shm engine, some bug fixes for the egl engine have been
brought to the shm engine.
Brings resize code into the common implementation - there is a functional
change. There appears to have been a bug in the egl resize where it
used the same w, h order for portrait evases as for landscape. This was
fixed in shm. I've used the shm variant for the common code.
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.
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.
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.
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).
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.
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>
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
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.
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
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
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..
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
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
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
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.
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
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.
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.
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
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>
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>
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>
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
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>
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.
This patch fixes an issue where starting Enlightenment would not
center the mouse pointer. Basically the issue is that we cannot warp
the mouse pointer until After the ee->prop.window has been set else
E will not process the mouse_move event
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
add support for reconnecting wayland applications if the compositor dies
disconnect -> destroy gl ctx + image textures -> block rendering ->
reconnect -> create gl ctx -> create image textures -> unblock rendering ->
sprinkle special seasoning on top -> just like ma used to make
#SamsungFeatures
@feature
This include is leftover from the porting to Ecore_Wl2. Remove
unused include for old Ecore_Wayland library
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
the only way to accurately calculate the "evas" size in the engine from
window geometry is to have the size of the frame available to subtract from
window geometry
window geometry is NOT framespace--framespace is the entire csd region, possibly
containing a shadow, and window geometry is explicitly the region occupied by the
window, ie. not the shadowed part.
not my ideal solution to the synchronization issue here, but I guess this is a
benefit of the unified tree
fix T3396
this is an event representing the "new" state of the surface after a
configure event. it must contain the exact states which could potentially
have changed in the configure in order to ensure synchronization between
csd states and window size.
ecore events for xdg-shell configures must be sent only upon receiving a
configure event since states are set by the compositor and not by the client
@fix
#hoorayforbeta
this accumulates all data relevant to client-side www into
the Evas_Engine_Info_Wayland_Egl struct so the client can react to it.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Focus handlers are set incorrectly.
It causes windows process focus when they are acttually unfocused.
This patch corrects it.
Signed-off-by: Thiep Ha <thiepha@gmail.com>
Create specific structures for each event:
- Ecore_Cocoa_Event_Window_Focused
- Ecore_Cocoa_Event_Window_Unfocused
- Ecore_Cocoa_Event_Window_Destroy
They are currently hold the same data, but this will allow not to break
the event protocol when future extensions will be needed.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Lost and got focused have been renamed FOCUSED and UNFOCUSED to mirror
the focus API in Elementary.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
we counted more requests outstanding than actually existed for x11 as
we sometimes sized to the SAME size or position. this keeps that
number more correct only incremeting outstanding count if we change.
@fix
This code is currently only using the older fallback code and not any
new event source, so all animator on all window are still triggered
whatever the case are.
See T2835 (my crash was different from the one reported).
The buffer may be initialized after the first render_pre, due to
whatever timing issue. Check in elm_test "Window Socket" and then
open several "Window Plug".
@fix
As we no longer cleanup outputs inside the ecore_drm_device_free
function (see previous commit), we should be cleaning up outputs here
as they are created during the _ecore_evas_drm_init function.
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
printf %m stringifies and prints errno. I've tried to remove its use
anywhere that the immediately preceding function might not set errno
or is a complicated function for which knowing errno doesn't really
give any useful information.
I've left a few of the drmMode calls because they're just wrappers
around ioctl, which legitimately sets errno.
@fix
Reviewers: zmike, devilhorns
Reviewed By: zmike, devilhorns
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3572