diff --git a/src/backends/native/meta-frame-native.c b/src/backends/native/meta-frame-native.c index c39af96ae..4afc830d0 100644 --- a/src/backends/native/meta-frame-native.c +++ b/src/backends/native/meta-frame-native.c @@ -30,6 +30,7 @@ struct _MetaFrameNative ClutterFrame base; MetaKmsUpdate *kms_update; + gboolean had_kms_update; }; static void @@ -59,6 +60,7 @@ meta_frame_native_set_kms_update (MetaFrameNative *frame_native, g_return_if_fail (!frame_native->kms_update); frame_native->kms_update = kms_update; + frame_native->had_kms_update = TRUE; } MetaKmsUpdate * @@ -73,6 +75,7 @@ meta_frame_native_ensure_kms_update (MetaFrameNative *frame_native, } frame_native->kms_update = meta_kms_update_new (kms_device); + frame_native->had_kms_update = TRUE; return frame_native->kms_update; } @@ -87,3 +90,9 @@ meta_frame_native_has_kms_update (MetaFrameNative *frame_native) { return !!frame_native->kms_update; } + +gboolean +meta_frame_native_had_kms_update (MetaFrameNative *frame_native) +{ + return frame_native->had_kms_update; +} diff --git a/src/backends/native/meta-frame-native.h b/src/backends/native/meta-frame-native.h index e7140929b..c0b864fe7 100644 --- a/src/backends/native/meta-frame-native.h +++ b/src/backends/native/meta-frame-native.h @@ -43,4 +43,7 @@ MetaKmsUpdate * meta_frame_native_steal_kms_update (MetaFrameNative *frame_nativ META_EXPORT_TEST gboolean meta_frame_native_has_kms_update (MetaFrameNative *frame_native); +META_EXPORT_TEST +gboolean meta_frame_native_had_kms_update (MetaFrameNative *frame_native); + #endif /* META_FRAME_NATIVE_H */