diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am index 0a6b3ee87..c3a159e7a 100644 --- a/hw/xwayland/Makefile.am +++ b/hw/xwayland/Makefile.am @@ -14,6 +14,7 @@ Xwayland_SOURCES = \ xwayland-input.c \ xwayland-cursor.c \ xwayland-shm.c \ + xwayland-shm.h \ xwayland-types.h \ xwayland-output.c \ xwayland-cvt.c \ diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build index 4f9ff434a..61337b0e1 100644 --- a/hw/xwayland/meson.build +++ b/hw/xwayland/meson.build @@ -3,6 +3,7 @@ srcs = [ 'xwayland-input.c', 'xwayland-cursor.c', 'xwayland-shm.c', + 'xwayland-shm.h', 'xwayland-types.h', 'xwayland-output.c', 'xwayland-cvt.c', diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c index 6c73553bd..cba8e20cd 100644 --- a/hw/xwayland/xwayland-cursor.c +++ b/hw/xwayland/xwayland-cursor.c @@ -24,9 +24,19 @@ * SOFTWARE. */ -#include "xwayland.h" +#include -#include +#include "scrnintstr.h" +#include "servermd.h" +#include "cursorstr.h" +#include "inputstr.h" +#include "mipointer.h" + +#include "xwayland.h" +#include "xwayland-shm.h" +#include "xwayland-types.h" + +#include "tablet-unstable-v2-client-protocol.h" static DevPrivateKeyRec xwl_cursor_private_key; diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c index b76ab1a8f..586874b90 100644 --- a/hw/xwayland/xwayland-shm.c +++ b/hw/xwayland/xwayland-shm.c @@ -24,13 +24,7 @@ * SOFTWARE. */ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "os.h" - -#include "xwayland.h" +#include #include #include @@ -40,6 +34,13 @@ #include #include +#include "fb.h" +#include "os.h" +#include "pixmapstr.h" + +#include "xwayland.h" +#include "xwayland-shm.h" + struct xwl_pixmap { struct wl_buffer *buffer; void *data; diff --git a/hw/xwayland/xwayland-shm.h b/hw/xwayland/xwayland-shm.h new file mode 100644 index 000000000..3c94000b6 --- /dev/null +++ b/hw/xwayland/xwayland-shm.h @@ -0,0 +1,41 @@ +/* + * Copyright © 2014 Intel Corporation + * Copyright © 2012 Collabora, Ltd. + * + * 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_SHM_H +#define XWAYLAND_SHM_H + +#include + +#include "scrnintstr.h" +#include "pixmapstr.h" + +Bool xwl_shm_create_screen_resources(ScreenPtr screen); +PixmapPtr xwl_shm_create_pixmap(ScreenPtr screen, int width, int height, + int depth, unsigned int hint); +Bool xwl_shm_destroy_pixmap(PixmapPtr pixmap); +struct wl_buffer *xwl_shm_pixmap_get_wl_buffer(PixmapPtr pixmap); + +#endif /* XWAYLAND_SHM_H */ diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 20bc808fb..726be02de 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -23,9 +23,6 @@ * SOFTWARE. */ -#include "xwayland.h" -#include "xwayland-window-buffers.h" - #include #include @@ -39,6 +36,10 @@ #include #include +#include "xwayland.h" +#include "xwayland-shm.h" +#include "xwayland-window-buffers.h" + #ifdef XF86VIDMODE #include _X_EXPORT Bool noXFree86VidModeExtension; diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index 27359636e..f4cdc5be0 100644 --- a/hw/xwayland/xwayland.h +++ b/hw/xwayland/xwayland.h @@ -471,12 +471,6 @@ void xwl_pixmap_buffer_release_cb(void *data, struct wl_buffer *wl_buffer); struct xwl_window *xwl_window_from_window(WindowPtr window); -Bool xwl_shm_create_screen_resources(ScreenPtr screen); -PixmapPtr xwl_shm_create_pixmap(ScreenPtr screen, int width, int height, - int depth, unsigned int hint); -Bool xwl_shm_destroy_pixmap(PixmapPtr pixmap); -struct wl_buffer *xwl_shm_pixmap_get_wl_buffer(PixmapPtr pixmap); - #ifdef XWL_HAS_GLAMOR void xwl_glamor_init_backends(struct xwl_screen *xwl_screen, Bool use_eglstream);