Commit 46d5d426 authored by Marco Trevisan's avatar Marco Trevisan 🎺

x11, gpu: Save min screen size and add a getter

parent 6686d9b7
......@@ -42,6 +42,8 @@ struct _MetaGpuXrandr
XRRScreenResources *resources;
int min_screen_width;
int min_screen_height;
int max_screen_width;
int max_screen_height;
......@@ -54,6 +56,15 @@ meta_gpu_xrandr_get_resources (MetaGpuXrandr *gpu_xrandr)
return gpu_xrandr->resources;
meta_gpu_xrandr_get_min_screen_size (MetaGpuXrandr *gpu_xrandr,
int *min_width,
int *min_height)
*min_width = gpu_xrandr->min_screen_width;
*min_height = gpu_xrandr->min_screen_height;
meta_gpu_xrandr_get_max_screen_size (MetaGpuXrandr *gpu_xrandr,
int *max_width,
......@@ -95,7 +106,6 @@ meta_gpu_xrandr_read_current (MetaGpu *gpu,
RROutput primary_output;
unsigned int i, j;
GList *l;
int min_width, min_height;
Screen *screen;
BOOL dpms_capable, dpms_enabled;
CARD16 dpms_state;
......@@ -139,8 +149,8 @@ meta_gpu_xrandr_read_current (MetaGpu *gpu,
XRRGetScreenSizeRange (xdisplay, DefaultRootWindow (xdisplay),
......@@ -33,6 +33,10 @@ G_DECLARE_FINAL_TYPE (MetaGpuXrandr, meta_gpu_xrandr, META, GPU_XRANDR, MetaGpu)
XRRScreenResources * meta_gpu_xrandr_get_resources (MetaGpuXrandr *gpu_xrandr);
void meta_gpu_xrandr_get_min_screen_size (MetaGpuXrandr *gpu_xrandr,
int *min_width,
int *min_height);
void meta_gpu_xrandr_get_max_screen_size (MetaGpuXrandr *gpu_xrandr,
int *max_width,
int *max_height);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment