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>
This commit is contained in:
parent
eaa04ecee5
commit
4db5b95aac
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user