From 4ba9b80c98ddf3c0ce3de383fc23da8f1b6c521c Mon Sep 17 00:00:00 2001 From: kojima Date: Wed, 19 May 1999 00:57:36 +0000 Subject: [PATCH] fixed brothr menu texture update bug --- src/client.c | 2 ++ src/menu.c | 16 +++++++++------- src/wconfig.h.in | 9 +++++++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/client.c b/src/client.c index d5a8394a..b88cfdee 100644 --- a/src/client.c +++ b/src/client.c @@ -734,6 +734,7 @@ wClientGetNormalHints(WWindow *wwin, XWindowAttributes *wattribs, Bool geometry, void GetColormapWindows(WWindow *wwin) { +#ifndef NO_CRASHES if (wwin->cmap_windows) { XFree(wwin->cmap_windows); } @@ -747,4 +748,5 @@ GetColormapWindows(WWindow *wwin) wwin->cmap_window_no = 0; wwin->cmap_windows = NULL; } +#endif } diff --git a/src/menu.c b/src/menu.c index e2cf9f29..6cd96fdd 100644 --- a/src/menu.c +++ b/src/menu.c @@ -110,7 +110,8 @@ appearanceObserver(void *self, WMNotification *notif) wMenuRealize(menu); } if (flags & WTextureSettings) { - updateTexture(menu); + if (!menu->flags.brother) + updateTexture(menu); } if (flags & (WTextureSettings|WColorSettings)) { wMenuPaint(menu); @@ -124,8 +125,9 @@ appearanceObserver(void *self, WMNotification *notif) if (flags & WTextureSettings) { menu->frame->flags.need_texture_remake = 1; } - if (flags & (WColorSettings|WTextureSettings)) + if (flags & (WColorSettings|WTextureSettings)) { wFrameWindowPaint(menu->frame); + } } } @@ -228,13 +230,13 @@ wMenuCreate(WScreen *screen, char *title, int main_menu) brother = 0; menu->brother->flags.brother = 1; menu->brother->brother = menu; + } + WMAddNotificationObserver(appearanceObserver, menu, + WNMenuAppearanceSettingsChanged, menu); - WMAddNotificationObserver(appearanceObserver, menu, - WNMenuTitleAppearanceSettingsChanged, menu); + WMAddNotificationObserver(appearanceObserver, menu, + WNMenuTitleAppearanceSettingsChanged, menu); - WMAddNotificationObserver(appearanceObserver, menu, - WNMenuAppearanceSettingsChanged, menu); - } return menu; } diff --git a/src/wconfig.h.in b/src/wconfig.h.in index c0694ff2..ce584abf 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -179,6 +179,15 @@ /* + * Define if you're experiencing crashes when launching programs. + * This will disable some important but not essential code. + * Use it until we figure what's wrong. + */ +#undef NO_CRASHES + + + +/* *.......................................................................... * The following options WILL NOT BE MADE RUN-TIME. Please do not request. * They will only add unneeded bloat. -- 2.11.4.GIT