Check for valid pointer focus resource.

Use wl_resource_get_user_data to get the focused surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-02 13:55:26 +01:00
parent 736a4ebf57
commit 74a7a4ef91
1 changed files with 4 additions and 1 deletions

View File

@ -2172,7 +2172,10 @@ _e_comp_wl_pointer_configure(E_Wayland_Surface *ews, Evas_Coord x, Evas_Coord y,
pixman_region32_init(&ews->pending.input);
/* do we have a focused surface ? */
if ((focus = (E_Wayland_Surface *)input->wl.seat.pointer->focus))
if (!input->wl.seat.pointer->focus) return;
if ((focus = wl_resource_get_user_data(input->wl.seat.pointer->focus)))
// if ((focus = (E_Wayland_Surface *)input->wl.seat.pointer->focus))
{
/* NB: Ideally, I wanted to use the e_pointer methods here so that
* the cursor would match the E theme, however Wayland currently