From 3bee2302bfb1a131e52f7afc35c3e65efd1a18fd Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 17 Jun 2008 21:23:38 +0200 Subject: [PATCH] widget: use PIXMAP atom directly Signed-off-by: Julien Danjou --- widget.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/widget.c b/widget.c index e44e0723..547e3007 100644 --- a/widget.c +++ b/widget.c @@ -24,6 +24,7 @@ #include #include +#include #include "widget.h" #include "statusbar.h" @@ -139,15 +140,12 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_ xcb_get_property_reply_t *prop_r; xcb_get_property_cookie_t prop_c; area_t rectangle = { 0, 0, 0, 0, NULL, NULL }; - xcb_atom_t rootpix_atom, pixmap_atom; - xutil_intern_atom_request_t rootpix_atom_req, pixmap_atom_req; + xcb_atom_t rootpix_atom; + xutil_intern_atom_request_t rootpix_atom_req; /* Send requests needed for transparency */ if(ctx->bg.alpha != 0xffff) - { - pixmap_atom_req = xutil_intern_atom(globalconf.connection, &globalconf.atoms, "PIXMAP"); rootpix_atom_req = xutil_intern_atom(globalconf.connection, &globalconf.atoms, "_XROOTPMAP_ID"); - } rectangle.width = ctx->width; rectangle.height = ctx->height; @@ -155,10 +153,9 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_ if(ctx->bg.alpha != 0xffff) { s = xutil_screen_get(globalconf.connection, ctx->phys_screen); - pixmap_atom = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, pixmap_atom_req); rootpix_atom = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, rootpix_atom_req); prop_c = xcb_get_property_unchecked(globalconf.connection, false, s->root, rootpix_atom, - pixmap_atom, 0, 1); + PIXMAP, 0, 1); if((prop_r = xcb_get_property_reply(globalconf.connection, prop_c, NULL))) { if((data = xcb_get_property_value(prop_r))