[mutter] backend/native: Add getter for is-headless state



commit 739283d396e21e06656d2e088bcb95ef4c7bb08f
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Jan 19 11:50:52 2021 +0100

    backend/native: Add getter for is-headless state
    
    Will be used to determine how to run subsystems.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>

 src/backends/native/meta-backend-native.c | 6 ++++++
 src/backends/native/meta-backend-native.h | 2 ++
 2 files changed, 8 insertions(+)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index 45fb7b421d..8f916642e0 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -335,6 +335,12 @@ meta_backend_native_get_seat_id (MetaBackendNative *backend_native)
   return meta_launcher_get_seat_id (backend_native->launcher);
 }
 
+gboolean
+meta_backend_native_is_headless (MetaBackendNative *backend_native)
+{
+  return backend_native->is_headless;
+}
+
 static void
 meta_backend_native_set_pointer_constraint (MetaBackend           *backend,
                                             MetaPointerConstraint *constraint)
diff --git a/src/backends/native/meta-backend-native.h b/src/backends/native/meta-backend-native.h
index b0d82d0161..0c7df66db8 100644
--- a/src/backends/native/meta-backend-native.h
+++ b/src/backends/native/meta-backend-native.h
@@ -49,4 +49,6 @@ MetaKms * meta_backend_native_get_kms (MetaBackendNative *native);
 
 const char * meta_backend_native_get_seat_id (MetaBackendNative *backend_native);
 
+gboolean meta_backend_native_is_headless (MetaBackendNative *backend_native);
+
 #endif /* META_BACKEND_NATIVE_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]