summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-12-08 12:55:48 +0100
committerMarge Bot <marge-bot@gnome.org>2020-12-08 15:37:38 +0000
commit4db5b95aacb933d5e0aca937b40d94afaeaa7e3a (patch)
tree735aae76cc298ac23508d871fea3b310444eda8a
parenteaa04ecee5eefb957987650fef1c6ab6c34b03b7 (diff)
downloadmutter-4db5b95aacb933d5e0aca937b40d94afaeaa7e3a.tar.gz
wayland: Drop HAVE_BACKEND_NATIVE checks in wl_touch implementation
This file doesn't really do anything much backend-dependent anymore, we can drop these checks. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
-rw-r--r--src/wayland/meta-wayland-touch.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c
index 147c3845e..002ff16f7 100644
--- a/src/wayland/meta-wayland-touch.c
+++ b/src/wayland/meta-wayland-touch.c
@@ -29,13 +29,6 @@
#include "compositor/meta-surface-actor-wayland.h"
#include "wayland/meta-wayland-private.h"
-#ifdef HAVE_NATIVE_BACKEND
-#include <libinput.h>
-#include "backends/native/meta-backend-native.h"
-#include "backends/native/meta-event-native.h"
-#include "backends/native/meta-seat-native.h"
-#endif
-
G_DEFINE_TYPE (MetaWaylandTouch, meta_wayland_touch,
META_TYPE_WAYLAND_INPUT_DEVICE)
@@ -61,7 +54,6 @@ struct _MetaWaylandTouchInfo
guint begin_delivered : 1;
};
-#ifdef HAVE_NATIVE_BACKEND
static void
move_resources (struct wl_list *destination, struct wl_list *source)
{
@@ -210,13 +202,11 @@ touch_get_relative_coordinates (MetaWaylandTouch *touch,
event_x, event_y,
x, y);
}
-#endif /* HAVE_NATIVE_BACKEND */
void
meta_wayland_touch_update (MetaWaylandTouch *touch,
const ClutterEvent *event)
{
-#ifdef HAVE_NATIVE_BACKEND
MetaWaylandTouchInfo *touch_info;
ClutterEventSequence *sequence;
@@ -264,14 +254,12 @@ meta_wayland_touch_update (MetaWaylandTouch *touch,
touch_get_relative_coordinates (touch, touch_info->touch_surface->surface,
event, &touch_info->x, &touch_info->y);
touch_info->updated = TRUE;
-#endif /* HAVE_NATIVE_BACKEND */
}
static void
handle_touch_begin (MetaWaylandTouch *touch,
const ClutterEvent *event)
{
-#ifdef HAVE_NATIVE_BACKEND
MetaWaylandTouchInfo *touch_info;
ClutterEventSequence *sequence;
struct wl_resource *resource;
@@ -295,14 +283,12 @@ handle_touch_begin (MetaWaylandTouch *touch,
}
touch_info->begin_delivered = TRUE;
-#endif /* HAVE_NATIVE_BACKEND */
}
static void
handle_touch_update (MetaWaylandTouch *touch,
const ClutterEvent *event)
{
-#ifdef HAVE_NATIVE_BACKEND
MetaWaylandTouchInfo *touch_info;
ClutterEventSequence *sequence;
struct wl_resource *resource;
@@ -323,14 +309,12 @@ handle_touch_update (MetaWaylandTouch *touch,
wl_fixed_from_double (touch_info->x),
wl_fixed_from_double (touch_info->y));
}
-#endif /* HAVE_NATIVE_BACKEND */
}
static void
handle_touch_end (MetaWaylandTouch *touch,
const ClutterEvent *event)
{
-#ifdef HAVE_NATIVE_BACKEND
MetaWaylandTouchInfo *touch_info;
ClutterEventSequence *sequence;
struct wl_resource *resource;
@@ -351,7 +335,6 @@ handle_touch_end (MetaWaylandTouch *touch,
}
g_hash_table_remove (touch->touches, sequence);
-#endif /* HAVE_NATIVE_BACKEND */
}
static GList *
@@ -478,14 +461,12 @@ static const struct wl_touch_interface touch_interface = {
touch_release,
};
-#ifdef HAVE_NATIVE_BACKEND
static void
touch_info_free (MetaWaylandTouchInfo *touch_info)
{
touch_surface_decrement_touch (touch_info->touch_surface);
g_free (touch_info);
}
-#endif /* HAVE_NATIVE_BACKEND */
void
meta_wayland_touch_cancel (MetaWaylandTouch *touch)
@@ -517,12 +498,10 @@ meta_wayland_touch_cancel (MetaWaylandTouch *touch)
void
meta_wayland_touch_enable (MetaWaylandTouch *touch)
{
-#ifdef HAVE_NATIVE_BACKEND
touch->touch_surfaces = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) touch_surface_free);
touch->touches = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) touch_info_free);
-#endif /* HAVE_NATIVE_BACKEND */
wl_list_init (&touch->resource_list);
}