When we are freeing an Ecore_Wl2_Window, there is no need to call
ecore_wl2_window_hide anymore because inside the free function we are
destroying subsurfaces, surfaces, etc, etc so no need to even unmap
them.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch essentially makes sure that the surface gets a NULL buffer
attached to it when we are hiding.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In order to hide a window (via wayland) we can actually assign a NULL
buffer to the surface, so there is no need to destroy the window's
wl_surface during a hide request.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
There could be situations where wl_surface_frame fails to create a
callback. In those cases, we should not be trying to add a wl_callback
listener for a non-existant callback.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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:
It should avoid issues when device is removed after the ecore
event addition but before listeners are called (so pointer
would be invalid).
Reviewers: iscaro
Reviewed By: iscaro
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4407
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
If a NULL surface gets passed into ecore_wl2_window_pointer_set that
would mean we are unsetting the cursor surface, so we should still be
calling wl_pointer_set_cursor even with a NULL surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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).
As we call the same code during ecore_wl2_window_surface_get and
ecore_wl2_window_show functions that basically create the wl_surface
for a given window we can unify that code into one function that can
be called from various places. This also fixes an issue inside
ecore_wl2_window_show where the window surface_id may not have been
getting filled properly.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we already call _ecore_wl2_input_cursor_update_stop above, we
actually don't need to call it a second time.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we have no cursor surface, then we don't need the pointer frame
callback anymore so call cursor_update_stop which will delete the
pointer frame callback
Signed-off-by: Chris Michael <cp.michael@samsung.com>
surface
In the event that we have no cursor surface, then we should not be
creating a cursor frame callback.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
During the pointer frame callback, if we had a 'callback' but did not
have an input->cursor.frame_cb then we would have ended up deleting
the callback here anyway. Let's add a comparison of the callback to
the pointer frame callback to ensure we are removing the proper
callback.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we are no longer using X pointer images, we no longer have the need
for an Ecore_Timer to update any animated X images so remove.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Remove the const char *cursor field from the window structure as this
is useless. It was never used for any real functional purpose.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit removes usage of libwayland-cursor inside Ecore_Wl2
library. This is done so that EFL Wayland applications can use EFL
mouse pointers and not look ugly :)
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
When setting a cursor by name, the _ecore_wl2_input_cursor_set
function already makes a call to stop updating the cursor, so no need
to run that twice.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit essentially removes the ability to use wl_cursor for EFL
Wayland Client Applications. This is a request from "some old man" ;)
for efl wayland applications to use EFL pointers, not X/FDO pointers.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
if we dont get the userdata of a offer something in the protocol went
very very bad, we should not emit there a error, just return.
Also if we are getting a null offer we should dereference the nulled out
offer object.
This fixes CID 1363214
if a dnd operation enters a surface the window_id is clear, so a offer
is always specific to a window. If we have a source we try to fetch the
id from the focus/prevfocus or keyboardfocus.
This fixes dropping into a efl app which never got focus before.
This commits adds api to deal with wayland offers.
It also ports elm_cnp to use the new api.
The selection_get and dnd_drag_get calls are replaced by simply receive
data from the offer.
The Offer object is now also emitted in every Enter,Motion,Drop and
Leave event, so a potential user can prefetch data and display it.
To finish a dnd operation positiv, the user has to call the finish call
before the offer is destroyed
the drag.source is only available if the drag is happing inside the same
client.
So for the case there are two efl apps (A,B) , where A started the dnd and
the B is currently entered by the dnd, then A has the data source, and B
has the offer, if B sets a action on the offer A tried to set it on a
field which does not exist there, this fixes that. It saves the action
to a undepended field.
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.
Since session recovery can cause apps to constantly try and reconnect
to the display server, we probably should not be filling logs here. On
the other hand, any failures on first connect are now not going to
display any error messages.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This is annoying to see key events flooding a terminal ... so comment
out this debug statement. If a developer really needs this, then
enable it locally.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit introduces a new state per input, this state is just for the
keymap and no modifieres, the state is used to get the keysym from a
keycode. This is done to stay compatible with x since keyname in efl is
the characters which are describing the key which is pressed, without
the transformation of shift etc.
This also escapes keycodes from beeing a utf8 character, and passes out
a keyname instead of the utf8 symbol.
fix T3976
fix T4184
Gcc reports that this 'if' statement is misleading due to indentation.
We should only be sending the 'finish' call if the dnd version
supports it, however we should always be sending 'destroy'
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>