From: Doyoun Kang Date: Fri, 8 Apr 2022 01:15:41 +0000 (+0900) Subject: e_policy: modify code for handling floating window X-Git-Tag: submit/tizen/20220422.062345^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffa26ca32404b49891e37ca8d8a217ad30262429;p=platform%2Fupstream%2Fenlightenment.git e_policy: modify code for handling floating window There was a but that the floating window couldnot maximize/unmaximize, fullscreen/unfullscreen. We changed code to be able to set/unset maximize and fullscreen. Change-Id: I06b0e4dab944f21efa004434e32a0c7072e2a36f --- diff --git a/src/bin/e_policy.c b/src/bin/e_policy.c index 2da3db4c75..7941f6428a 100644 --- a/src/bin/e_policy.c +++ b/src/bin/e_policy.c @@ -427,81 +427,19 @@ _e_policy_client_dialog_policy_apply(E_Policy_Client *pc) static void _e_policy_client_floating_policy_apply(E_Policy_Client *pc) { - E_Client *ec; - if (!pc) return; if (pc->flt_policy_state) return; pc->flt_policy_state = EINA_TRUE; - ec = pc->ec; - -#undef _SET -# define _SET(a) pc->orig.a = pc->ec->a - _SET(fullscreen); - _SET(lock_client_stacking); - _SET(lock_user_shade); - _SET(lock_client_shade); - _SET(lock_user_maximize); - _SET(lock_client_maximize); - _SET(lock_user_fullscreen); - _SET(lock_client_fullscreen); -#undef _SET - - ec->skip_fullscreen = 1; - ec->lock_client_stacking = 1; - ec->lock_user_shade = 1; - ec->lock_client_shade = 1; - ec->lock_user_maximize = 1; - ec->lock_client_maximize = 1; - ec->lock_user_fullscreen = 1; - ec->lock_client_fullscreen = 1; } static void _e_policy_client_floating_policy_cancel(E_Policy_Client *pc) { - E_Client *ec; - Eina_Bool changed = EINA_FALSE; - if (!pc) return; if (!pc->flt_policy_state) return; pc->flt_policy_state = EINA_FALSE; - ec = pc->ec; - - if ((pc->orig.fullscreen != ec->fullscreen) && - (pc->orig.fullscreen)) - { - ec->need_fullscreen = 1; - changed = EINA_TRUE; - } - - if (pc->orig.maximized != ec->maximized) - { - if (pc->orig.maximized) - ec->changes.need_maximize = 1; - else - e_client_unmaximize(ec, ec->maximized); - - changed = EINA_TRUE; - } - - ec->skip_fullscreen = 0; - -#undef _SET -# define _SET(a) ec->a = pc->orig.a - _SET(fullscreen); - _SET(lock_client_stacking); - _SET(lock_user_shade); - _SET(lock_client_shade); - _SET(lock_user_maximize); - _SET(lock_client_maximize); - _SET(lock_user_fullscreen); - _SET(lock_client_fullscreen); -#undef _SET - - if (changed) - EC_CHANGED(pc->ec); } static void