summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-02-17 16:13:28 -0500
committerChris Michael <cp.michael@samsung.com>2015-02-17 16:19:55 -0500
commit96cbbb3416307211830aa6edc129a8b9984803cf (patch)
tree0c547f5682eda7b4da9f659a832b4ff5ee93c196 /src/lib/ecore_drm
parenta5fe8a1e87b4e4f75d148fd97f3483ce03d2f777 (diff)
ecore-drm: Don't recreate ecore_event handlers if we already have them
Summary: If we already have the ecore_event_handlers for logind, then do not recreate them on logind_connect. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_logind.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c
index d49d2c7941..47974b5f44 100644
--- a/src/lib/ecore_drm/ecore_drm_logind.c
+++ b/src/lib/ecore_drm/ecore_drm_logind.c
@@ -234,13 +234,19 @@ _ecore_drm_logind_connect(Ecore_Drm_Device *dev)
234 } 234 }
235 235
236 /* setup handler for vt signals */ 236 /* setup handler for vt signals */
237 dev->tty.event_hdlr = 237 if (!dev->tty.event_hdlr)
238 ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, 238 {
239 _ecore_drm_logind_cb_vt_signal, dev); 239 dev->tty.event_hdlr =
240 ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER,
241 _ecore_drm_logind_cb_vt_signal, dev);
242 }
240 243
241 active_hdlr = 244 if (!active_hdlr)
242 ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, 245 {
243 _ecore_drm_logind_cb_activate, dev); 246 active_hdlr =
247 ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE,
248 _ecore_drm_logind_cb_activate, dev);
249 }
244 250
245 return EINA_TRUE; 251 return EINA_TRUE;
246 252