1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00
This commit is contained in:
id
2000-12-09 12:16:35 +00:00
parent 57d9e81c2d
commit 2d063d279e
2 changed files with 26 additions and 18 deletions

View File

@@ -188,7 +188,7 @@ WMFreeTypeRImage *renderChar(FT_Face face, FT_ULong char_index, RColor *color) {
return tmp_data; return tmp_data;
} }
/* drawFreetypeString */ /* drawFreeTypeString */
void initDrawFreeTypeString(proplist_t pl, void **init_data) { void initDrawFreeTypeString(proplist_t pl, void **init_data) {
WMFreeTypeData *data; WMFreeTypeData *data;
XColor xcolor; XColor xcolor;
@@ -330,6 +330,7 @@ drawFreeTypeString (proplist_t pl, Drawable d,
if (!func_data[2]) { if (!func_data[2]) {
XGetGeometry(ds_dpy, d, &wdummy, &dummy, &dummy, &xwidth, &xheight, &dummy, &dummy); XGetGeometry(ds_dpy, d, &wdummy, &dummy, &dummy, &xwidth, &xheight, &dummy, &dummy);
pixmap = XCreatePixmap(ds_dpy, d, xwidth, xheight, DefaultDepth(ds_dpy, DefaultScreen(ds_dpy))); pixmap = XCreatePixmap(ds_dpy, d, xwidth, xheight, DefaultDepth(ds_dpy, DefaultScreen(ds_dpy)));
XClearWindow(ds_dpy, d);
XCopyArea(ds_dpy, d, pixmap, gc, 0, 0, xwidth, xheight, 0, 0); XCopyArea(ds_dpy, d, pixmap, gc, 0, 0, xwidth, xheight, 0, 0);
rimg = RCreateImageFromDrawable(rc, pixmap, None); rimg = RCreateImageFromDrawable(rc, pixmap, None);
XFreePixmap(ds_dpy, pixmap); XFreePixmap(ds_dpy, pixmap);
@@ -348,7 +349,8 @@ drawFreeTypeString (proplist_t pl, Drawable d,
int _dx, _dy, _sw, _sh; int _dx, _dy, _sw, _sh;
_dx = j + data->glyphs_array[text[i]]->left; _dx = j + data->glyphs_array[text[i]]->left;
_dy = (height + data->face->size->metrics.y_ppem)/2 - data->glyphs_array[text[i]]->top; _dy = (height + data->face->size->metrics.y_ppem)/2 -
data->glyphs_array[text[i]]->top;
_sw = data->glyphs_array[text[i]]->image->width; _sw = data->glyphs_array[text[i]]->image->width;
_sh = data->glyphs_array[text[i]]->image->height; _sh = data->glyphs_array[text[i]]->image->height;

View File

@@ -986,6 +986,7 @@ wFrameWindowPaint(WFrameWindow *fwin)
if (fwin->titlebar && !fwin->flags.repaint_only_resizebar if (fwin->titlebar && !fwin->flags.repaint_only_resizebar
&& fwin->title_texture[fwin->flags.state]->any.type==WTEX_SOLID) { && fwin->title_texture[fwin->flags.state]->any.type==WTEX_SOLID) {
#ifdef DRAWSTRING_PLUGIN #ifdef DRAWSTRING_PLUGIN
if (fwin->title) {
tmp_bg = XCreatePixmap(dpy, fwin->titlebar->window, tmp_bg = XCreatePixmap(dpy, fwin->titlebar->window,
fwin->titlebar->width, tb, fwin->titlebar->width, tb,
DefaultDepth(dpy, DefaultScreen(dpy))); DefaultDepth(dpy, DefaultScreen(dpy)));
@@ -996,6 +997,12 @@ wFrameWindowPaint(WFrameWindow *fwin)
(WTexSolid*)fwin->title_texture[fwin->flags.state], (WTexSolid*)fwin->title_texture[fwin->flags.state],
WREL_RAISED); WREL_RAISED);
background = &tmp_bg; background = &tmp_bg;
} else {
wDrawBevel(fwin->titlebar->window, fwin->titlebar->width,
fwin->titlebar->height,
(WTexSolid*)fwin->title_texture[fwin->flags.state],
WREL_RAISED);
}
#else #else
wDrawBevel(fwin->titlebar->window, fwin->titlebar->width, wDrawBevel(fwin->titlebar->window, fwin->titlebar->width,
fwin->titlebar->height, fwin->titlebar->height,
@@ -1131,8 +1138,7 @@ wFrameWindowPaint(WFrameWindow *fwin)
title, titlelen); title, titlelen);
} }
if (fwin->titlebar && !fwin->flags.repaint_only_resizebar if (fwin->title && fwin->title_texture[fwin->flags.state]->any.type==WTEX_SOLID) {
&& fwin->title_texture[fwin->flags.state]->any.type==WTEX_SOLID) {
XFreePixmap(dpy, tmp_bg); XFreePixmap(dpy, tmp_bg);
} }
#undef DRAWSTRING_CURRENT_STATE #undef DRAWSTRING_CURRENT_STATE