mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
wayland: Fix build when building without Wayland
This commit is contained in:
parent
aa6d887214
commit
c9fbb51775
@ -25,6 +25,7 @@
|
|||||||
#define META_CURSOR_TRACKER_PRIVATE_H
|
#define META_CURSOR_TRACKER_PRIVATE_H
|
||||||
|
|
||||||
#include <meta/meta-cursor-tracker.h>
|
#include <meta/meta-cursor-tracker.h>
|
||||||
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
|
gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
|
||||||
XEvent *xevent);
|
XEvent *xevent);
|
||||||
|
@ -39,7 +39,10 @@
|
|||||||
|
|
||||||
#include "meta-cursor-tracker-private.h"
|
#include "meta-cursor-tracker-private.h"
|
||||||
#include "screen-private.h"
|
#include "screen-private.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_WAYLAND
|
||||||
#include "meta-wayland-private.h"
|
#include "meta-wayland-private.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_X 7
|
#define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_X 7
|
||||||
#define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_Y 4
|
#define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_Y 4
|
||||||
@ -123,6 +126,7 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
|
|||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_WAYLAND
|
||||||
static MetaCursorTracker *
|
static MetaCursorTracker *
|
||||||
make_wayland_cursor_tracker (MetaScreen *screen)
|
make_wayland_cursor_tracker (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
@ -139,6 +143,7 @@ make_wayland_cursor_tracker (MetaScreen *screen)
|
|||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static MetaCursorTracker *
|
static MetaCursorTracker *
|
||||||
make_x11_cursor_tracker (MetaScreen *screen)
|
make_x11_cursor_tracker (MetaScreen *screen)
|
||||||
@ -169,9 +174,11 @@ meta_cursor_tracker_get_for_screen (MetaScreen *screen)
|
|||||||
if (screen->cursor_tracker)
|
if (screen->cursor_tracker)
|
||||||
return screen->cursor_tracker;
|
return screen->cursor_tracker;
|
||||||
|
|
||||||
|
#ifdef HAVE_WAYLAND
|
||||||
if (meta_is_wayland_compositor ())
|
if (meta_is_wayland_compositor ())
|
||||||
self = make_wayland_cursor_tracker (screen);
|
self = make_wayland_cursor_tracker (screen);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
self = make_x11_cursor_tracker (screen);
|
self = make_x11_cursor_tracker (screen);
|
||||||
|
|
||||||
screen->cursor_tracker = self;
|
screen->cursor_tracker = self;
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <meta/types.h>
|
#include <meta/types.h>
|
||||||
#include <meta/workspace.h>
|
#include <meta/workspace.h>
|
||||||
|
#include <cogl/cogl.h>
|
||||||
|
|
||||||
#define META_TYPE_CURSOR_TRACKER (meta_cursor_tracker_get_type ())
|
#define META_TYPE_CURSOR_TRACKER (meta_cursor_tracker_get_type ())
|
||||||
#define META_CURSOR_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CURSOR_TRACKER, MetaCursorTracker))
|
#define META_CURSOR_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CURSOR_TRACKER, MetaCursorTracker))
|
||||||
|
Loading…
Reference in New Issue
Block a user