summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-09-04 11:55:02 +0000
committerMiles Bader <miles@gnu.org>2000-09-04 11:55:02 +0000
commitda353f232d84f8fbce0a34d6087f5e8edb17d798 (patch)
tree99f88b4bfec2356e5fa1844a395d10c0c433250a /lwlib
parenta033ea13a3aafd9595267896825e9e5b7a6f38df (diff)
downloademacs-da353f232d84f8fbce0a34d6087f5e8edb17d798.tar.gz
(XlwMenuSetValues): Only frob the display if the menu is actually displayed.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/xlwmenu.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 1ced18a5eb2..2239fb4b958 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -1813,15 +1813,17 @@ XlwMenuSetValues (current, request, new)
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;