[
Thread Prev][
Thread Next] >
Date Index
>
Thread Index
[wmx] Improvements in background pixmap handling
Joe McMahon -
Fri Oct 29 19:54:27 1999
I got wmx to build on my Yellowdog PPC Linux day before yesterday. Much
better than all those other wm's. I have a small patch for the handling of
the background pixmaps.
Normally, you get just a "couldn't load pixmap" error if the pixmap can't
be loaded. I've made a small change to Border.C that turns on xpm's
color approximation routines, allowing you to load whatever pixmap you
want, and which adds a bit more diagnostic to the "no can do" message.
147c147,148
< attrs.valuemask = 0L;
---
> attrs.valuemask = XpmCloseness;
> attrs.closeness = 40000;
172,177c173,203
< if (use_dynamic == False
< && XpmCreatePixmapFromData (wm->display(), wm->root(), background,
< &m_backgroundPixmap, NULL, &attrs)
< != XpmSuccess) {
< fprintf(stderr, "wmx: couldn't create background pixmap\n");
< m_backgroundPixmap = None;
---
> if (use_dynamic == False) {
> switch (XpmCreatePixmapFromData (wm->display(), wm->root(),
> background, &m_backgroundPixmap,
> NULL, &attrs)) {
> case XpmSuccess:
> break;
> case XpmColorError:
> fprintf(stderr, "Wmx: Color error loading pixmap\n");
> m_backgroundPixmap = None;
> break;
> case XpmOpenFailed:
> fprintf(stderr, "Wmx: Open failed\n");
> m_backgroundPixmap = None;
> break;
> case XpmFileInvalid:
> fprintf(stderr, "Wmx: file invalid\n");
> m_backgroundPixmap = None;
> break;
> case XpmNoMemory:
> fprintf(stderr, "Wmx: no memory\n");
> m_backgroundPixmap = None;
> break;
> case XpmColorFailed:
> fprintf(stderr, "Wmx: color failed\n");
> m_backgroundPixmap = None;
> break;
> default:
> fprintf(stderr, "Wmx: unknown error loading pixmap\n");
> m_backgroundPixmap = None;
> break;
>
--- Joe M.
Next: