mutter/src/wayland/meta-wayland-tablet-manager.h
Michel Dänzer d928b6baa6 wayland: Clean up tablet manager state
Fixes memory leak:

==995170== 936 (40 direct, 896 indirect) bytes in 1 blocks are definitely lost in loss record 15,090 of 15,641
==995170==    at 0x48445EF: calloc (vg_replace_malloc.c:1328)
==995170==    by 0x4B211D0: g_malloc0 (gmem.c:155)
==995170==    by 0x4A56693: meta_wayland_tablet_manager_new (meta-wayland-tablet-manager.c:109)
==995170==    by 0x4A56693: meta_wayland_tablet_manager_init (meta-wayland-tablet-manager.c:126)
==995170==    by 0x4A3FA95: meta_wayland_compositor_new (meta-wayland.c:626)
==995170==    by 0x49C7FA7: meta_context_start (meta-context.c:412)
==995170==    by 0x10F065: main (mutter.c:148)

Fixes: 745cb67988 ("wayland: Initialize the MetaWaylandTabletManager")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2527>
2022-07-25 14:55:59 +00:00

54 lines
2.0 KiB
C

/*
* Wayland Support
*
* Copyright (C) 2015 Red Hat
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef META_WAYLAND_TABLET_MANAGER_H
#define META_WAYLAND_TABLET_MANAGER_H
#include <glib.h>
#include <wayland-server.h>
#include "wayland/meta-wayland-types.h"
struct _MetaWaylandTabletManager
{
MetaWaylandCompositor *compositor;
struct wl_display *wl_display;
struct wl_list resource_list;
GHashTable *seats;
};
void meta_wayland_tablet_manager_init (MetaWaylandCompositor *compositor);
void meta_wayland_tablet_manager_finalize (MetaWaylandCompositor *compositor);
gboolean meta_wayland_tablet_manager_consumes_event (MetaWaylandTabletManager *manager,
const ClutterEvent *event);
void meta_wayland_tablet_manager_update (MetaWaylandTabletManager *manager,
const ClutterEvent *event);
gboolean meta_wayland_tablet_manager_handle_event (MetaWaylandTabletManager *manager,
const ClutterEvent *event);
MetaWaylandTabletSeat *
meta_wayland_tablet_manager_ensure_seat (MetaWaylandTabletManager *manager,
MetaWaylandSeat *seat);
#endif /* META_WAYLAND_TABLET_MANAGER_H */