From 211609a9387a5fb0df83ef6ddea59ef817ea2f59 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 18 Dec 2019 10:45:17 +0100 Subject: [PATCH] xwayland: Move Xwayland cursor declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the Xwayland cursor declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/Makefile.am | 1 + hw/xwayland/meson.build | 1 + hw/xwayland/xwayland-cursor.c | 1 + hw/xwayland/xwayland-cursor.h | 38 +++++++++++++++++++++++++++++++++++ hw/xwayland/xwayland-input.c | 1 + hw/xwayland/xwayland-input.h | 3 --- hw/xwayland/xwayland.c | 1 + hw/xwayland/xwayland.h | 2 -- 8 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 hw/xwayland/xwayland-cursor.h diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am index 9e77e6f81..681c61d13 100644 --- a/hw/xwayland/Makefile.am +++ b/hw/xwayland/Makefile.am @@ -14,6 +14,7 @@ Xwayland_SOURCES = \ xwayland-input.c \ xwayland-input.h \ xwayland-cursor.c \ + xwayland-cursor.h \ xwayland-glamor.h \ xwayland-pixmap.c \ xwayland-pixmap.h \ diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build index 93672024e..d4a4336fe 100644 --- a/hw/xwayland/meson.build +++ b/hw/xwayland/meson.build @@ -3,6 +3,7 @@ srcs = [ 'xwayland-input.c', 'xwayland-input.h', 'xwayland-cursor.c', + 'xwayland-cursor.h', 'xwayland-glamor.h', 'xwayland-pixmap.c', 'xwayland-pixmap.h', diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c index 91b863e22..9c4c86aa2 100644 --- a/hw/xwayland/xwayland-cursor.c +++ b/hw/xwayland/xwayland-cursor.c @@ -33,6 +33,7 @@ #include "mipointer.h" #include "xwayland.h" +#include "xwayland-cursor.h" #include "xwayland-input.h" #include "xwayland-shm.h" #include "xwayland-types.h" diff --git a/hw/xwayland/xwayland-cursor.h b/hw/xwayland/xwayland-cursor.h new file mode 100644 index 000000000..401e814a7 --- /dev/null +++ b/hw/xwayland/xwayland-cursor.h @@ -0,0 +1,38 @@ +/* + * Copyright © 2014 Intel Corporation + * Copyright © 2011 Kristian Høgsberg + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifndef XWAYLAND_CURSOR_H +#define XWAYLAND_CURSOR_H + +#include +#include +#include + +void xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *tool); +void xwl_seat_set_cursor(struct xwl_seat *xwl_seat); +Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen); + +#endif /* XWAYLAND_CURSOR_H */ diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 2561e7d9b..7f2d4d6a1 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -40,6 +40,7 @@ #include #include "xwayland.h" +#include "xwayland-cursor.h" #include "xwayland-input.h" #include "xwayland-window.h" diff --git a/hw/xwayland/xwayland-input.h b/hw/xwayland/xwayland-input.h index cf2794430..e7e21fcfd 100644 --- a/hw/xwayland/xwayland-input.h +++ b/hw/xwayland/xwayland-input.h @@ -173,9 +173,6 @@ struct xwl_tablet_pad { struct xorg_list pad_group_list; }; -void xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *tool); -void xwl_seat_set_cursor(struct xwl_seat *xwl_seat); - void xwl_seat_destroy(struct xwl_seat *xwl_seat); void xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window); diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index a613ced6e..a9d04ddee 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -37,6 +37,7 @@ #include #include "xwayland.h" +#include "xwayland-cursor.h" #include "xwayland-glamor.h" #include "xwayland-input.h" #include "xwayland-output.h" diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index 46f67e61e..b22b21a19 100644 --- a/hw/xwayland/xwayland.h +++ b/hw/xwayland/xwayland.h @@ -139,8 +139,6 @@ void xwl_surface_damage(struct xwl_screen *xwl_screen, struct wl_surface *surface, int32_t x, int32_t y, int32_t width, int32_t height); -Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen); - struct xwl_screen *xwl_screen_get(ScreenPtr screen); Bool xwl_screen_has_resolution_change_emulation(struct xwl_screen *xwl_screen); struct xwl_output *xwl_screen_get_first_output(struct xwl_screen *xwl_screen);