Summary:
Add API to set input's keyboard repeat.
get API was already there.
Reviewers: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11131
Summary:
if wl2_input logic gets a 'touch down' event from touch device,
input->focus.touch has set and it cause the logic handles every input as touch input
from that moment at _ecore_wl2_input_mouse_move_send function.
that is the reason why the patch(410c1f9587) has written for.
however, if there are multiple touch input devices,
clearing focus.touch variable without checking any conditions causes another problem.
I mean a case such as 'touch 1 down' -> 'touch 2 down' -> 'touch 1 up' -> 'touch 2 up'
at the moment 'touch 1 up' event executed, focus.touch would be cleared,
and 'touch 2 up' and following touch events will not be executed properly at the moment.
this patch counts a number of touch devices which are grabbing to clear focus.touch at proper time.
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8787
Summary:
if there are multiple input devices, especially touch and mouse type devices simultaneous.
a logic can't recognize the current input device in _ecore_wl2_input_mouse_move_send function.
because focus.touch would not be cleared even touch actions from user has finished.
This patch clears input->focus.touch if users release their finger from touch device.
Reviewers: raster, eagleeye, devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8673
again pointless:
strcpy(dest, x); -> len - strlen(x); strncpy(dest, x, len);
code put in causing new warnings. this kind of "get rid of strcpy" is
actua;;y dangerous as it's more likely a mistake is made along the way
and bugs are added. strcpy's should be reviewed and if ok - left
as-is. doing otherwise makes the code worse, not better and raises
risk. it now also produces warnings at compile time which creates
noise we just shouldnt' have.
Summary: this patch replaces a volnerable function with a safer one.
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7920
Summary:
gettimeofday function returns a accumulated timestamp since around 1970 by the way,
a argument from server looks like a system uptime based timestamp
in some distribution such as tizen.
so that this patch appends a logic that updates a timestamp
inside Ecore_Wl2_Input* whenever possible to
prevent gettimeofday function from being called.
Reviewers: #reviewers, cedric, devilhorns
Reviewed By: #reviewers, devilhorns
Subscribers: devilhorns, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7766
Summary: the key structure has two fields key and keyname, those should be identical to the keystructures from x. the method xkb_keysym_to_utf8 however returns different values for keys like "minus" thus only relying on xkb_keysym_name files this issue.
Reviewers: eagleeye, devilhorns
Reviewed By: eagleeye
Subscribers: cedric, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6520
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
Summary:
When a CSD button interaction under wayland leads to a compositor action
like move or resize, we essentially "give back" that button press to the
compositor, and it never sends us a mouse up for it.
We need to internally fire a mouse up event to fix up state so the client
doesn't think the mouse is still down. Until now we've been doing this
by setting a flag when we start a move/resize and checking it at next
pointer enter for the window.
This leads to unsolvable races and wacky bookkeeping, and runs afoul of
the fact that we're not actually guaranteed a pointer enter immediately
after a move completes. There is absolutely no way at all on wayland to
know if a move or resize operation has completed.
So, let's just fire the mouse up immediately on start of interaction,
which is raceless.
This fixes a years old bug where dragging a window might leave a stuck
mouse up, and allow hilighting text without drag after the window drag
completes. (elementary-test -to "text editor" with multiple windows open
exhibits this bug)
Depends on D6127
Reviewers: zmike, cedric
Reviewed By: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6128
Summary:
These should never be called, so they shouldn't be API.
This kind of internal state fiddling should happen implicitly in the
API that need it.
@beta_break
Depends on D6126
Reviewers: zmike, cedric
Reviewed By: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6127
Summary:
This is only fired to trigger a cursor set under wayland, but that cursor
set should be done unconditionally on mouse in.
However, mouse in was being discarded because mouse out was being deferred
when the window was "grabbed" for moving.
If instead we just let the mouse out occur as it should, the cursor
is properly updated on mouse in.
Depends on D6118
Reviewers: zmike, cedric
Reviewed By: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6119
Apparently when we initiate a client side move in ecore_wl2 we flag that
and send a mouse-up immediately on the next pointer enter.
Do the same for resize.
At some point this might need to be revisited, we should probably be
sending a "cancel" at the start of client initiated move/resize instead
of an up at the end?
Fix T6422
As strlen() cannot accept NULL (segfaults), we should check for valid
key, keyname, and compose strings here before passing to strlen().
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to reduce calls to strlen when sending key events. This
patch is loosely based on Phab D5567
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
b48781aa6c fixed multiple bugs where the
display wasn't flushed correctly, however it was a little overzealous.
Some of the flushes were added after calls that only updated internal
state, some in internal functions in which the caller was already going
to flush, and some were after wayland protocol calls that are double
buffered anyway and won't do anything until a following commit.
Also, I've removes at least one long standing flush where the recently
added flush is in a better location than the original.
in the case where a connection was not actively rendering, there was nothing
which would trigger a display flush, leading to applications potentially
deadlocking
@fix
locks are not the same as modifiers, and the corresponding event flag must
be set based on whichever value(s) are set instead of yolo mixing and matching
@fix
ref T5737
If we have no data device manager present, we would still like to
receive events when input devices get added or removed so these
handlers should be setup before we return from this function.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we are in the Ecore_Wl2 library, lets use a function name that
reflects this.
NB: No functional changes
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we may have both a pointer and touch device on a given system, we
need to accurately set event->device when sending mouse move, wheel,
down, and up events. Previous code here would always try to find a
mouse device first which could potentially end up setting the wrong
event->device (if a touch device also existed).
This patch fixes the issue by comparing the window used for the event
to our focused windows (either mouse or touch) and setting the proper
event->device based on that.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
copied from libX11.
I don't understand what's going on here but this fixes input bugs such
as, e.g., holding ctrl and pressing shift affecting cursor position in
terminology
@fix
this function does not make sense within the context of wayland and seats,
since a surface does not own and is not owned by a seat, nor is there a 1:1
association between surfaces and seats
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
wl_shell does not use a surface state for activation, so we still need
to send the focus in/out for that based on keyboard enter/leave.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We should not be sending focus events based on keyboard behaviour, but
rather send them according to xdg shell activate status. This makes
our focus behaviour more "standards" compliant.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
When we are sending input events, if we have no pointer device then we
should be setting ev->dev to a touch device (as touch events are
treated as pointer events inside EFL).
NB: This allows EFL clients to get touch events in Enlightenment.
There are still some small hiccups here (can't close terminology by
pressing the 'x' in the corner, cannot scroll elm_test srollbar, etc).
Likely EFL needs to change wrt all this...perhaps adding events for
touch that are separate from pointer ?...
ref T5094
Signed-off-by: Chris Michael <cp.michael@samsung.com>