From 06a993ed36d6f54fb19c223359808263acf49119 Mon Sep 17 00:00:00 2001 From: Junseok Kim Date: Tue, 4 Oct 2022 19:14:57 +0900 Subject: [PATCH] e_client: restore the code for resizing mode There was a bug that the resizing didn't uses the mode that client requested. It caused by resize_mode did not applied to ec->resize_mode. For fix it, restore resize_mode code. And accoding to the policy, the Non-floating window can also resize with interactive resize. So, removed checking the floating window from legacy code. Change-Id: I750e4069701de0b144faf1a84cc3b56f5489dcf6 --- src/bin/e_client.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 31db297..8338eca 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -6849,26 +6849,33 @@ e_client_act_resize_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev, E_Poin snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button); _e_client_moveinfo_gather(ec, source); - /* Use canvas.x, canvas.y of event. - * Transformed coordinates has to be considered for accurate resize_mode - * rather than absolute coordinates. */ - if ((ev->canvas.x > (ec->x + ec->w / 5)) && - (ev->canvas.x < (ec->x + ec->w * 4 / 5))) + if (resize_mode != E_POINTER_RESIZE_NONE) { - if (ev->canvas.y < (ec->y + ec->h / 2)) ec->resize_mode = E_POINTER_RESIZE_T; - else ec->resize_mode = E_POINTER_RESIZE_B; - } - else if (ev->canvas.x < (ec->x + ec->w / 2)) - { - if ((ev->canvas.y > (ec->y + ec->h / 5)) && (ev->canvas.y < (ec->y + ec->h * 4 / 5))) ec->resize_mode = E_POINTER_RESIZE_L; - else if (ev->canvas.y < (ec->y + ec->h / 2)) ec->resize_mode = E_POINTER_RESIZE_TL; - else ec->resize_mode = E_POINTER_RESIZE_BL; + ec->resize_mode = resize_mode; } else { - if ((ev->canvas.y > (ec->y + ec->h / 5)) && (ev->canvas.y < (ec->y + ec->h * 4 / 5))) ec->resize_mode = E_POINTER_RESIZE_R; - else if (ev->canvas.y < (ec->y + ec->h / 2)) ec->resize_mode = E_POINTER_RESIZE_TR; - else ec->resize_mode = E_POINTER_RESIZE_BR; + /* Use canvas.x, canvas.y of event. + * Transformed coordinates has to be considered for accurate resize_mode + * rather than absolute coordinates. */ + if ((ev->canvas.x > (ec->x + ec->w / 5)) && + (ev->canvas.x < (ec->x + ec->w * 4 / 5))) + { + if (ev->canvas.y < (ec->y + ec->h / 2)) ec->resize_mode = E_POINTER_RESIZE_T; + else ec->resize_mode = E_POINTER_RESIZE_B; + } + else if (ev->canvas.x < (ec->x + ec->w / 2)) + { + if ((ev->canvas.y > (ec->y + ec->h / 5)) && (ev->canvas.y < (ec->y + ec->h * 4 / 5))) ec->resize_mode = E_POINTER_RESIZE_L; + else if (ev->canvas.y < (ec->y + ec->h / 2)) ec->resize_mode = E_POINTER_RESIZE_TL; + else ec->resize_mode = E_POINTER_RESIZE_BL; + } + else + { + if ((ev->canvas.y > (ec->y + ec->h / 5)) && (ev->canvas.y < (ec->y + ec->h * 4 / 5))) ec->resize_mode = E_POINTER_RESIZE_R; + else if (ev->canvas.y < (ec->y + ec->h / 2)) ec->resize_mode = E_POINTER_RESIZE_TR; + else ec->resize_mode = E_POINTER_RESIZE_BR; + } } } if (!e_client_resize_begin(ec)) -- 2.7.4