check for possible parent window on x11 mouse button events

in the case of different window <-> event_window, window is a child window
of event_window, and thus checking event_window here is valid (and necessary)
This commit is contained in:
Mike Blumenkrantz 2015-06-29 15:28:41 -04:00
parent aa32ef87f9
commit 14c038d730
1 changed files with 4 additions and 0 deletions

View File

@ -2183,6 +2183,8 @@ _e_comp_x_mouse_up(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_But
//else
{
ec = _e_comp_x_client_find_by_window(ev->window);
if ((!ec) && (ev->window != ev->event_window))
ec = _e_comp_x_client_find_by_window(ev->event_window);
if (!ec)
{
if (e_client_comp_grabbed_get())
@ -2209,6 +2211,8 @@ _e_comp_x_mouse_down(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_B
//else
{
ec = _e_comp_x_client_find_by_window(ev->window);
if ((!ec) && (ev->window != ev->event_window))
ec = _e_comp_x_client_find_by_window(ev->event_window);
if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
}
if (_e_comp_x_client_data_get(ec)->deleted) return ECORE_CALLBACK_RENEW;