mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
fix fix
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -986,21 +986,28 @@ 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
|
||||||
tmp_bg = XCreatePixmap(dpy, fwin->titlebar->window,
|
if (fwin->title) {
|
||||||
fwin->titlebar->width, tb,
|
tmp_bg = XCreatePixmap(dpy, fwin->titlebar->window,
|
||||||
DefaultDepth(dpy, DefaultScreen(dpy)));
|
fwin->titlebar->width, tb,
|
||||||
XFillRectangle(dpy, tmp_bg, (*fwin->title_texture)->solid.normal_gc,
|
DefaultDepth(dpy, DefaultScreen(dpy)));
|
||||||
0, 0, fwin->titlebar->width, tb);
|
XFillRectangle(dpy, tmp_bg, (*fwin->title_texture)->solid.normal_gc,
|
||||||
wDrawBevel(tmp_bg, fwin->titlebar->width,
|
0, 0, fwin->titlebar->width, tb);
|
||||||
fwin->titlebar->height,
|
wDrawBevel(tmp_bg, fwin->titlebar->width,
|
||||||
(WTexSolid*)fwin->title_texture[fwin->flags.state],
|
fwin->titlebar->height,
|
||||||
WREL_RAISED);
|
(WTexSolid*)fwin->title_texture[fwin->flags.state],
|
||||||
background = &tmp_bg;
|
WREL_RAISED);
|
||||||
|
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,
|
||||||
(WTexSolid*)fwin->title_texture[fwin->flags.state],
|
(WTexSolid*)fwin->title_texture[fwin->flags.state],
|
||||||
WREL_RAISED);
|
WREL_RAISED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef DRAWSTRING_PLUGIN
|
#ifdef DRAWSTRING_PLUGIN
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user