aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-24 15:58:28 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-24 16:18:51 -0500
commit4b38020f894fe1f514483d067767d323ec4105e0 (patch)
treedc025cba314648a98970809657b697b2d8a90dac
parentefl-wl: add functionality for directly passing through xkb objects (diff)
downloadefl-4b38020f894fe1f514483d067767d323ec4105e0.tar.gz
ecore-x: add more info to Ecore_X_Event_Xkb event
this event corresponds to xkb state changes which are useful when working with xkb instances @feature
-rw-r--r--src/lib/ecore_x/Ecore_X.h8
-rw-r--r--src/lib/ecore_x/ecore_x_events.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index 3a6afa19fc..b0955553ee 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -2494,8 +2494,16 @@ typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;
struct _Ecore_X_Event_Xkb
{
int group;
+ int base_group; /** @since 1.21 */
+ int latched_group; /** @since 1.21 */
+ int locked_group; /** @since 1.21 */
+ unsigned int mods; /** @since 1.21 */
+ unsigned int base_mods; /** @since 1.21 */
+ unsigned int latched_mods; /** @since 1.21 */
+ unsigned int locked_mods; /** @since 1.21 */
};
typedef struct _Ecore_X_Event_Xkb Ecore_X_Event_Xkb; /** @since 1.7 */
+typedef struct _Ecore_X_Event_Xkb Ecore_X_Xkb_State; /** @since 1.21 */
EAPI Eina_Bool ecore_x_damage_query(void);
EAPI Ecore_X_Damage ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level);
diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c
index 11d098826e..51bf491d4b 100644
--- a/src/lib/ecore_x/ecore_x_events.c
+++ b/src/lib/ecore_x/ecore_x_events.c
@@ -2656,6 +2656,14 @@ _ecore_x_event_handle_xkb(XEvent *xevent)
return;
e->group = xkbev->state.group;
+ e->base_group = xkbev->state.base_group;
+ e->latched_group = xkbev->state.latched_group;
+ e->locked_group = xkbev->state.locked_group;
+
+ e->mods = xkbev->state.mods;
+ e->base_mods = xkbev->state.base_mods;
+ e->latched_mods = xkbev->state.latched_mods;
+ e->locked_mods = xkbev->state.locked_mods;
ecore_event_add(ECORE_X_EVENT_XKB_STATE_NOTIFY, e, free_hash, NULL);
eina_hash_add(emitted_events, &xkbev->state.serial, (void*) 1);
}