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
This commit is contained in:
Jonas Ådahl 2020-07-27 11:43:30 +02:00
parent 2de69cd3cc
commit 4a125e73a2
2 changed files with 23 additions and 22 deletions

View File

@ -27,28 +27,6 @@
#include "backends/x11/cm/meta-cursor-sprite-xfixes.h" #include "backends/x11/cm/meta-cursor-sprite-xfixes.h"
#include "meta/meta-cursor-tracker.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, gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
XEvent *xevent); XEvent *xevent);

View File

@ -45,6 +45,29 @@
#include "meta/util.h" #include "meta/util.h"
#include "x11/meta-x11-display-private.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); G_DEFINE_TYPE (MetaCursorTracker, meta_cursor_tracker, G_TYPE_OBJECT);
enum enum