Summary:
Prevent duplicated mouse up events generated from input_ungrab.
If you touch downs and ups about all of fingers,
that is sufficient condition to call ecore_wl_input_ungrab().
And then one mouse up event is generated from that function.
So if you set a callback about ECORE_EVENT_MOUSE_BUTTON_UP,
you can watch two mouse up events are occurred.
Test Plan: Touch and release. And watch mouse up events.
Reviewers: raster, zmike, devilhorns
Reviewed By: devilhorns
Subscribers: ohduna, input.hacker, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4112
Summary:
To ensure initialize all fields of Ecore_Event_Mouse_XXX,
use calloc() instead of malloc().
Test Plan: N/A
Reviewers: gwanglim, cedric, raster, devilhorns, ManMower, zmike
Subscribers: jpeg, input.hacker, JHyun
Differential Revision: https://phab.enlightenment.org/D3906
Summary:
Each Ecore_Wl_Input structure has there own keymap.
This keymap is struct xkb_keymap used in libxkbcommon lib and
the client can get this keymap from server in wayland system.
So if the client want to get keymap and use some libxkbcommon APIs,
use this API to get keymap.
Test Plan: Use this api after initialize wayland system.
Reviewers: raster, zmike, ManMower, devilhorns
Reviewed By: devilhorns
Subscribers: input.hacker, ohduna, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3819
Summary:
We don't need to work for cursor if system doesn't have pointer devices.
Since this function is called by elementary(e.g. entry) also, we move a check condition into the function.
@fix
Reviewers: raster, zmike, devilhorns, ManMower, gwanglim
Subscribers: cedric, JHyun, input.hacker, jpeg
Differential Revision: https://phab.enlightenment.org/D3566
Summary:
When user touches the screen, ecore_drm generates MOUSE_MOVE event before MOUSE_BUTTON_DOWN.
But when ecore_wayland gets touch_motion before touch_down, touch_focus window is NULL and sending MOUSE_MOVE event fails.
Also in terms of 'touch' input, touch_focus needs be set in cb_touch_down, not in cb_pointer_enter.
So this commit makes sure that ecore_wayland generates MOUSE_MOVE when touch_focus is set.
@fix
Test Plan:
when the application is launched for first time, user clicks on any area of the screen.
We can see the posion of touch event wrong.
Reviewers: raster, zmike, devilhorns, gwanglim, ManMower
Reviewed By: ManMower
Subscribers: jpeg, JHyun, cedric, input.hacker
Differential Revision: https://phab.enlightenment.org/D3555
Summary:
When user touches the screen, ecore_wayland gets touch_motion event before touch_down event.
But touch_focus would be NULL in cb_touch_motion, so doesn't send ECORE_EVENT_MOUSE_MOVE event to client.
This fix set touch_focus when gets pointer_enter same as pointer_focus.
Test Plan:
when the application is launched for first time, user clicks on any area of the screen.
We can see the posion of touch event wrong.
@fix
Reviewers: devilhorns, raster, ManMower, zmike
Subscribers: input.hacker, cedric, jpeg, JHyun
Differential Revision: https://phab.enlightenment.org/D3545
Summary: This adds support for allowing a client/compositor to adjust
the keyboard repeat rate and delay via a call to
wl_keyboard_send_repeat_info.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we end up cancelling the keyboard repeat timer due to no
focused surface, we should also reset the input repeat values.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: During the keyboard repeat function, if we have no keyboard
focused window to send the key to, then we should cancel the repeat
timer.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As we delete any keyboard repeat timers when we get a
keyboard leave event, we should also reset any stored values there
(key, sym, time, etc).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we get pointer or keyboard leave events, then reset the
Ecore_Wl_Input's idea of focus (eg: set input->pointer_focus and
input->keyboard_focus fields to NULL) just in case we cannot find a
window for this surface.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we generate an Ecore key down/up event, we should also
be setting the keycode in the event structure
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As input->grab_count is an unsigned int there is no need for
the < 0 comparison as that will always return false
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
The touch screen device generates touch events.
But in some special enviroments, a first finger will be matched to a pointer event(not touch event).
And other fingers (second, third, ...) will be matched touch events.
In that case ecore_wl_input_ungrab() is called abnormally.
A first finger pressed, _ecore_wl_input_cb_pointer_button() call ecore_wl_input_grab().
A second finger pressed, _ecore_wl_input_cb_touch_down() is called but not grab.
But when a second finger is released, _ecore_wl_input_cb_touch_up() call ecore_wl_input_ungrab()
So ungrab function generate two mouse up events and a first finger is released.
In other case, first finger pressed -> second finger pressed -> first finger release.
That case when a first finger released a second finger release event is generated.
So after that application doesn't get a release event about a second finger
when a second finger is really released.
I think in a multitouch case, ungrab function will be called when a all finger are released.
So I add a grab_count variable for count currently touched fingers.
And only called a ungrab funtion all fingers are released.
Test Plan:
In a touch screen supported multitouch, press two or more fingers and release.
And watch events generation.
Reviewers: raster, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2481
Summary:
ecore_wayland get a key information using libxkbcommon's functions.
Also generate key repeat check xkb keymap's information using xkb_keymap_key_repeats().
But xkb rules reflect X broken keycodes, so offset by 8.
In ecore_wayland backend, other xkb funtions using offset keycode
but only use default keycode to check key repeat.
So I fix it to use xkb ruled keycode.
Test Plan: Long press a key and watch repeated key events generate well
Reviewers: devilhorns, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2475
Some fields (eg. data) may not be properly initialized.
Use calloc() instead of malloc() will ensure proper initialization
even if we add more fields.
These fields (data) would even be passed down to Evas as
Evas_Event_Key_Down for instance.
Summary:
The other functions in this module check inputs; this one should as
well.
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2210
get them
Summary: Some keys in certain keyboard layouts should not be repeated
so add a test which uses xkb to inform us if this key supports
repeating.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
actually have a grabbed button
Summary: If we don't have an actual grabbed mouse button, then don't
send a mouse up event. Caught this while adding e_grabinput support to
Enlightenment.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we do an input_ungrab, we should be sending a mouse up
event so that apps/elm/etc know that the mouse has been released. This
fixes an issue in the Elm Features DnD test report by Daniel Zaoui
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Added a condition to check if system has mouse before setting
the cursor on surface.
@fix
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1707
Summary:
1. Added cursor_theme_name to Ecore_Wl_Input struct.
2. Made it configurable through environment variable ECORE_WL_INPUT_CURSOR_THEME_NAME.
3. Added a API ecore_wl_cursor_theme_name_set for user to set manually.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1458
Summary:
1. Added cursor_size to Ecore_Wl_Input struct.
2. Made it configurable through environment variable ECORE_WL_INPUT_CURSOR_SIZE.
3. Added a API ecore_wl_input_cursor_size_set for user to set manually.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1456
Conflicts:
src/lib/ecore_wayland/ecore_wl_private.h
@fix: There is no use for an input cursor surface if the seat does not
have the pointer ability (for kiosk cases, or touch-only cases where
a pointer is not created).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Since we already check the button pressed state in the 'if' above
this, there is no need to check it again.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The previous workaround used to send a mouse up event to the
application, using the pointer enter callback to determine when an
implicit grab has finished. This was "simulating" a mouse up event when
the surface move or resize finished.
However, this doesn't work for touch-based move. The pointer enter isn't
emitted, because the wl_touch interface doesn't have the concept of a
pointer.
Changing this code to make it more similar to what Weston's toytoolkit
does, the mouse up event is sent as soon as the move or resize grab
starts. After that, the compositor takes care of the move/resize almost
entirely.
Should fix T468.
down_info is a struct that stores some information about the current
pressed touch events. It should be used for that specific touch point,
instead of the generic input info, when sending a mouse_up event.
Previously, if you were hold down shift for 1-2 seconds and then press
a key, you would get superfluous key repeats (even tho you released
the printable key). This was because the "key repeat" code was not
checking for the same key before (re)starting the repeat timer.
This fixes the repeating key issue by checking if the key pressed is
different than the one already pressed. If so, it will (re)start the
timer. If it is not different, then the timer is already running and
we don't need to do anything.
Fixes T552
Signed-off-by: Chris Michael <cp.michael@samsung.com>
values.
Previously, the keyname and key fields of the Ecore_Event_Key
structure were being filled in with the capitalized version of the
key. This is due to xkb_keysym_get_name always returning keys with the
modifier applied. There is no actual function in xkbcommon to Not do
this :/ so we have to manually check if Shift is pressed, and if so
then we need to convert the key to lowercase.
Fixes T550
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Send events to properly focused surface.
Fill in missing parts of the event structures (ev->root, ev->multi).
Signed-off-by: Chris Michael <cp.michael@samsung.com>