do not force client focus setting after calling e_desk_last_focused_focus()

in some cases focus setting must be deferred, and forcing focus in these cases
will create focus bugs

ref 9ae24a3a4a
devs/bu5hm4n/sandbox_fix
Mike Blumenkrantz 5 years ago
parent e0ff23d83b
commit ef6197b119
  1. 5
      src/bin/e_actions.c
  2. 4
      src/bin/e_client.c
  3. 10
      src/bin/e_comp_x.c
  4. 5
      src/bin/e_int_client_menu.c
  5. 5
      src/modules/msgbus/msgbus_window.c
  6. 10
      src/modules/pager/e_mod_main.c
  7. 10
      src/modules/pager/gadget/pager.c
  8. 10
      src/modules/pager_plain/e_mod_main.c

@ -1329,10 +1329,7 @@ ACT_FN_GO(window_desk_move_to, )
{
e_client_desk_set(ec, desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
}
}

@ -4514,12 +4514,10 @@ e_client_iconify(E_Client *ec)
e_client_iconify(child);
}
e_client_stack_list_finish(list);
E_Client *pec;
E_Desk *desk;
desk = e_desk_current_get(ec->zone);
pec = e_desk_last_focused_focus(desk);
if (pec) evas_object_focus_set(pec->frame, 1);
e_desk_last_focused_focus(desk);
return;
}
ec->iconic = 1;

@ -2178,10 +2178,7 @@ _e_comp_x_message(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Cl
{
e_client_desk_set(ec, desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
}
}
@ -2268,10 +2265,7 @@ _e_comp_x_message(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Cl
desk->window_profile);
e_client_desk_set(ec, desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
e_client_desk_window_profile_wait_desk_set(ec, NULL);
}

@ -1326,10 +1326,7 @@ _e_client_menu_cb_sendto(void *data, E_Menu *m, E_Menu_Item *mi EINA_UNUSED)
ec->hidden = 0;
e_client_desk_set(ec, desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
}

@ -149,10 +149,7 @@ _e_msgbus_window_sendtodesktop_cb( const Eldbus_Service_Interface *iface EINA_UN
{
e_client_desk_set(ec, desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
}
}

@ -1354,10 +1354,7 @@ _pager_update_drop_position(Pager *p, Evas_Coord x, Evas_Coord y)
y = E_CLAMP(vy + zy, zy, zy + zh - ec->h);
evas_object_move(ec->frame, x, y);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
else
{
@ -1481,10 +1478,7 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
ec->hidden = 0;
e_client_desk_set(ec, pd->desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
evas_object_raise(ec->frame);
if ((!max) && (!fullscreen))

@ -2248,10 +2248,7 @@ _pager_update_drop_position(Pager *p, Pager_Desk *pd, Evas_Coord x, Evas_Coord y
y = E_CLAMP(vy + zy, zy, zy + zh - ec->h);
evas_object_move(ec->frame, x, y);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
}
else
{
@ -2371,10 +2368,7 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
ec->hidden = 0;
e_client_desk_set(ec, pd->desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
evas_object_raise(ec->frame);
if ((!max) && (!fullscreen))

@ -1904,10 +1904,7 @@ _pager_window_cb_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EI
ec->hidden = 0;
e_client_desk_set(ec, pd->desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
edje_object_signal_emit(pd->o_desk, "e,action,drag,in", "e");
pd->pager->active_drop_pd = pd;
}
@ -2174,10 +2171,7 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
ec->hidden = 0;
e_client_desk_set(ec, pd->desk);
if (was_focused)
{
E_Client *ec_focus = e_desk_last_focused_focus(old_desk);
if (ec_focus) e_client_focus_set_with_pointer(ec_focus);
}
e_desk_last_focused_focus(old_desk);
evas_object_raise(ec->frame);
if ((!max) && (!fullscreen))

Loading…
Cancel
Save