summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_manager.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-24 16:14:41 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-25 12:57:27 -0400
commit7fdcf841f57de11ea92f4b2d4eeec34c1c5a70e0 (patch)
treebbbd6c3619f22e7b15cf6b180981af05b384a8fb /src/lib/elput/elput_manager.c
parent5f088b026d8f39aafc6b6e70fe3b04dff79b179e (diff)
elput: change some functions and internal flags to enable async input setup
this sets attributes on the Elput_Manager struct so that devices created at a later point can then have relevant attributes applied to them
Diffstat (limited to 'src/lib/elput/elput_manager.c')
-rw-r--r--src/lib/elput/elput_manager.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/elput/elput_manager.c b/src/lib/elput/elput_manager.c
index 3b127afdc7..0dcc82055d 100644
--- a/src/lib/elput/elput_manager.c
+++ b/src/lib/elput/elput_manager.c
@@ -89,6 +89,7 @@ elput_manager_open(Elput_Manager *manager, const char *path, int flags)
89 manager->vt_hdlr = 89 manager->vt_hdlr =
90 ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, 90 ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
91 _cb_key_down, manager); 91 _cb_key_down, manager);
92 manager->vt_fd = ret;
92 } 93 }
93 } 94 }
94 95
@@ -101,8 +102,11 @@ elput_manager_close(Elput_Manager *manager, int fd)
101 EINA_SAFETY_ON_NULL_RETURN(manager); 102 EINA_SAFETY_ON_NULL_RETURN(manager);
102 EINA_SAFETY_ON_NULL_RETURN(manager->interface); 103 EINA_SAFETY_ON_NULL_RETURN(manager->interface);
103 104
104 if (manager->vt_hdlr) ecore_event_handler_del(manager->vt_hdlr); 105 if (fd == manager->vt_fd)
105 manager->vt_hdlr = NULL; 106 {
107 if (manager->vt_hdlr) ecore_event_handler_del(manager->vt_hdlr);
108 manager->vt_hdlr = NULL;
109 }
106 110
107 if (manager->interface->close) 111 if (manager->interface->close)
108 manager->interface->close(manager, fd); 112 manager->interface->close(manager, fd);
@@ -121,6 +125,15 @@ elput_manager_vt_set(Elput_Manager *manager, int vt)
121 return EINA_FALSE; 125 return EINA_FALSE;
122} 126}
123 127
128EAPI void
129elput_manager_window_set(Elput_Manager *manager, unsigned int window)
130{
131 EINA_SAFETY_ON_NULL_RETURN(manager);
132
133 manager->window = window;
134 _elput_input_window_update(manager);
135}
136
124EAPI const Eina_List * 137EAPI const Eina_List *
125elput_manager_seats_get(Elput_Manager *manager) 138elput_manager_seats_get(Elput_Manager *manager)
126{ 139{