NB: No real major changes, just removal of an extra 'if' block. If
getenv of wayland display fails, we hard-code the default wayland
display name so subsequent check for 'if (n)' is erroneous
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary: if there is no env var AND no name, connection to wayland-0
Reviewers: raster, jpeg, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3945
As not everyone needs/wants extra eye-candy, add a check for
EFL_WAYLAND_DISABLE_WWW environment variable to be able to disable
wobbly windows support
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As we already have MIN & MAX defined in Eina, we no longer need to
include sys/param.h header to get those defines
ref d00643fcc4
@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
If the compositor crashes at just the right time this dispatch can fail
and result in a stuck app spinning in a tight loop. Fix it so we do a
proper shutdown in this case.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch ports the existing session recovery protocol from
Ecore_Wayland so that it is used inside Ecore_Wl2.
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
this code is mostly copied from weston:
78d4bf9a3ec990dceee23fd53962a69891352a0e
9c93179023fe894e417ccd20533d72d672d976fc
credit to Carlos Garnacho <carlosg@gnome.org> as original author
fix T3455
@feature
EINVAL is bad, we can't go on. If we treat it like it's not a fatal
error we'll end up spinning on the fd and constantly retrying sends
on the dead wayland connection.
@fix
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
When trying to create nested compositors, we were failing here due to
trying to read the WAYLAND_DISPLAY env variable and find an existing
server display to match. In order for nested compositors to function,
we cannot reuse that environment variable for server display hash.
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
wl_surface.damage_buffer() takes surface damage in buffer co-ordinates.
Right now since we don't use wayland's scaling, transforms, or viewports
it's exactly the same as wl_surface.damage(). In the future if we start
using those features it's much easier to do so with damage_buffer().
Reviewers: zmike, devilhorns
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3457
This removes the usage of ecore_main_loop_iterate inside of the
display_connect function. It creates a new event type for when display
sync is done, this was we can defer surface creation and EE showing
until the compositor has had a chance to synchronize globals. We need
this for Enlightenment so that it does not try to create error dialogs
too early and thus crash due to not having sync'd globals yet
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
display hash
As the cleanup function is a generic helper to cleanup things in the
Ecore_Wl2_Display structure, we cannot always just explicitly the
display from the client_displays hash.
The removal from the appropriate hashes should be done by the calling
function(s) (ecore_wl2_display_disconnect for clients, and
ecore_wl2_display_destroy for servers)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Due to reference caching, we cannot free the display structure here
yet. During calls to ecore_wl2_display_destroy (or others), if the
number of references reaches zero, then we end up calling
wl_display_destroy (or equivelant). If we free our display structure
during cleanup function, then calls to wl_display_destroy will cause a
segfault as our display->wayland_display has already been freed from
the structure
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we already have seen this global, and it is in the globals hash,
then don't re-add it and just jump straight to sending the event
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we use ecore_wl2 for creating compositors (E), we need
to flush clients before we dispatch events on the wl loop, so add a
prepare_callback for the fd handlers and flush clients there.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
wl_get_registry() returns a new object that we must destroy, so
we should cache one at connect and never call that again.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Summary: This fixes an issue where scrolling mouse wheel would not
actually perform any scroll until another event was received.
NB: Unsure if we need this for "server" connections yet
Signed-off-by: Chris Michael <cp.michael@samsung.com>