feed mouse-up events for all buttons on internal wins when activating a binding

bindings enforce compositor grabs, which will result in stuck canvas buttons and
break internal windows which have already received button presses

fix T3347
This commit is contained in:
Mike Blumenkrantz 2016-03-24 13:57:23 -04:00
parent 586d1ac505
commit 39717a8a38
1 changed files with 13 additions and 0 deletions

View File

@ -2869,6 +2869,19 @@ e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Even
{
did_act = EINA_TRUE;
e_object_ref(E_OBJECT(ec->cur_mouse_action));
if (ec->internal)
{
int button_mask, i;
Evas *e;
e = evas_object_evas_get(ec->internal_elm_win);
button_mask = evas_pointer_button_down_mask_get(e);
for (i = 0; i < 32; i++)
{
if ((button_mask & (1 << i)))
evas_event_feed_mouse_up(e, i + 1, EVAS_BUTTON_NONE, 0, NULL);
}
}
}
}
if ((!did_act) || (((pfocus == e_client_focused_get()) || (ec == e_client_focused_get())) && (ec->layer >= player)))