From cbaf85ec6364c6bb8b8e3123a52b8a7af8d345f4 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 10 May 2023 14:39:26 +0900 Subject: [PATCH] e_client: remove the modal variable at e_client It is not used anymore. Change-Id: I491414a28def3e933fc69398e188620fb85ce131 --- src/bin/e_client.c | 17 +---------------- src/bin/e_client.h | 2 -- src/bin/e_comp_object.c | 22 ---------------------- src/bin/e_comp_wl.c | 6 ------ src/bin/e_comp_wl_shell.c | 1 - src/bin/e_policy_stack.c | 2 -- 6 files changed, 1 insertion(+), 49 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 6d89183..5754b67 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -227,11 +227,6 @@ cleanup: if (warp_client) { warp_x[0] = warp_x[1] = warp_y[0] = warp_y[1] = -1; - if (warp_client->modal) - { - warp_client = NULL; - return ECORE_CALLBACK_CANCEL; - } e_focus_event_mouse_in(warp_client); if (warp_client->iconic) { @@ -997,15 +992,7 @@ _e_client_revert_focus_get(E_Client *ec) if (!desk) return NULL; if (ec->zone->display_state == E_ZONE_DISPLAY_STATE_OFF) return NULL; - if ((ec->parent) && - (ec->parent->desk == desk) && (ec->parent->modal == ec)) - { - // set parent focus - focus_ec = ec->parent; - if (e_config->raise_on_revert_focus) - e_client_raise(ec->parent); - } - else if (e_config->focus_policy == E_FOCUS_MOUSE) + if (e_config->focus_policy == E_FOCUS_MOUSE) { // set mouse over focus pec = e_client_under_pointer_get(desk, ec); @@ -1332,8 +1319,6 @@ _e_client_del(E_Client *ec) if (ec->leader) { ec->leader->group = eina_list_remove(ec->leader->group, ec); - if (ec->leader->modal == ec) - ec->leader->modal = NULL; ec->leader = NULL; } EINA_LIST_FREE(ec->group, child) diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 0749ac1..626a7cf 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -376,8 +376,6 @@ struct E_Client Ecore_Poller *ping_poller; Ecore_Timer *kill_timer; - E_Client *modal; - E_Client *leader; Eina_List *group; diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 1288fb1..44c21d2 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -2700,28 +2700,6 @@ _e_comp_intercept_focus(void *data, Evas_Object *obj, Eina_Bool focus) if (focus) { - /* check for dialog children that steal focus */ - if ((ec->modal) && (ec->modal != ec) && - (ec->modal->visible) && (!e_object_is_del(E_OBJECT(ec->modal)))) - { - if (e_config->focus_policy_ext != E_FOCUS_EXT_TOP_STACK) - { - ELOGF("FOCUS", "focus set | intercept focus to modal", ec->modal); - e_client_frame_focus_set(ec->modal, focus); - } - return; - } - else if ((ec->leader) && (ec->leader->modal) && - (ec->leader->modal != ec) && ec->leader->modal->visible && - (!e_object_is_del(E_OBJECT(ec->leader->modal)))) - { - if (e_config->focus_policy_ext != E_FOCUS_EXT_TOP_STACK) - { - ELOGF("FOCUS", "focus set | intercept focus to leader->modal", ec->leader->modal); - e_client_frame_focus_set(ec->leader->modal, focus); - } - return; - } if (!cw->visible) { /* not yet visible, wait till the next time... */ diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index dc54f75..c25d782 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3842,12 +3842,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) if (ec->comp_data->sub.watcher) wl_resource_destroy(ec->comp_data->sub.watcher); - if ((ec->parent) && (ec->parent->modal == ec)) - { - ec->parent->lock_close = EINA_FALSE; - ec->parent->modal = NULL; - } - wl_signal_emit(&ec->comp_data->destroy_signal, &ec->comp_data->surface); _e_comp_wl_surface_state_finish(&ec->comp_data->pending); diff --git a/src/bin/e_comp_wl_shell.c b/src/bin/e_comp_wl_shell.c index 81c2b7c..85b4a06 100644 --- a/src/bin/e_comp_wl_shell.c +++ b/src/bin/e_comp_wl_shell.c @@ -370,7 +370,6 @@ e_shell_e_client_destroy(E_Client *ec) { ec->parent->transients = eina_list_remove(ec->parent->transients, ec); - if (ec->parent->modal == ec) ec->parent->modal = NULL; ec->parent = NULL; } diff --git a/src/bin/e_policy_stack.c b/src/bin/e_policy_stack.c index b0668b1..952d36d 100644 --- a/src/bin/e_policy_stack.c +++ b/src/bin/e_policy_stack.c @@ -330,7 +330,6 @@ _e_policy_stack_transient_for_set(E_Client *ec, E_Client *parent, Eina_Bool tran { ec->parent->transients = eina_list_remove(ec->parent->transients, ec); - if (ec->parent->modal == ec) ec->parent->modal = NULL; ec->parent = NULL; ec->icccm.fetch.transient_for = EINA_TRUE; @@ -358,7 +357,6 @@ _e_policy_stack_transient_for_set(E_Client *ec, E_Client *parent, Eina_Bool tran { ec->parent->transients = eina_list_remove(ec->parent->transients, ec); - if (ec->parent->modal == ec) ec->parent->modal = NULL; ec->parent = NULL; } -- 2.7.4