# HG changeset patch # User Miles Bader # Date 968068502 0 # Node ID 8bafcf2cfd57428db24fb8934d2a4c93c42891ca # Parent 6865e0a3ad1df8ee5a384b8b777d3e49f0de3a41 (XlwMenuSetValues): Only frob the display if the menu is actually displayed. diff -r 6865e0a3ad1d -r 8bafcf2cfd57 lwlib/xlwmenu.c --- a/lwlib/xlwmenu.c Mon Sep 04 09:41:48 2000 +0000 +++ b/lwlib/xlwmenu.c Mon Sep 04 11:55:02 2000 +0000 @@ -1813,15 +1813,17 @@ redisplay = True; - for (i = 0; i < oldmw->menu.windows_length; i++) - { - XSetWindowBackground (XtDisplay (oldmw), - oldmw->menu.windows [i].window, - newmw->core.background_pixel); - /* clear windows and generate expose events */ - XClearArea (XtDisplay (oldmw), oldmw->menu.windows[i].window, - 0, 0, 0, 0, True); - } + if (XtIsRealized (oldmw)) + /* If the menu is currently displayed, change the display. */ + for (i = 0; i < oldmw->menu.windows_length; i++) + { + XSetWindowBackground (XtDisplay (oldmw), + oldmw->menu.windows [i].window, + newmw->core.background_pixel); + /* clear windows and generate expose events */ + XClearArea (XtDisplay (oldmw), oldmw->menu.windows[i].window, + 0, 0, 0, 0, True); + } } return redisplay;