summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-12-10 12:17:37 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-10 12:17:37 -0500
commit6972d25dc9ac5233f75e8d9b3b96eb5ce35427a9 (patch)
tree380a443f9c878b9ee41c6237387463aaebd4b1be /src/lib
parentd800e81d832813707f2513764013443a67a87987 (diff)
ecore-drm: Don't declare sprite variable unless we need it, also fix
some formatting. Summary: This commit saves from declaring variable for Ecore_Drm_Sprite unless we are going inactive and need to iterate sprites. (and also fixes some formatting) @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_drm/ecore_drm_logind.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c
index 332eccbe00..2e1110261c 100644
--- a/src/lib/ecore_drm/ecore_drm_logind.c
+++ b/src/lib/ecore_drm/ecore_drm_logind.c
@@ -10,7 +10,7 @@
10# define KDSKBMUTE 0x4B51 10# define KDSKBMUTE 0x4B51
11#endif 11#endif
12 12
13Ecore_Event_Handler *active_hdl; 13static Ecore_Event_Handler *active_hdl;
14static char *sid; 14static char *sid;
15 15
16static Eina_Bool 16static Eina_Bool
@@ -70,12 +70,11 @@ _ecore_drm_logind_cb_activate(void *data, int type EINA_UNUSED, void *event)
70{ 70{
71 Ecore_Drm_Event_Activate *e; 71 Ecore_Drm_Event_Activate *e;
72 Ecore_Drm_Device *dev; 72 Ecore_Drm_Device *dev;
73 Ecore_Drm_Sprite *sprite;
74 Ecore_Drm_Output *output; 73 Ecore_Drm_Output *output;
75 Eina_List *l; 74 Eina_List *l;
76 75
77
78 if ((!event) || (!data)) return ECORE_CALLBACK_RENEW; 76 if ((!event) || (!data)) return ECORE_CALLBACK_RENEW;
77
79 e = event; 78 e = event;
80 dev = data; 79 dev = data;
81 80
@@ -87,6 +86,8 @@ _ecore_drm_logind_cb_activate(void *data, int type EINA_UNUSED, void *event)
87 } 86 }
88 else 87 else
89 { 88 {
89 Ecore_Drm_Sprite *sprite;
90
90 /* disable hardware cursor */ 91 /* disable hardware cursor */
91 EINA_LIST_FOREACH(dev->outputs, l, output) 92 EINA_LIST_FOREACH(dev->outputs, l, output)
92 ecore_drm_output_cursor_size_set(output, 0, 0, 0); 93 ecore_drm_output_cursor_size_set(output, 0, 0, 0);
@@ -217,17 +218,17 @@ _ecore_drm_logind_vt_open(Ecore_Drm_Device *dev, const char *name)
217 218
218 /* setup handler for signals */ 219 /* setup handler for signals */
219 dev->tty.event_hdlr = 220 dev->tty.event_hdlr =
220 ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, 221 ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER,
221 _ecore_drm_logind_cb_vt_signal, dev); 222 _ecore_drm_logind_cb_vt_signal, dev);
222 223
223 /* setup handler for key event of vt switch */ 224 /* setup handler for key event of vt switch */
224 dev->tty.switch_hdlr = 225 dev->tty.switch_hdlr =
225 ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, 226 ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
226 _ecore_drm_logind_cb_vt_switch, dev); 227 _ecore_drm_logind_cb_vt_switch, dev);
227 228
228 active_hdl = 229 active_hdl =
229 ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, 230 ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE,
230 _ecore_drm_logind_cb_activate, dev); 231 _ecore_drm_logind_cb_activate, dev);
231 232
232 /* set current tty into env */ 233 /* set current tty into env */
233 setenv("ECORE_DRM_TTY", tty, 1); 234 setenv("ECORE_DRM_TTY", tty, 1);
@@ -301,7 +302,8 @@ _ecore_drm_logind_device_open(const char *device, Ecore_Drm_Open_Cb callback, vo
301 if (stat(device, &st) < 0) return EINA_FALSE; 302 if (stat(device, &st) < 0) return EINA_FALSE;
302 if (!S_ISCHR(st.st_mode)) return EINA_FALSE; 303 if (!S_ISCHR(st.st_mode)) return EINA_FALSE;
303 304
304 if (_ecore_drm_dbus_device_take(major(st.st_rdev), minor(st.st_rdev), callback, data) < 0) 305 if (_ecore_drm_dbus_device_take(major(st.st_rdev), minor(st.st_rdev),
306 callback, data) < 0)
305 return EINA_FALSE; 307 return EINA_FALSE;
306 308
307 return EINA_TRUE; 309 return EINA_TRUE;