[mutter/wip/carlosg/event-cleanup: 11/18] backends/x11: Drop platform-specific event data
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/event-cleanup: 11/18] backends/x11: Drop platform-specific event data
- Date: Tue, 8 Dec 2020 15:37:42 +0000 (UTC)
commit 09b956997c509582f5a855b8a2b319276ae3f11f
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Dec 8 11:58:34 2020 +0100
backends/x11: Drop platform-specific event data
This is largely unused, for long probably. We want to avoid adding
platform data to events, so that's convenient.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
src/backends/x11/meta-event-x11.c | 46 ---------------------------------------
src/backends/x11/meta-event-x11.h | 20 -----------------
src/backends/x11/meta-seat-x11.c | 26 ----------------------
3 files changed, 92 deletions(-)
---
diff --git a/src/backends/x11/meta-event-x11.c b/src/backends/x11/meta-event-x11.c
index 6aed4ed3f0..8217e3db7e 100644
--- a/src/backends/x11/meta-event-x11.c
+++ b/src/backends/x11/meta-event-x11.c
@@ -30,28 +30,6 @@
#include "clutter/clutter-mutter.h"
#include "clutter/x11/clutter-x11.h"
-MetaEventX11 *
-meta_event_x11_new (void)
-{
- return g_slice_new0 (MetaEventX11);
-}
-
-MetaEventX11 *
-meta_event_x11_copy (MetaEventX11 *event_x11)
-{
- if (event_x11 != NULL)
- return g_slice_dup (MetaEventX11, event_x11);
-
- return NULL;
-}
-
-void
-meta_event_x11_free (MetaEventX11 *event_x11)
-{
- if (event_x11 != NULL)
- g_slice_free (MetaEventX11, event_x11);
-}
-
/**
* meta_x11_handle_event:
* @xevent: pointer to XEvent structure
@@ -136,30 +114,6 @@ out:
return result;
}
-Time
-meta_x11_get_current_event_time (void)
-{
- ClutterBackend *backend = clutter_get_default_backend ();
-
- return CLUTTER_BACKEND_X11 (backend)->last_event_time;
-}
-
-gint
-meta_x11_event_get_key_group (const ClutterEvent *event)
-{
- MetaEventX11 *event_x11;
-
- g_return_val_if_fail (event != NULL, 0);
- g_return_val_if_fail (event->type == CLUTTER_KEY_PRESS ||
- event->type == CLUTTER_KEY_RELEASE, 0);
-
- event_x11 = _clutter_event_get_platform_data (event);
- if (event_x11 == NULL)
- return 0;
-
- return event_x11->key_group;
-}
-
guint
meta_x11_event_sequence_get_touch_detail (const ClutterEventSequence *sequence)
{
diff --git a/src/backends/x11/meta-event-x11.h b/src/backends/x11/meta-event-x11.h
index 2295ce63a9..6e0b54eee2 100644
--- a/src/backends/x11/meta-event-x11.h
+++ b/src/backends/x11/meta-event-x11.h
@@ -28,26 +28,6 @@
#include "clutter/x11/clutter-x11.h"
-typedef struct _MetaEventX11 MetaEventX11;
-
-struct _MetaEventX11
-{
- /* additional fields for Key events */
- gint key_group;
-
- guint key_is_modifier : 1;
- guint num_lock_set : 1;
- guint caps_lock_set : 1;
-};
-
-MetaEventX11 * meta_event_x11_new (void);
-MetaEventX11 * meta_event_x11_copy (MetaEventX11 *event_x11);
-void meta_event_x11_free (MetaEventX11 *event_x11);
-
-Time meta_x11_get_current_event_time (void);
-
-gint meta_x11_event_get_key_group (const ClutterEvent *event);
-
guint meta_x11_event_sequence_get_touch_detail (const ClutterEventSequence *sequence);
ClutterX11FilterReturn meta_x11_handle_event (XEvent *xevent);
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index a1d1cc5e10..940be5f2cf 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -1443,22 +1443,12 @@ meta_seat_x11_copy_event_data (ClutterSeat *seat,
const ClutterEvent *src,
ClutterEvent *dest)
{
- gpointer event_x11;
-
- event_x11 = _clutter_event_get_platform_data (src);
- if (event_x11 != NULL)
- _clutter_event_set_platform_data (dest, meta_event_x11_copy (event_x11));
}
static void
meta_seat_x11_free_event_data (ClutterSeat *seat,
ClutterEvent *event)
{
- gpointer event_x11;
-
- event_x11 = _clutter_event_get_platform_data (event);
- if (event_x11 != NULL)
- meta_event_x11_free (event_x11);
}
static ClutterVirtualInputDevice *
@@ -1803,7 +1793,6 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
{
XIDeviceEvent *xev = (XIDeviceEvent *) xi_event;
MetaKeymapX11 *keymap_x11 = seat->keymap;
- MetaEventX11 *event_x11;
char buffer[7] = { 0, };
gunichar n;
@@ -1830,21 +1819,6 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
&event->key.modifier_state,
NULL);
- /* KeyEvents have platform specific data associated to them */
- event_x11 = meta_event_x11_new ();
- _clutter_event_set_platform_data (event, event_x11);
-
- event_x11->key_group =
- meta_keymap_x11_get_key_group (keymap_x11,
- event->key.modifier_state);
- event_x11->key_is_modifier =
- meta_keymap_x11_get_is_modifier (keymap_x11,
- event->key.hardware_keycode);
- event_x11->num_lock_set =
- clutter_keymap_get_num_lock_state (CLUTTER_KEYMAP (keymap_x11));
- event_x11->caps_lock_set =
- clutter_keymap_get_caps_lock_state (CLUTTER_KEYMAP (keymap_x11));
-
clutter_event_set_source_device (event, source_device);
device = g_hash_table_lookup (seat->devices_by_id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]