1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

fixed crash bug with alt-tab + run-dialog (or internal windows in general)

This commit is contained in:
kojima
2004-10-26 08:00:19 +00:00
parent c95b464680
commit 92a84fe050
2 changed files with 31 additions and 20 deletions

View File

@@ -1,3 +1,7 @@
Changes since version 0.91.0:
.............................
- fixed crash with info panel and alt-tabbing
Changes since version 0.90.0:
.............................

View File

@@ -360,9 +360,13 @@ drawTitle(WSwitchPanel *panel, int index, char *title)
int width= WMWidgetWidth(panel->win);
int x;
if (title)
ntitle= ShrinkString(panel->font, title, width-2*BORDER_SPACE);
else
ntitle= NULL;
if (panel->bg) {
if (ntitle) {
if (strcmp(ntitle, title)!=0)
x= BORDER_SPACE;
else
@@ -375,16 +379,19 @@ drawTitle(WSwitchPanel *panel, int index, char *title)
else if (x + w > width-BORDER_SPACE)
x= width-BORDER_SPACE-w;
}
}
XClearWindow(dpy, WMWidgetXID(panel->win));
if (ntitle)
WMDrawString(panel->scr->wmscreen,
WMWidgetXID(panel->win),
panel->white, panel->font,
x, WMWidgetHeight(panel->win) - BORDER_SPACE - LABEL_HEIGHT + WMFontHeight(panel->font)/2,
ntitle, strlen(ntitle));
} else {
if (ntitle)
WMSetLabelText(panel->label, ntitle);
}
if (ntitle)
free(ntitle);
}