summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-10-26 10:24:28 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-02 13:32:30 -0500
commitc648775b9571d327b082c7f80b83084ee8e1f35a (patch)
treea356a8c3b690bc735056a79372314f60487186bc
parent5ea81d10fd07d523d1246aec06ff66a1efb22799 (diff)
Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/bin/e_comp_wl_input.c60
1 files changed, 29 insertions, 31 deletions
diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c
index 7e8f2e954..ec9d2e140 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -20,7 +20,7 @@ _e_comp_wl_input_update_seat_caps(void)
20 caps |= WL_SEAT_CAPABILITY_TOUCH; 20 caps |= WL_SEAT_CAPABILITY_TOUCH;
21 21
22 EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, res) 22 EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, res)
23 wl_seat_send_capabilities(res, caps); 23 wl_seat_send_capabilities(res, caps);
24} 24}
25 25
26static void 26static void
@@ -126,9 +126,13 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource)
126 e_comp_wl->kbd.resources = 126 e_comp_wl->kbd.resources =
127 eina_list_remove(e_comp_wl->kbd.resources, resource); 127 eina_list_remove(e_comp_wl->kbd.resources, resource);
128 EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res) 128 EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
129 if (res == resource) 129 {
130 e_comp_wl->kbd.focused = 130 if (res == resource)
131 eina_list_remove_list(e_comp_wl->kbd.focused, l); 131 {
132 e_comp_wl->kbd.focused =
133 eina_list_remove_list(e_comp_wl->kbd.focused, l);
134 }
135 }
132} 136}
133 137
134void 138void
@@ -169,8 +173,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
169 wl_resource_get_version(resource), id); 173 wl_resource_get_version(resource), id);
170 if (!res) 174 if (!res)
171 { 175 {
172 ERR("Could not create keyboard on seat %s: %m", 176 ERR("Could not create keyboard on seat %s: %m", e_comp_wl->seat.name);
173 e_comp_wl->seat.name);
174 wl_client_post_no_memory(client); 177 wl_client_post_no_memory(client);
175 return; 178 return;
176 } 179 }
@@ -187,8 +190,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
187 190
188 /* send current keymap */ 191 /* send current keymap */
189 wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, 192 wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
190 e_comp_wl->xkb.fd, 193 e_comp_wl->xkb.fd, e_comp_wl->xkb.size);
191 e_comp_wl->xkb.size);
192 194
193 /* if the client owns the focused surface, we need to send an enter */ 195 /* if the client owns the focused surface, we need to send an enter */
194 focused = e_client_focused_get(); 196 focused = e_client_focused_get();
@@ -210,23 +212,23 @@ _e_comp_wl_input_cb_touch_unbind(struct wl_resource *resource)
210static void 212static void
211_e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED) 213_e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED)
212{ 214{
213 struct wl_resource *res; 215 struct wl_resource *res;
214 216
215 /* try to create pointer resource */ 217 /* try to create pointer resource */
216 res = wl_resource_create(client, &wl_touch_interface, 218 res = wl_resource_create(client, &wl_touch_interface,
217 wl_resource_get_version(resource), id); 219 wl_resource_get_version(resource), id);
218 if (!res) 220 if (!res)
219 { 221 {
220 ERR("Could not create touch on seat %s: %m", 222 ERR("Could not create touch on seat %s: %m",
221 e_comp_wl->seat.name); 223 e_comp_wl->seat.name);
222 wl_client_post_no_memory(client); 224 wl_client_post_no_memory(client);
223 return; 225 return;
224 } 226 }
225 227
226 e_comp_wl->touch.resources = 228 e_comp_wl->touch.resources =
227 eina_list_append(e_comp_wl->touch.resources, res); 229 eina_list_append(e_comp_wl->touch.resources, res);
228 wl_resource_set_implementation(res, &_e_touch_interface, 230 wl_resource_set_implementation(res, &_e_touch_interface,
229 e_comp->wl_comp_data, 231 e_comp->wl_comp_data,
230 _e_comp_wl_input_cb_touch_unbind); 232 _e_comp_wl_input_cb_touch_unbind);
231} 233}
232 234
@@ -403,8 +405,7 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap)
403 /* send updated keymap */ 405 /* send updated keymap */
404 EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res) 406 EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
405 wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, 407 wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
406 e_comp_wl->xkb.fd, 408 e_comp_wl->xkb.fd, e_comp_wl->xkb.size);
407 e_comp_wl->xkb.size);
408 409
409 /* update modifiers */ 410 /* update modifiers */
410 e_comp_wl_input_keyboard_modifiers_update(); 411 e_comp_wl_input_keyboard_modifiers_update();
@@ -501,23 +502,20 @@ e_comp_wl_input_keyboard_modifiers_serialize(void)
501 xkb_mod_mask_t mod; 502 xkb_mod_mask_t mod;
502 xkb_layout_index_t grp; 503 xkb_layout_index_t grp;
503 504
504 mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, 505 mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_DEPRESSED);
505 XKB_STATE_DEPRESSED);
506 changed |= mod != e_comp_wl->kbd.mod_depressed; 506 changed |= mod != e_comp_wl->kbd.mod_depressed;
507 e_comp_wl->kbd.mod_depressed = mod; 507 e_comp_wl->kbd.mod_depressed = mod;
508 508
509 mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, 509 mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LATCHED);
510 XKB_STATE_MODS_LATCHED);
511 changed |= mod != e_comp_wl->kbd.mod_latched; 510 changed |= mod != e_comp_wl->kbd.mod_latched;
512 e_comp_wl->kbd.mod_latched = mod; 511 e_comp_wl->kbd.mod_latched = mod;
513 512
514 mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, 513 mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LOCKED);
515 XKB_STATE_MODS_LOCKED);
516 changed |= mod != e_comp_wl->kbd.mod_locked; 514 changed |= mod != e_comp_wl->kbd.mod_locked;
517 e_comp_wl->kbd.mod_locked = mod; 515 e_comp_wl->kbd.mod_locked = mod;
518 516
519 grp = xkb_state_serialize_layout(e_comp_wl->xkb.state, 517 grp = xkb_state_serialize_layout(e_comp_wl->xkb.state,
520 XKB_STATE_LAYOUT_EFFECTIVE); 518 XKB_STATE_LAYOUT_EFFECTIVE);
521 changed |= grp != e_comp_wl->kbd.mod_group; 519 changed |= grp != e_comp_wl->kbd.mod_group;
522 e_comp_wl->kbd.mod_group = grp; 520 e_comp_wl->kbd.mod_group = grp;
523 return changed; 521 return changed;