aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-05 14:59:07 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-05 14:59:07 -0400
commita4b7c2d96c12be570c1ce0e3af5ee2a9f3bf2d7e (patch)
treef4dc4b4459fb7a1f5043bd99d0ab6b3a521b5e08
parentd63232774dae78b0ee270a47671be9fd70d99969 (diff)
downloadrunes-a4b7c2d96c12be570c1ce0e3af5ee2a9f3bf2d7e.tar.gz
runes-a4b7c2d96c12be570c1ce0e3af5ee2a9f3bf2d7e.zip
make the canvas as big as the window
-rw-r--r--xlib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlib.c b/xlib.c
index 4d8d039..1aa7717 100644
--- a/xlib.c
+++ b/xlib.c
@@ -54,9 +54,11 @@ RunesWindow *runes_window_create()
cairo_surface_t *runes_surface_create(RunesWindow *w)
{
Visual *vis;
+ XWindowAttributes attrs;
+ XGetWindowAttributes(w->dpy, w->w, &attrs);
vis = DefaultVisual(w->dpy, DefaultScreen(w->dpy));
- return cairo_xlib_surface_create(w->dpy, w->w, vis, 240, 80);
+ return cairo_xlib_surface_create(w->dpy, w->w, vis, attrs.width, attrs.height);
}
void runes_window_prepare_input(RunesWindow *w)