diff options
author | 2023-05-17 17:27:50 +0200 | |
---|---|---|
committer | 2023-05-17 17:27:50 +0200 | |
commit | cdc629aea95731433267a5be81a7e40e8d24b2d0 (patch) | |
tree | 61e265056f04e51309a26061ec7782565e545c95 /src/window.c | |
parent | 17cdced87bf3c337574215ce7625c462f15798a0 (diff) | |
download | cherry-cdc629aea95731433267a5be81a7e40e8d24b2d0.tar.gz cherry-cdc629aea95731433267a5be81a7e40e8d24b2d0.zip |
Add graphics support
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index c6eb5fd..3afd4b0 100644 --- a/src/window.c +++ b/src/window.c @@ -7,6 +7,7 @@ #include <X11/Xutil.h> #include "application.h" #include "window.h" +#include "color.h" CherryWindow * cherry_window_new(void) @@ -53,6 +54,11 @@ cherry_window_new(void) clist_add(&(app->windows), w, sizeof(*w)); + w->gc = XCreateGC(app->display, w->window_handler, 0, 0); + XSetBackground(app->display, w->gc, WhitePixel(app->display, app->screen)); + XSetForeground(app->display, w->gc, BlackPixel(app->display, app->screen)); + + return w; } |