backend: Only center pointer when not headless

When we are headless, there is no logical monitor to try to center the
pointer on, so just skip it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2017-01-12 13:49:36 +08:00
parent 3f994646f2
commit 20cd885443

View File

@ -147,7 +147,8 @@ meta_backend_monitors_changed (MetaBackend *backend)
{
/* If we're outside all monitors, warp the pointer back inside */
if (!meta_monitor_manager_get_logical_monitor_at (monitor_manager,
point.x, point.y))
point.x, point.y) &&
!meta_monitor_manager_is_headless (monitor_manager))
center_pointer (backend);
}
}