summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2015-02-13 14:01:54 +0800
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-02-23 15:41:57 +0200
commit01193aeb12b45c01d5f4ee72628a3fad29353271 (patch)
tree3be066f4e1191703e5d447afc2c10aacd51e29d2
parentc2b101114f54abb048a7594e3b5f7002eee8211e (diff)
desktop-shell: Fix coding style of add_popup_grab
Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--desktop-shell/shell.c37
1 files changed, 24 insertions, 13 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index db0c5a90..1242f93c 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3372,33 +3372,44 @@ touch_popup_grab_end(struct weston_touch *touch)
}
static void
-add_popup_grab(struct shell_surface *shsurf, struct shell_seat *shseat, int32_t type)
+add_popup_grab(struct shell_surface *shsurf,
+ struct shell_seat *shseat,
+ int32_t type)
{
struct weston_seat *seat = shseat->seat;
if (wl_list_empty(&shseat->popup_grab.surfaces_list)) {
shseat->popup_grab.type = type;
- shseat->popup_grab.client = wl_resource_get_client(shsurf->resource);
+ shseat->popup_grab.client =
+ wl_resource_get_client(shsurf->resource);
if (type == POINTER) {
- shseat->popup_grab.grab.interface = &popup_grab_interface;
- /* We must make sure here that this popup was opened after
- * a mouse press, and not just by moving around with other
- * popups already open. */
+ shseat->popup_grab.grab.interface =
+ &popup_grab_interface;
+
+ /* We must make sure here that this popup was opened
+ * after a mouse press, and not just by moving around
+ * with other popups already open. */
if (shseat->seat->pointer->button_count > 0)
shseat->popup_grab.initial_up = 0;
} else if (type == TOUCH) {
- shseat->popup_grab.touch_grab.interface = &touch_popup_grab_interface;
+ shseat->popup_grab.touch_grab.interface =
+ &touch_popup_grab_interface;
}
- wl_list_insert(&shseat->popup_grab.surfaces_list, &shsurf->popup.grab_link);
+ wl_list_insert(&shseat->popup_grab.surfaces_list,
+ &shsurf->popup.grab_link);
- if (type == POINTER)
- weston_pointer_start_grab(seat->pointer, &shseat->popup_grab.grab);
- else if (type == TOUCH)
- weston_touch_start_grab(seat->touch, &shseat->popup_grab.touch_grab);
+ if (type == POINTER) {
+ weston_pointer_start_grab(seat->pointer,
+ &shseat->popup_grab.grab);
+ } else if (type == TOUCH) {
+ weston_touch_start_grab(seat->touch,
+ &shseat->popup_grab.touch_grab);
+ }
} else {
- wl_list_insert(&shseat->popup_grab.surfaces_list, &shsurf->popup.grab_link);
+ wl_list_insert(&shseat->popup_grab.surfaces_list,
+ &shsurf->popup.grab_link);
}
}