diff src/menubar-x.c @ 355:182f72e8cd0d r21-1-7

Import from CVS: tag r21-1-7
author cvs
date Mon, 13 Aug 2007 10:56:21 +0200
parents f2b5d7006b0a
children 4711e16a8e49
line wrap: on
line diff
--- a/src/menubar-x.c	Mon Aug 13 10:55:35 2007 +0200
+++ b/src/menubar-x.c	Mon Aug 13 10:56:21 2007 +0200
@@ -674,7 +674,6 @@
   if (eev)
     {
       Position shellx, shelly, framex, framey;
-      Widget shell = XtParent (daddy);
       Arg al [2];
       btn->time = eev->timestamp;
       btn->button = eev->event.button.button;
@@ -682,9 +681,16 @@
       btn->subwindow = (Window) NULL;
       btn->x = eev->event.button.x;
       btn->y = eev->event.button.y;
-      XtSetArg (al [0], XtNx, &shellx);
-      XtSetArg (al [1], XtNy, &shelly);
-      XtGetValues (shell, al, 2);
+      shellx = shelly = 0;
+#ifndef HAVE_WMCOMMAND
+      {
+	Widget shell = XtParent (daddy);
+
+	XtSetArg (al [0], XtNx, &shellx);
+	XtSetArg (al [1], XtNy, &shelly);
+	XtGetValues (shell, al, 2);
+      }
+#endif      
       XtSetArg (al [0], XtNx, &framex);
       XtSetArg (al [1], XtNy, &framey);
       XtGetValues (daddy, al, 2);