[clutter/issue-17] wayland: Protect against enter events for empty surfaces
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/issue-17] wayland: Protect against enter events for empty surfaces
- Date: Fri, 20 Mar 2020 16:09:53 +0000 (UTC)
commit cd4c50db38ea9421deb83f25935a27531aa756a9
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Mar 20 16:08:21 2020 +0000
wayland: Protect against enter events for empty surfaces
The `leave` handler checks for NULL surfaces, but the `enter` handler
does not.
Fixes: #17
clutter/wayland/clutter-input-device-wayland.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/clutter/wayland/clutter-input-device-wayland.c b/clutter/wayland/clutter-input-device-wayland.c
index 7bfb615b7..3dab22070 100644
--- a/clutter/wayland/clutter-input-device-wayland.c
+++ b/clutter/wayland/clutter-input-device-wayland.c
@@ -472,7 +472,10 @@ clutter_wayland_handle_keyboard_enter (void *data,
struct wl_array *keys)
{
ClutterInputDeviceWayland *device = data;
- ClutterStageCogl *stage_cogl;
+ ClutterStageCogl *stage_cogl;
+
+ if (surface == NULL)
+ return;
if (!CLUTTER_IS_STAGE_COGL (wl_surface_get_user_data (surface)))
return;
@@ -495,8 +498,9 @@ clutter_wayland_handle_keyboard_leave (void *data,
ClutterInputDeviceWayland *device = data;
ClutterStageCogl *stage_cogl;
- if (!surface)
+ if (surface == NULL)
return;
+
if (!CLUTTER_IS_STAGE_COGL (wl_surface_get_user_data (surface)))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]