From: Nobuhiko Tanibata Date: Mon, 29 Dec 2014 09:12:50 +0000 (+0200) Subject: downstream: Add the processing which has notice of click event from compositor X-Git-Tag: accepted/tizen/ivi/20141231.002412^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48b57036d720d76dcc06ce322187d2b3e11a9c76;p=profile%2Fivi%2Fweston-ivi-shell.git downstream: Add the processing which has notice of click event from compositor Signed-off-by: Nobuhiko Tanibata Change-Id: I1a2b6776a18b1e201f33ebaa9df382148a7adbe0 --- diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 3c0800d..b0f79a8 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -622,6 +622,20 @@ get_wl_shell_info(struct ivi_layout_surface *layout_surface, uint32_t id_surface } } +static void +click_to_activate_binding(struct weston_seat *seat, uint32_t time, uint32_t button, + void *data) +{ + if (seat->pointer->grab != &seat->pointer->default_grab) { + return; + } + if (seat->pointer->focus == NULL) { + return; + } + + weston_surface_activate(seat->pointer->focus->surface, seat); +} + /* * Initialization of ivi-shell. */ @@ -723,6 +737,8 @@ module_init(struct weston_compositor *compositor, return -1; } + weston_compositor_add_button_binding(compositor, BTN_LEFT, 0, click_to_activate_binding, shell); + free(setting.ivi_module); /* Initialize ivi-shell-ext. wl_shell is supported here */