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, priv->cursor_width, priv->cursor_height,
hot_x, hot_y) < 0) hot_x, hot_y) < 0)
{ {
g_warning ("drmModeSetCursor2 failed with (%s), " if (errno != EACCES)
"drawing cursor with OpenGL from now on", {
strerror (errno)); g_warning ("drmModeSetCursor2 failed with (%s), "
priv->has_hw_cursor = FALSE; "drawing cursor with OpenGL from now on",
priv->hw_cursor_broken = TRUE; strerror (errno));
priv->has_hw_cursor = FALSE;
priv->hw_cursor_broken = TRUE;
}
} }
if (cursor_priv->pending_bo_state == META_CURSOR_GBM_BO_STATE_SET) if (cursor_priv->pending_bo_state == META_CURSOR_GBM_BO_STATE_SET)