From 4a125e73a23777e13bc9b1edf7f2f37dc01a62a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 27 Jul 2020 11:43:30 +0200 Subject: [PATCH] cursor-tracker: Move struct definition into .c file Not used externally, and if so should use API. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391 --- src/backends/meta-cursor-tracker-private.h | 22 --------------------- src/backends/meta-cursor-tracker.c | 23 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/backends/meta-cursor-tracker-private.h b/src/backends/meta-cursor-tracker-private.h index 29ee94044..dfc8f51b7 100644 --- a/src/backends/meta-cursor-tracker-private.h +++ b/src/backends/meta-cursor-tracker-private.h @@ -27,28 +27,6 @@ #include "backends/x11/cm/meta-cursor-sprite-xfixes.h" #include "meta/meta-cursor-tracker.h" -struct _MetaCursorTracker { - GObject parent_instance; - - gboolean is_showing; - - MetaCursorSprite *effective_cursor; /* May be NULL when hidden */ - MetaCursorSprite *displayed_cursor; - - /* Wayland clients can set a NULL buffer as their cursor - * explicitly, which means that we shouldn't display anything. - * So, we can't simply store a NULL in window_cursor to - * determine an unset window cursor; we need an extra boolean. - */ - gboolean has_window_cursor; - MetaCursorSprite *window_cursor; - - MetaCursorSprite *root_cursor; - - /* The cursor from the X11 server. */ - MetaCursorSpriteXfixes *xfixes_cursor; -}; - gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker, XEvent *xevent); diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c index c2dff032e..cf1b6c834 100644 --- a/src/backends/meta-cursor-tracker.c +++ b/src/backends/meta-cursor-tracker.c @@ -45,6 +45,29 @@ #include "meta/util.h" #include "x11/meta-x11-display-private.h" +struct _MetaCursorTracker +{ + GObject parent; + + gboolean is_showing; + + MetaCursorSprite *effective_cursor; /* May be NULL when hidden */ + MetaCursorSprite *displayed_cursor; + + /* Wayland clients can set a NULL buffer as their cursor + * explicitly, which means that we shouldn't display anything. + * So, we can't simply store a NULL in window_cursor to + * determine an unset window cursor; we need an extra boolean. + */ + gboolean has_window_cursor; + MetaCursorSprite *window_cursor; + + MetaCursorSprite *root_cursor; + + /* The cursor from the X11 server. */ + MetaCursorSpriteXfixes *xfixes_cursor; +}; + G_DEFINE_TYPE (MetaCursorTracker, meta_cursor_tracker, G_TYPE_OBJECT); enum