summaryrefslogtreecommitdiff
path: root/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c')
-rw-r--r--ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
index b4d54d1..82900dc 100644
--- a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
+++ b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
@@ -25,13 +25,13 @@
#include <string.h>
#include <weston.h>
-#include <weston/ivi-layout-export.h>
+#include <ivi-layout-export.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include "plugin-registry.h"
+#include <libweston/plugin-registry.h>
#include "ilm_types.h"
#include "ivi-input-server-protocol.h"
@@ -758,12 +758,29 @@ input_ctrl_touch_set_west_focus(struct seat_ctx *ctx_seat,
}
}
+/** Check if the touch has focused resources.
+ *
+ * \param touch The touch to check for focused resources.
+ * \return Whether or not this touch has focused resources
+ */
+static bool
+ivi_weston_touch_has_focus_resource(struct weston_touch *touch)
+{
+ if (!touch->focus)
+ return false;
+
+ if (wl_list_empty(&touch->focus_resource_list))
+ return false;
+
+ return true;
+}
+
static void
input_ctrl_touch_west_send_cancel(struct weston_touch *touch)
{
struct wl_resource *resource;
- if (!weston_touch_has_focus_resource(touch))
+ if (!ivi_weston_touch_has_focus_resource(touch))
return;
wl_resource_for_each(resource, &touch->focus_resource_list)