From c47a7e9b8f71b2e1bd60cc4a288d56c6fbeb847a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 7 Feb 2014 14:29:07 -0500 Subject: [PATCH] improve _e_client_move_begin(): * set ec->moving before MOVE_BEGIN hook * remove comp grab on failure * only raise if move succeeds --- src/bin/e_client.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index f43dce49f..98ba0eefd 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -681,11 +681,6 @@ _e_client_key_down_modifier_apply(int modifier, int value) static int _e_client_move_begin(E_Client *ec) { - if (!ec->lock_user_stacking) - { - if (e_config->border_raise_on_mouse_action) - evas_object_raise(ec->frame); - } if ((ec->fullscreen) || (ec->lock_user_location)) return 0; @@ -697,9 +692,19 @@ _e_client_move_begin(E_Client *ec) } */ if (!_e_client_action_input_win_new(ec)) return 0; - ecmove = ec; + ec->moving = 1; _e_client_hook_call(E_CLIENT_HOOK_MOVE_BEGIN, ec); - + if (!ec->moving) + { + _e_client_action_input_win_del(ec->comp); + return 0; + } + ecmove = ec; + if (!ec->lock_user_stacking) + { + if (e_config->border_raise_on_mouse_action) + evas_object_raise(ec->frame); + } return 1; } @@ -3801,7 +3806,6 @@ e_client_act_move_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev) _e_client_action_init(ec); e_zone_edge_disable(); - ec->moving = 1; e_pointer_mode_push(ec, E_POINTER_MOVE); if (ev) { @@ -4155,7 +4159,6 @@ e_client_signal_move_begin(E_Client *ec, const char *sig, const char *src EINA_U if (e_client_util_resizing_get(ec) || (ec->moving)) return; if (!_e_client_move_begin(ec)) return; - ec->moving = 1; e_pointer_mode_push(ec, E_POINTER_MOVE); e_zone_edge_disable(); _e_client_moveinfo_gather(ec, sig);