Summary:
This prevent double destruction of source. if _ecore_wl2_input_del is called
with destroyed source, it can make unexpected troubles.
Reviewers: Hermet, id213sin, devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7265
Summary:
There's no benefit to generating ids instead of just using the
Ecore_Wl2_Window pointer in events.
This has the added benefit of working around a really nasty hash collision
bug when multiple ecore_evas engines are used at once.
ref T7053
ref T6222
@beta_break
Depends on D6521
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #committers, zmike
Tags: #efl
Maniphest Tasks: T7053, T6222
Differential Revision: https://phab.enlightenment.org/D6522
windows do not have pointers or cursors under wayland, seats do. due to
lack of multiseat support, most components simply use the "default" seat
with these functions, but this should make the corresponding code more
easily adaptable
in some cases (e.g,, x11 bridged selections) it is necessary to use
alternate means when transferring a selection, and so performing the
entire piped receive is not necessary. instead, extend the lifetime
of the data offer until the proxied receive has completed
@feature
in some cases it may be desired to have a drag data source without ever
initiating a drag, so ensure that it's possible to set the actions of the
source which will be passed for drag operations in this case
@feature
this seems to have been done to account for the case where no mimes were
passed, but sending null in this way is bad behavior for a client. the
spec indicates that null should be sent only when no mimes are accepted
@fix
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.
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>
If we end up failing to get the fd from ecore_main_fd_handler_fd_get,
then we should just bail out of this function and try again later.
Fixes Coverity CID1357213
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Coverity reports that len is used un-init here, so let's give it a
value at declaration time
Fixes Coverity CID1357214
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
We should be checking the return value of ecore_main_fd_handler_fd_get
calls as they can return a negative number...which cannot be passed to
the close() or read() functions.
Fixes Coverity CID1357152 and CID1357153
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch fixes an issue where ecore_main_fd_handler_fd_get could be
returning a negative number and passing that to close() which cannot
accept negative numbers.
Fixes Coverity CID1357152
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
If dnd in the same window is activated, the focus goes away from the
ecore_wl2 window to the dnd window, after that focus.pointer is NULL.
After focus.pointer is NULL ev->win of all the events will be 0 which
breaks dnd-motions, drop and end.
With prev_pointer beeing the last focused window, we can simply set this
window as event window. After that dnd with jesus works perfectly.
@fix
Reviewers: devilhorns
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4093
If we do drag & drop and then do copy & paste, both _wl_selection_receive
and _wl_dnd_receive are called for one action (dnd or cnp). It is reduntdant.
We only need one data received callback to handle two cases dnd and cnp.
We have copy & paste and drag & drop selection types, but we cannot
distinguish between these two types when requesters receive data
from data ready event.
This patch adds a new enum to help selection requesters distinguish
between two selection types and have suitable actions for each type.
this is copied from weston, except all the code which is supposed to be of
struct type "offer" has been renamed "source" and then reused in the same way
that weston uses "offer" in order to maximize reader confusion
deleting the source here is invalid since the selection only changes in the
corresponding callback from the wayland interface