ecore-wayland: Don't send a mouse_up on grab release unless we

actually have a grabbed button

Summary: If we don't have an actual grabbed mouse button, then don't
send a mouse up event. Caught this while adding e_grabinput support to
Enlightenment.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-01-23 16:00:03 -05:00
parent 40cb2cd3d4
commit c6e70107dc
1 changed files with 3 additions and 2 deletions

View File

@ -162,8 +162,9 @@ ecore_wl_input_ungrab(Ecore_Wl_Input *input)
if (!input) return;
_ecore_wl_input_mouse_up_send(input, input->grab,
0, input->grab_button, input->grab_timestamp);
if ((input->grab) && (input->grab_button))
_ecore_wl_input_mouse_up_send(input, input->grab, 0, input->grab_button,
input->grab_timestamp);
input->grab = NULL;
input->grab_button = 0;