mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18: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:
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <wraster.h>
|
||||
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
#include "WindowMaker.h"
|
||||
#include "GNUstep.h"
|
||||
#include "texture.h"
|
||||
@@ -65,8 +67,7 @@ WFrameWindow*
|
||||
wFrameWindowCreate(WScreen *scr, int wlevel, int x, int y,
|
||||
int width, int height, int *clearance, int flags,
|
||||
WTexture **title_texture, WTexture **resize_texture,
|
||||
unsigned long *color,
|
||||
GC *gc, WMFont **font)
|
||||
unsigned long *color, WMFont **font)
|
||||
{
|
||||
WFrameWindow *fwin;
|
||||
|
||||
@@ -81,7 +82,6 @@ wFrameWindowCreate(WScreen *scr, int wlevel, int x, int y,
|
||||
fwin->resizebar_texture = resize_texture;
|
||||
fwin->title_pixel = color;
|
||||
fwin->title_clearance = clearance;
|
||||
fwin->title_gc = gc;
|
||||
fwin->font = font;
|
||||
#ifdef KEEP_XKB_LOCK_STATUS
|
||||
fwin->languagemode = XkbGroup1Index;
|
||||
@@ -1049,7 +1049,9 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
#endif
|
||||
|
||||
if (fwin->title) {
|
||||
char *title;
|
||||
char *title;
|
||||
WMColor *color;
|
||||
WMPixel pixel;
|
||||
|
||||
title = ShrinkString(*fwin->font, fwin->title,
|
||||
fwin->titlebar->width - lofs - rofs);
|
||||
@@ -1073,12 +1075,15 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
break;
|
||||
}
|
||||
|
||||
XSetForeground(dpy, *fwin->title_gc,
|
||||
fwin->title_pixel[fwin->flags.state]);
|
||||
|
||||
WMDrawString(scr->wmscreen, fwin->titlebar->window,
|
||||
*fwin->title_gc, *fwin->font, x, *fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
|
||||
title, titlelen);
|
||||
color = WMBlackColor(scr->wmscreen);
|
||||
/* ugly hack */
|
||||
pixel = color->color.pixel;
|
||||
color->color.pixel = fwin->title_pixel[fwin->flags.state];
|
||||
WMDrawString(scr->wmscreen, fwin->titlebar->window, color,
|
||||
*fwin->font, x, *fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
|
||||
title, titlelen);
|
||||
color->color.pixel = pixel;
|
||||
WMReleaseColor(color);
|
||||
|
||||
wfree(title);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user