This patch sends a touch motion event before sending of touch up/down
events. This allows some compositors (enlightenment) to update their
internal representation of where the mouse pointer is before handling
button events (as touch down/up is treated as a mouse button down/up).
Fixes T5094 for the old man ;)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch adds a timestamp field to the touch structure so that we
can store it and do not have to refetch the timestamp when sending
touch events.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Some devices reported by libinput show up as both keyboard and mouse,
even tho they are physically only just a keyboard or just a mouse.
When a device gets added, we can verify if it is actually a mouse by
checking if the device has BTN_LEFT (and for keyboards, check
KEY_ENTER). This stops us from getting multiple mouse pointers
reported when we really only have one.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
When we are adding new input devices, if we already have an existing
one (keyboard, pointer, touch, etc) then we should just be
incrementing the device count and returning from the init function.
Previous code here would increment the device count, then continue on
and create a new internal representation of the device. This was
causing issues when a device gets removed.
Fixes T4192
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Fix using mkstemp directly without securely setting umask first by
making use of eina_file_mkstemp which does set unmask.
Fixes Coverity CID1357165
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch adds 2 new API functions which can enable keyboard key
remapping, and set which keys are to be remapped.
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This adds an API function that can be called to calibrate input
devices based on a given output size
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch removes an API function that basically "tried to do too
much". This was supposed to be used for centering mouse pointer and
calibrating an input device based on output size. Remove this
silliness. It would be better to have one API for calibrating, and a
separate API for pointer centering. These new APIs will come shortly
in pending patches.
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As we use the mouse threshold for determining double/triple clicking,
it would probably be a good idea if that threshold had a value
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
'window' and pointer max w/h attributes are set for a manager object,
so let the attributes stay there. this also resolves issues where devices
created at a later point would fail to be initialized with these attributes
We should be checking the return value when we try to get the default
matrix calibration for an input device so we can fail properly
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As constraints for pointer movement are already handled in the
function which sends the pointer motion event, there is no need to
handle them inside the function which gets pointer position.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Reporting of mouse axis values should not be multiplied by 10. This
will cause serious jumps in wheel events. Loosely based on
1a339c9e59
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Small patch to add an API function that can be used to set the current
pointer position on a given seat name. This function (typically) will
be used inside an Ecore_Evas to "pointer warp".
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
NB: Minor cosmetic changes such as removing a commented out line of
code and fixing an error message
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds start of code to create or remove input devices such
as keyboards, pointers, or touch devices.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>