From b585a73ce7dea95e6fffecb44e027c0699979da7 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 8 Jan 2013 09:13:14 +0000 Subject: [PATCH] [access] activate mesage would change focused window. if focused window is changed, the message should send to changed window. SVN revision: 82393 --- src/modules/access/e_mod_main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/modules/access/e_mod_main.c b/src/modules/access/e_mod_main.c index 89f13bdd5..71483b429 100644 --- a/src/modules/access/e_mod_main.c +++ b/src/modules/access/e_mod_main.c @@ -58,6 +58,8 @@ typedef struct int device; } Multi; +static E_Border *_prev_bd; + static Ecore_X_Atom _atom_access = 0; static Ecore_X_Window target_win = 0; @@ -81,6 +83,10 @@ _mouse_in_win_get(Cover *cov, int x, int y) skip[i] = cov2->win; i++; } + + /* TODO: if target window is changed without highlight object, + then previous target window which has the highlight object + should get the message. how? */ target_win = ecore_x_window_shadow_tree_at_xy_with_skip_get (cov->zone->container->manager->root, x, y, skip, i); } @@ -269,6 +275,11 @@ _mouse_up(Cover *cov, Ecore_Event_Mouse_Button *ev) { if (ev->double_click) { + /* activate message would change focused window + FIXME: but it is possibe to create unfocused window + in this case, the message should go to unfocused window? */ + _prev_bd = e_border_focused_get(); + INFO(cov, "double_click"); ecore_x_e_illume_access_action_activate_send(target_win); } @@ -365,6 +376,7 @@ _cb_mouse_down(void *data __UNUSED__, Cover *cov; int i = 0; int x, y; + E_Border *bd; for (i = 0; i < 3; i++) { @@ -376,6 +388,12 @@ _cb_mouse_down(void *data __UNUSED__, else if (multi_device[i] == ev->multi.device) break; } + /* activate message would change focused window + FIXME: but it is possibe to create unfocused window + in this case, the message should go to focused window? */ + bd = e_border_focused_get(); + if (bd && (bd != _prev_bd)) target_win = bd->client.win; + EINA_LIST_FOREACH(covers, l, cov) { if (ev->window == cov->win)