Commit Graph

30 Commits

Author SHA1 Message Date
Marcel Hollerbach 8400c9d3d2 ecore_x: fix emission of ECORE_X_EVENT_XKB_NEWKBD_NOTIFY
Summary:
the event XkbNewKeyboardNotify was never selected with
XkbSelectEventDetails so the event type could never occur.

The event is now each time emitted when a new event to the keyboard
happens. To clarify a bit: A new keyboard is always detected in x when
the set of keymaps changes.

@fix

Reviewers: raster, devilhorns, zmike

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3867
2016-04-07 14:02:29 +02:00
Chris Michael da0b4d4850 ecore-x: add safety checks for _ecore_x_disp in some functions
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-23 08:43:50 -05:00
Jean Guyomarc'h 4ab8471ef0 ecore_x: factorize multiple calls to strlen()
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
indefini fb75f6df5a ecore_x: don't add a x selection clear event if the time is the same as when selection was made.
Summary:
Without this, selection can get cleared when changing focus.
For example, if we have 2 entries:
The first entry is focused and has a selection.
When we focus the second entry, we want to select all the text.
But the old selection gets unfocused and sends a clear signal
to the new focused entry and it gets unselected.

This should fix T2739.

Reviewers: raster, tasn, devilhorns

Subscribers: herdsman, thiepha, cedric

Maniphest Tasks: T2739

Differential Revision: https://phab.enlightenment.org/D3127

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Srivardhan Hebbar a3ff6aff61 ecore_x: removing useless assignment variable.
Summary:
Assigning to NULL has no effect in the function calling this. So changed it to void.
Some compiler complain about this kind of construct. It is better to use the (void)
construct for silencing unused parameter with different kind of configure option.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3180

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-20 14:01:15 -07:00
Mike Blumenkrantz 0efc83d64d ecore-x: add property member to Ecore_X_Event_Selection_Notify
@feature
2015-08-12 17:58:58 -04:00
Mike Blumenkrantz 5032cf0df3 ecore-x: provide property state in Ecore_X_Event_Window_Property
this event is not very useful without the state member.

@feature
2015-08-10 13:18:13 -04:00
Mike Blumenkrantz 0b579f1f49 ecore-x: send last event time along with generic Ecore_X_Event_Client_Message
this won't necessarily be the same time that the client sent the message,
but at least it will provide a better reference point than 0
2015-07-21 18:12:54 -04:00
Mike Blumenkrantz 121e7be4b6 Revert "ecore-input: add keysym to Ecore_Event_Key struct"
This reverts commit c3f3c4eba8.

this was audited and found to be impractical due to portability concerns
2015-06-29 13:18:01 -04:00
Ji-Youn Park 5cb6cdbc5e Ecore_input: Add "ECORE_EVENT_MOUSE_BUTTON_CANCEL" event
If ecore get the mouse cancel event(ex: display off, or window stack change) from below, we need to deal with.
Currently, evas also generates up event using evas_event_feed_mouse_cancel function when window hide is called.
if cancel event occurs, ecore also call evas_event_mouse_feed_cancel like window hide situation.
cancel event means all button or touch event should be canceled, but in the future, if we need to deal each cancel event according to touch point,
we need to add api like evas_event_feed_multi_cancel

@feature
2015-06-16 15:33:43 +09:00
Mike Blumenkrantz c3f3c4eba8 ecore-input: add keysym to Ecore_Event_Key struct
currently only functional for x11, wl, drm

@feature
2015-05-20 14:50:46 -04:00
Carsten Haitzler efdca32fe8 ecore_x - axis events - if event struct alloc fails, free axis data
this frees the axis data coming in if struct alloc fails - should
basically never happen, but if it does we don't lose axis data as
caller asumes this data will be freed in the event

related to CID 1256115
2015-04-21 10:32:40 +09:00
Jean-Philippe ANDRE 0ef41604e8 Ecore: Use calloc() to initialize Ecore_Event_Key fully
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.
2015-03-25 15:34:23 -07:00
Carsten Haitzler 5bc509a0c0 ecore x - mark unused param as unused (warning--) 2014-11-25 16:07:09 +09:00
Jason Gerecke 26c943bac0 Expose device (e.g. pen) axis information to applications
Summary:
This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc.

Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers).

This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them.

**Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist

//Define and implement new Ecore_Event_Axis_Update events//
 * Harcode axis labels instead of including xserver-properties.h
 * Use C89-style comments
 * Use doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs
 * Reference typedef'd instead of raw types
 * Adjust how we count through valuators to support tilt/az
 * Add support for tilt and azimuth
 * Tweak memory management in case number of valuators differ
 * Expand TWIST axis normalization to declared range
 * Only normalize TWIST axis if resolution == 1 (wacom bug)
 * Cache label atoms on first use to minimize round-trips

//Implement EVAS_CALLBACK_AXIS_UPDATE event and friends//
 * Update to doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Typedef 'Evas_Axis_Label', 'Evas_Axis'
 * Move typedef for 'Evas_Event_Axis_Update'
 * Reference typedef'd instead of raw types

//Wire the Ecore and Evas implementations of axis update events together//
 * Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h
 * Move ecore_event_evas_axis_update to more logical position

//DEBUG: Add axis update logging to evas-multi-touch.c//
 * Removed from patch set

//Make evas-multi-touch demo use new axis functionality//
 * Have pressure adjust rectangle brightness instead of size
 * Use more available axis data when rendering rectangle (azimuth, tilt, twist)

Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly.

Reviewers: cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1514

Conflicts:
	src/lib/ecore_input/Ecore_Input.h

Carsten Haitzler -

** fixed forward enum typedefs (make things unhappy)
** fixed conflict above
** fixed wrong param type for _evas_canvas_event_feed_axis_update()
** fixed @sinces to be 1.13
** fixed formatting/indeting
** fixed order of operation reliance in if's with ()'s to be clear
** fixed functions to be static that should have been
2014-11-25 12:43:15 +09:00
Carsten Haitzler 20c8065da6 fix mouse sticking when xkbmap changes whilst running
this fixes T1415
2014-07-15 20:39:13 +09:00
Carsten Haitzler c21120ec96 this fixes crazy french altgr setups that confuse binding masks
this fixes T1273 - @fix
2014-07-04 18:02:10 +09:00
Chris Michael 6994cb2a86 ecore-x: Set keycode in ecore_event structure during key press/release events
bugfix@: As we have support in the Ecore_Event structure for storing
keycode on key press/release, let's utilize it. This will simplify
wayland compositor code as we won't have to parse key names to get the
keycode.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-05-09 08:00:26 +01:00
Jaehyun Cho 4432cd2e8e [ecore_x] Fix to handle paste null data case.
Summary: Do nothing when null data is pasted.

Reviewers: Hermet, raster

Reviewed By: raster

CC: seoz, raster, cedric

Differential Revision: https://phab.enlightenment.org/D473
2014-01-20 22:15:33 +09:00
Mike Blumenkrantz 131e0e1983 ecore-x now supports XPRESENT
see http://cgit.freedesktop.org/xorg/proto/presentproto/plain/presentproto.txt
2014-01-13 10:19:11 -05:00
Jaehyun Cho 4daf83269a [ecore_x] Set data of selection event for XDND selection
Summary: Add data set case of selection event for XDND selection if selection atom is XDND

Reviewers: raster

Reviewed By: raster

CC: JackDanielZ, woohyun, Hermet, seoz, cedric

Differential Revision: https://phab.enlightenment.org/D446
2014-01-10 15:46:15 +09:00
Mike Blumenkrantz 60111ce8ca add ECORE_X_SYNC env variable for xlib backend 2013-07-18 06:17:40 +01:00
Chris Michael 7bf6ba1f67 Add missing free(data) reported by jeyzu. Thanks ;)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:22:20 +01:00
Chris Michael f880ef9045 Remove erroneous copy/paste of data free
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:04:29 +01:00
Chris Michael 0d12ab48be Fix memleak spotted by Coverity: ecore_x_window_prop_property_get can
allocate space for 'data'. If we return before using it, then free
'data'. If we use it later for XGetAtomName, then we can free if After
we have gotten the atom names and sent the event. (NB: XGetAtomName
will allocate it's own space for the returned name, so this is safe).

NB: Fixes Coverity CID1039271

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:24:21 +01:00
Chris Michael 5969c97f7a Fix memleaks reported by Coverity: ecore_x_window_prop_property_get
allocates space for 'data'. We need to free that if we are going to
return before using it.

NB: Fixes Coverity CID1039270

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:17:58 +01:00
Carsten Haitzler 29ebec4bfb MINOR feature... not worth changelogging - add send event flag to
ecore-x-hide event.



SVN revision: 83418
2013-01-29 08:23:40 +00:00
Jiyoun Park e290dfae93 add info log related with mouse down/up
SVN revision: 83351
2013-01-26 09:47:21 +00:00
Gustavo Sverzut Barbieri df701d8ca2 some clang warning cleanups i forgot to commit
SVN revision: 83024
2013-01-21 00:22:35 +00:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00