From da3cc9db3ee945aa32de774ef0b50e507728a895 Mon Sep 17 00:00:00 2001 From: James Magahern Date: Sun, 20 Jan 2019 00:53:03 -0800 Subject: Get default height/width from X11 --- src/x11_support.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/x11_support.c') diff --git a/src/x11_support.c b/src/x11_support.c index 8ab05c1..3683b5a 100644 --- a/src/x11_support.c +++ b/src/x11_support.c @@ -39,6 +39,12 @@ static Window get_window_from_environment_or_make_one(Display *display, int widt return window; } +void x11_get_display_bounds(int *width, int *height) +{ + *width = DisplayWidth(__display, DefaultScreen(__display)); + *height = DisplayHeight(__display, DefaultScreen(__display)); +} + cairo_surface_t* x11_helper_acquire_cairo_surface(int width, int height) { __display = XOpenDisplay(NULL); -- cgit v1.2.3-54-g00ecf