diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2015-06-26 12:37:56 +0800 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-10-23 17:03:54 -0700 |
commit | cd0f1acff44bfc6b6e9a60861f139f622938d0c8 (patch) | |
tree | ecd8c1c2e02bb100807eaf0abcae841f6a4eb993 /desktop-shell | |
parent | 43008c7620cd29468f1de1c7e272ee0e34f28c95 (diff) |
desktop-shell: Make activate_binding take a view instead of surface
In preparation for further refactoring. This patch also removes a
redundant NULL check. Since we pass views, and views will always have an
associated surface, there is no point of checking if it has.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 3eb3f5c0..6ab134a6 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -5184,12 +5184,12 @@ 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) - return; + focus = focus_view->surface; if (is_black_surface(focus, &main_surface)) focus = main_surface; @@ -5210,7 +5210,7 @@ click_to_activate_binding(struct weston_pointer *pointer, uint32_t time, if (pointer->focus == NULL) return; - activate_binding(pointer->seat, data, pointer->focus->surface); + activate_binding(pointer->seat, data, pointer->focus); } static void @@ -5222,7 +5222,7 @@ touch_to_activate_binding(struct weston_touch *touch, uint32_t time, if (touch->focus == NULL) return; - activate_binding(touch->seat, data, touch->focus->surface); + activate_binding(touch->seat, data, touch->focus); } static void |