summaryrefslogtreecommitdiff
path: root/lwlib/lwlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lwlib/lwlib.c')
-rw-r--r--lwlib/lwlib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index 6569b38da32..f71f6ef6d57 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -1345,9 +1345,10 @@ lw_window_is_in_menubar (win, menubar_widget)
&& XtWindow (menubar_widget) == win;
#endif
#if defined (USE_MOTIF)
- && XtWindowToWidget (XtDisplay (menubar_widget), win)
- && (XtParent (XtWindowToWidget (XtDisplay (menubar_widget), win))
- == menubar_widget);
+ && ((XtWindow (menubar_widget) == win)
+ || (XtWindowToWidget (XtDisplay (menubar_widget), win)
+ && (XtParent (XtWindowToWidget (XtDisplay (menubar_widget), win))
+ == menubar_widget)));
#endif
}