In preparation for further refactoring.

Signed-off-by: Jonas Ådahl <jad...@gmail.com>
---
 desktop-shell/shell.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 4a0cb99..4b8724c 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4927,12 +4927,14 @@ is_black_surface (struct weston_surface *es, struct 
weston_surface **fs_surface)
 static void
 activate_binding(struct weston_seat *seat,
                 struct desktop_shell *shell,
-                struct weston_surface *focus)
+                struct weston_view *focus_view)
 {
+       struct weston_surface *focus;
        struct weston_surface *main_surface;
 
-       if (!focus)
+       if (!focus_view)
                return;
+       focus = focus_view->surface;
 
        if (is_black_surface(focus, &main_surface))
                focus = main_surface;
@@ -4945,7 +4947,8 @@ activate_binding(struct weston_seat *seat,
 }
 
 static void
-click_to_activate_binding(struct weston_seat *seat, uint32_t time, uint32_t 
button,
+click_to_activate_binding(struct weston_seat *seat,
+                         uint32_t time, uint32_t button,
                          void *data)
 {
        if (seat->pointer->grab != &seat->pointer->default_grab)
@@ -4953,7 +4956,7 @@ click_to_activate_binding(struct weston_seat *seat, 
uint32_t time, uint32_t butt
        if (seat->pointer->focus == NULL)
                return;
 
-       activate_binding(seat, data, seat->pointer->focus->surface);
+       activate_binding(seat, data, seat->pointer->focus);
 }
 
 static void
@@ -4964,7 +4967,7 @@ touch_to_activate_binding(struct weston_seat *seat, 
uint32_t time, void *data)
        if (seat->touch->focus == NULL)
                return;
 
-       activate_binding(seat, data, seat->touch->focus->surface);
+       activate_binding(seat, data, seat->touch->focus);
 }
 
 static void
-- 
1.8.5.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to