summaryrefslogtreecommitdiff
path: root/src/vwm.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2024-07-15 00:35:15 -0700
committerVito Caputo <vcaputo@pengaru.com>2024-08-13 23:36:43 -0700
commit9b05c41168842035ddcd377ed5e23bb862fb4a60 (patch)
tree60c480f891ed2a256c7c91083e7385f6e8666a86 /src/vwm.c
parent94a7020ad8c9efd9c5818eb3422ff4cb66a1b278 (diff)
charts: first stab at factoring out Xlib from charts/vmon
Diffstat (limited to 'src/vwm.c')
-rw-r--r--src/vwm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vwm.c b/src/vwm.c
index f52df39..c6d1405 100644
--- a/src/vwm.c
+++ b/src/vwm.c
@@ -82,11 +82,16 @@ static vwm_t * vwm_startup(void)
goto _err_free;
}
- if (!(vwm->charts = vwm_charts_create(vwm->xserver))) {
- VWM_ERROR("Failed to create charts");
+ if (!(vwm->vcr_backend = vcr_backend_new(VCR_BACKEND_TYPE_XLIB, vwm->xserver))) {
+ VWM_ERROR("Failed to create vcr backend");
goto _err_xclose;
}
+ if (!(vwm->charts = vwm_charts_create(vwm->vcr_backend))) {
+ VWM_ERROR("Failed to create charts");
+ goto _err_vbe;
+ }
+
/* query the needed X extensions */
if (!XQueryExtension(VWM_XDISPLAY(vwm), COMPOSITE_NAME, &composite_opcode, &composite_event, &composite_error)) {
VWM_ERROR("No composite extension available");
@@ -173,6 +178,9 @@ static vwm_t * vwm_startup(void)
_err_charts:
vwm_charts_destroy(vwm->charts);
+_err_vbe:
+ vcr_backend_free(vwm->vcr_backend);
+
_err_xclose:
vwm_xserver_close(vwm->xserver);
© All Rights Reserved