diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-08-28 17:35:59 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-08-28 17:35:59 +0930 |
commit | 8e7eefd9840f3193890d1081c3e198437ad0554c (patch) | |
tree | 8813e4bf9b775b42dd29d8cefd7c6ce6b1f8bc56 | |
parent | d328a159716d74f6b8c52e9f3d8030a9240c984d (diff) |
Disable background image, color background white instead.
Beats me why this code suddenly stopped working, but I don't have the time to
fix it ATM.
-rw-r--r-- | src/Manager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Manager.cpp b/src/Manager.cpp index 8a44b72..5689e50 100644 --- a/src/Manager.cpp +++ b/src/Manager.cpp @@ -85,19 +85,25 @@ void Manager::initX11(char* display) x11->width, x11->height, x11->depth); cairo_surface_t* cr_sf = cairo_xlib_surface_create(x11->dpy, pxBackground, x11->vis, x11->width, x11->height); + cairo_t* cr = cairo_create(cr_sf); + /* + FIXME: For whatever reason this code stopped working. I don't have the time to + debug it, so for now it's just a white background. Tough luck. + TRACE("Create background from %s\n",Config::getInstance()->imgBackground); cairo_surface_t* cr_png_sf = cairo_image_surface_create_from_png( Config::getInstance()->imgBackground); - cairo_t* cr = cairo_create(cr_sf); int pngwidth, pngheight; pngwidth = cairo_image_surface_get_width(cr_png_sf); pngheight = cairo_image_surface_get_height(cr_png_sf); TRACE("Scaling image: %dx%d ---> %dx%d\n",x11->width,x11->height,pngwidth,pngheight); cairo_scale(cr, (double)x11->width/pngwidth, (double)x11->height/pngheight); cairo_set_source_surface(cr, cr_png_sf, 0, 0); + */ + cairo_set_source_rgb(cr, 1, 1, 1); cairo_paint(cr); cairo_surface_destroy(cr_sf); - cairo_surface_destroy(cr_png_sf); + //cairo_surface_destroy(cr_png_sf); cairo_destroy(cr); XCopyArea(x11->dpy, pxBackground, x11->root, root_gc, 0, 0, x11->width, |