diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c index 3fc020024..1ab117eb9 100644 --- a/src/backends/native/meta-onscreen-native.c +++ b/src/backends/native/meta-onscreen-native.c @@ -1525,6 +1525,29 @@ meta_onscreen_native_prepare_frame (CoglOnscreen *onscreen, } } +static void +on_finish_frame_update_result (const MetaKmsFeedback *kms_feedback, + gpointer user_data) +{ + CoglOnscreen *onscreen = COGL_ONSCREEN (user_data); + const GError *error; + CoglFrameInfo *frame_info; + + error = meta_kms_feedback_get_error (kms_feedback); + if (!error) + return; + + if (!g_error_matches (error, + G_IO_ERROR, + G_IO_ERROR_PERMISSION_DENIED)) + g_warning ("Cursor update failed: %s", error->message); + + frame_info = cogl_onscreen_peek_head_frame_info (onscreen); + frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC; + + meta_onscreen_native_notify_frame_complete (onscreen); +} + void meta_onscreen_native_finish_frame (CoglOnscreen *onscreen, ClutterFrame *frame) @@ -1544,6 +1567,10 @@ meta_onscreen_native_finish_frame (CoglOnscreen *onscreen, return; } + meta_kms_update_add_result_listener (kms_update, + on_finish_frame_update_result, + onscreen_native); + meta_kms_update_add_page_flip_listener (kms_update, kms_crtc, &page_flip_listener_vtable,