diff --git a/src/backends/native/meta-kms-mode.c b/src/backends/native/meta-kms-mode.c index a52451620..88da86a85 100644 --- a/src/backends/native/meta-kms-mode.c +++ b/src/backends/native/meta-kms-mode.c @@ -30,6 +30,18 @@ struct _MetaKmsMode drmModeModeInfo drm_mode; }; +int +meta_kms_mode_get_width (MetaKmsMode *mode) +{ + return mode->drm_mode.hdisplay; +} + +int +meta_kms_mode_get_height (MetaKmsMode *mode) +{ + return mode->drm_mode.vdisplay; +} + uint32_t meta_kms_mode_create_blob_id (MetaKmsMode *mode, GError **error) diff --git a/src/backends/native/meta-kms-mode.h b/src/backends/native/meta-kms-mode.h index e017dc9f2..a3499cd99 100644 --- a/src/backends/native/meta-kms-mode.h +++ b/src/backends/native/meta-kms-mode.h @@ -34,6 +34,10 @@ typedef enum _MetaKmsModeFlag META_KMS_MODE_FLAG_FALLBACK_PORTRAIT = 1 << 1, } MetaKmsModeFlag; +int meta_kms_mode_get_width (MetaKmsMode *mode); + +int meta_kms_mode_get_height (MetaKmsMode *mode); + const char * meta_kms_mode_get_name (MetaKmsMode *mode); MetaKmsModeFlag meta_kms_mode_get_flags (MetaKmsMode *mode);