Ecore (Wayland): Patch from Robert Bradford to check for valid

surfaces for events received from Wayland where the surface has
already been destroyed.



SVN revision: 74847
This commit is contained in:
Christopher Michael 2012-08-03 13:27:05 +00:00
parent 6c079bcba6
commit ac4eb64015
3 changed files with 17 additions and 0 deletions

View File

@ -841,3 +841,10 @@
Wayland backend. Removing the need to have our own function to do this
and increasing the range of supported keysms. Fixes #1105.
2012-08-03 Rob Bradford
* In the Wayland backend handle the case that events can be received
for surfaces that have been since destroyed - the client side
marshaller changes the pointer to NULL to when the object is destroyed
on the client side. Fixes #1258.

View File

@ -631,6 +631,7 @@ _ecore_wl_input_cb_pointer_leave(void *data, struct wl_pointer *pointer __UNUSED
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
if (!(input = data)) return;
input->display->serial = serial;
@ -660,6 +661,7 @@ _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_keyboard *keyboard __UNU
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
if (!(input = data)) return;
if (!input->timestamp)
@ -688,6 +690,7 @@ _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard __UNU
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
if (!(input = data)) return;
if (!input->timestamp)
@ -716,6 +719,7 @@ _ecore_wl_input_cb_touch_down(void *data, struct wl_touch *touch __UNUSED__, uns
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
if (!(input = data)) return;
/* FIXME: NB: Not sure yet if input->timestamp should be set here.
@ -788,6 +792,8 @@ _ecore_wl_input_cb_data_enter(void *data, struct wl_data_device *data_device, un
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
_ecore_wl_dnd_enter(data, data_device, timestamp, surface, x, y, offer);
}

View File

@ -583,6 +583,7 @@ ecore_wl_window_parent_set(Ecore_Wl_Window *win, Ecore_Wl_Window *parent)
static void
_ecore_wl_window_cb_ping(void *data __UNUSED__, struct wl_shell_surface *shell_surface, unsigned int serial)
{
if (!shell_surface) return;
wl_shell_surface_pong(shell_surface, serial);
}
@ -616,6 +617,7 @@ _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surfac
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!shell_surface) return;
if (!(win = data)) return;
ecore_wl_input_ungrab(win->pointer_device);
}
@ -627,6 +629,7 @@ _ecore_wl_window_cb_surface_enter(void *data, struct wl_surface *surface, struct
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
if (!(win = data)) return;
}
@ -637,6 +640,7 @@ _ecore_wl_window_cb_surface_leave(void *data, struct wl_surface *surface, struct
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!surface) return;
if (!(win = data)) return;
}