cursor-rendere-native: Don't declare HW cursors broken on EACCES

Don't permanently fall back to OpenGL based cursor rendering when
setting the HW cursor fails with EACCES as that may happen on VT
switching and other things temporarily revoking fd access.

https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
Jonas Ådahl 2017-07-24 11:44:57 +08:00
parent 406359bba1
commit 3244ed37a9

View File

@ -201,11 +201,14 @@ set_crtc_cursor (MetaCursorRendererNative *native,
priv->cursor_width, priv->cursor_height,
hot_x, hot_y) < 0)
{
g_warning ("drmModeSetCursor2 failed with (%s), "
"drawing cursor with OpenGL from now on",
strerror (errno));
priv->has_hw_cursor = FALSE;
priv->hw_cursor_broken = TRUE;
if (errno != EACCES)
{
g_warning ("drmModeSetCursor2 failed with (%s), "
"drawing cursor with OpenGL from now on",
strerror (errno));
priv->has_hw_cursor = FALSE;
priv->hw_cursor_broken = TRUE;
}
}
if (cursor_priv->pending_bo_state == META_CURSOR_GBM_BO_STATE_SET)