Commit 2400d3f2 authored by ryuan.choi@samsung.com's avatar ryuan.choi@samsung.com
Browse files

[EFL] Change the focus when the web view is clicked in MiniBrowser and EWebLauncher

https://bugs.webkit.org/show_bug.cgi?id=95689

Reviewed by Kenneth Rohde Christiansen.

In Minibrowser & EWebLauncher, the web view loses the focus when url bar is clicked.
So, there are bugs that key events are always generated in url bar although
the user clicked the web view.

This patch recovers the focus of the web view when left button is pressed and
adds for MiniBrowser to toggle the focus when middle button is pressed
like EWebLauncher already did.

* EWebLauncher/main.c:
(on_mouse_down):
* MiniBrowser/efl/main.c:
(on_mouse_down):
(browserCreate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5598b51c
2012-09-03 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Change the focus when the web view is clicked in MiniBrowser and EWebLauncher
https://bugs.webkit.org/show_bug.cgi?id=95689
Reviewed by Kenneth Rohde Christiansen.
In Minibrowser & EWebLauncher, the web view loses the focus when url bar is clicked.
So, there are bugs that key events are always generated in url bar although
the user clicked the web view.
This patch recovers the focus of the web view when left button is pressed and
adds for MiniBrowser to toggle the focus when middle button is pressed
like EWebLauncher already did.
* EWebLauncher/main.c:
(on_mouse_down):
* MiniBrowser/efl/main.c:
(on_mouse_down):
(browserCreate):
2012-09-03 Tao Bai <michaelbai@chromium.org>
 
Added ANDROID_GDBSERVER definition for Ant
......
......@@ -433,8 +433,11 @@ on_url_changed(void* user_data, Evas_Object* webview, void* event_info)
static void
on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info)
{
Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down*) event_info;
if (ev->button == 2)
Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
if (ev->button == 1)
evas_object_focus_set(webview, EINA_TRUE);
else if (ev->button == 2)
evas_object_focus_set(webview, !evas_object_focus_get(webview));
}
......
......@@ -132,6 +132,17 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
}
static void
on_mouse_down(void *data, Evas *e, Evas_Object *webview, void *event_info)
{
Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
if (ev->button == 1)
evas_object_focus_set(webview, EINA_TRUE);
else if (ev->button == 2)
evas_object_focus_set(webview, !evas_object_focus_get(webview));
}
static void
title_set(Ecore_Evas *ee, const char *title, int progress)
{
......@@ -241,6 +252,7 @@ static MiniBrowser *browserCreate(const char *url, const char *engine)
evas_object_smart_callback_add(app->browser, "uri,changed", on_url_changed, app);
evas_object_event_callback_add(app->browser, EVAS_CALLBACK_KEY_DOWN, on_key_down, app);
evas_object_event_callback_add(app->browser, EVAS_CALLBACK_MOUSE_DOWN, on_mouse_down, app);
evas_object_size_hint_weight_set(app->browser, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_move(app->browser, 0, URL_BAR_HEIGHT);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment