1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

fix another drawstring bug, looks like final one, indeed :)

This commit is contained in:
id
2000-12-07 01:40:54 +00:00
parent f47f148f10
commit 2574e2e56a

View File

@@ -800,25 +800,28 @@ paintEntry(WMenu *menu, int index, int selected)
if (scr->drawstring_func[W_STRING_MTEXT]) { if (scr->drawstring_func[W_STRING_MTEXT]) {
Pixmap tmp_bg; Pixmap tmp_bg;
void **p; void **p;
int _y;
_y = (wPreferences.menu_style == MS_NORMAL) ? 0 : y;
tmp_bg = XCreatePixmap(dpy, win, w, menu->entry_height, DefaultDepth(dpy, DefaultScreen(dpy))); tmp_bg = XCreatePixmap(dpy, win, w, menu->entry_height, DefaultDepth(dpy, DefaultScreen(dpy)));
if (selected) { if (selected) {
if (menu->flags.brother) { if (menu->flags.brother) {
XCopyArea(dpy, menu->brother->menu_texture_data, tmp_bg, textGC, XCopyArea(dpy, menu->brother->menu_texture_data, tmp_bg, textGC,
0, y, w, menu->entry_height, 0, 0); 0, _y, w, menu->entry_height, 0, 0);
} else } else
XCopyArea(dpy, menu->menu_texture_data, tmp_bg, textGC, XCopyArea(dpy, menu->menu_texture_data, tmp_bg, textGC,
0, y, w, menu->entry_height, 0, 0); 0, _y, w, menu->entry_height, 0, 0);
XSetForeground(dpy, scr->select_menu_gc, scr->select_pixel); XSetForeground(dpy, scr->select_menu_gc, scr->select_pixel);
XFillRectangle(dpy, tmp_bg, scr->select_menu_gc, 1, 1, w-2, h-3); XFillRectangle(dpy, tmp_bg, scr->select_menu_gc, 1, 1, w-2, h-3);
} else { } else {
if (menu->flags.brother) { if (menu->flags.brother) {
XCopyArea(dpy, menu->brother->menu_texture_data, tmp_bg, textGC, XCopyArea(dpy, menu->brother->menu_texture_data, tmp_bg, textGC,
0, y, w, menu->entry_height, 0, 0); 0, _y, w, menu->entry_height, 0, 0);
} }
else else
XCopyArea(dpy, menu->menu_texture_data, tmp_bg, textGC, XCopyArea(dpy, menu->menu_texture_data, tmp_bg, textGC,
0, y, w, menu->entry_height, 0, 0); 0, _y, w, menu->entry_height, 0, 0);
} }
p = wPluginPackData(4, p = wPluginPackData(4,