[mutter] cursor-rendere-native: Don't declare HW cursors broken on EACCES
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cursor-rendere-native: Don't declare HW cursors broken on EACCES
- Date: Fri, 6 Oct 2017 18:24:56 +0000 (UTC)
commit 3244ed37a9f7666c6d74ab9158f768a73e1068df
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Jul 24 11:44:57 2017 +0800
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
src/backends/native/meta-cursor-renderer-native.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/backends/native/meta-cursor-renderer-native.c
b/src/backends/native/meta-cursor-renderer-native.c
index 4ce7592..a12e706 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]