diff options
author | James Magahern <james@magahern.com> | 2019-01-20 00:53:03 -0800 |
---|---|---|
committer | James Magahern <james@magahern.com> | 2019-01-20 00:53:03 -0800 |
commit | da3cc9db3ee945aa32de774ef0b50e507728a895 (patch) | |
tree | 4eaeaf54e789ad7c1ca26ece990d38db49c2b4f6 /src/x11_support.c | |
parent | Changes to get it to work with xsecurelock (diff) |
Get default height/width from X11
Diffstat (limited to 'src/x11_support.c')
-rw-r--r-- | src/x11_support.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |