1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 14:08:06 +01:00

- API change in WINGs for WMDraw*String().

WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
  arguments. WMDrawImageString() receives 2 colors (text & background).
  This is to allow easy extension for Xft/Xrender and hide X low level details
- Added alpha channel to WMColor. 2 new functions also:
  WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Removed obsoleted acconfig.h and implemented its functionality using
  AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
  This will definitely enforce the need to use autoconf 2.5x
This commit is contained in:
dan
2002-10-08 08:26:06 +00:00
parent e98da5a628
commit a2b404b5b3
58 changed files with 554 additions and 601 deletions

View File

@@ -50,7 +50,7 @@
#include "kwm.h"
#endif
#include <WINGs/WUtil.h>
#include <WINGs/WINGsP.h>
extern WPreferences wPreferences;
@@ -275,6 +275,7 @@ showWorkspaceName(WScreen *scr, int workspace)
WorkspaceNameData *data;
RXImage *ximg;
Pixmap text, mask;
WMColor *color;
int w, h;
int px, py;
char *name = scr->workspaces[workspace]->name;
@@ -348,17 +349,30 @@ showWorkspaceName(WScreen *scr, int workspace)
XFillRectangle(dpy, mask, scr->mono_gc, 0, 0, w+4, h+4);
XSetForeground(dpy, scr->mono_gc, 1);
color = WMWhiteColor(scr->wmscreen);
for (x = 0; x <= 4; x++) {
GC saveGC = scr->wmscreen->drawStringGC;
WMPixel pixel = color->color.pixel;
/* ugly hack */
color->color.pixel = 1;
scr->wmscreen->drawStringGC = scr->mono_gc;
for (y = 0; y <= 4; y++) {
WMDrawString(scr->wmscreen, mask, scr->mono_gc,
WMDrawString(scr->wmscreen, mask, color,
scr->workspace_name_font, x, y, name, len);
}
}
scr->wmscreen->drawStringGC = saveGC;
color->color.pixel = pixel;
}
XSetForeground(dpy, scr->draw_gc, scr->white_pixel);
WMDrawString(scr->wmscreen, text, scr->draw_gc, scr->workspace_name_font,
WMDrawString(scr->wmscreen, text, color, scr->workspace_name_font,
2, 2, scr->workspaces[workspace]->name,
strlen(scr->workspaces[workspace]->name));
strlen(scr->workspaces[workspace]->name));
WMReleaseColor(color);
#ifdef SHAPE
XShapeCombineMask(dpy, scr->workspace_name, ShapeBounding, 0, 0, mask,
ShapeSet);