mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
cursor-tracker: Split a simple method out
This commit is contained in:
parent
52cf9104d9
commit
ee812e3fe0
@ -163,6 +163,15 @@ make_x11_cursor_tracker (MetaScreen *screen)
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MetaCursorTracker *
|
||||||
|
meta_cursor_tracker_new (MetaScreen *screen)
|
||||||
|
{
|
||||||
|
if (meta_is_wayland_compositor ())
|
||||||
|
return make_wayland_cursor_tracker (screen);
|
||||||
|
else
|
||||||
|
return make_x11_cursor_tracker (screen);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_cursor_tracker_get_for_screen:
|
* meta_cursor_tracker_get_for_screen:
|
||||||
* @screen: the #MetaScreen
|
* @screen: the #MetaScreen
|
||||||
@ -179,11 +188,7 @@ meta_cursor_tracker_get_for_screen (MetaScreen *screen)
|
|||||||
if (screen->cursor_tracker)
|
if (screen->cursor_tracker)
|
||||||
return screen->cursor_tracker;
|
return screen->cursor_tracker;
|
||||||
|
|
||||||
if (meta_is_wayland_compositor ())
|
self = meta_cursor_tracker_new (screen);
|
||||||
self = make_wayland_cursor_tracker (screen);
|
|
||||||
else
|
|
||||||
self = make_x11_cursor_tracker (screen);
|
|
||||||
|
|
||||||
screen->cursor_tracker = self;
|
screen->cursor_tracker = self;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user