#include "blockinput.h"
#include "puresize.h"
+#ifdef HAVE_X_WINDOWS
/* This may include sys/types.h, and that somehow loses
if this is not done before the other system files. */
#include "xterm.h"
+#endif
/* Load sys/types.h if not already loaded.
In some systems loading it twice is suicidal. */
#include "dispextern.h"
+#ifdef HAVE_X_WINDOWS
#include "../oldXMenu/XMenu.h"
+#endif
#ifdef USE_X_TOOLKIT
#include <X11/Xlib.h>
if (FRAMEP (window))
{
f = XFRAME (window);
-
xpos = 0;
ypos = 0;
}
}
pop_down:
+#ifdef HAVE_X_WINDOWS
/* State that no mouse buttons are now held.
That is not necessarily true, but the fiction leads to reasonable
results, and it is a pain to ask which are actually held now
or track this in the loop above. */
x_mouse_grabbed = 0;
+#endif
/* Unread any events that we got but did not handle. */
while (queue != NULL)
return Qnil;
}
+#ifdef HAVE_X_WINDOWS
/* Adjust coordinates to relative to the outer (window manager) window. */
{
Window child;
y += win_y;
}
}
+#endif /* HAVE_X_WINDOWS */
/* Adjust coordinates to be root-window-relative. */
x += f->display.x->left_pos;
}
XMenuDestroy (XDISPLAY menu);
+#ifdef HAVE_X_WINDOWS
/* State that no mouse buttons are now held.
(The oldXMenu code doesn't track this info for us.)
That is not necessarily true, but the fiction leads to reasonable
results, and it is a pain to ask which are actually held now. */
x_mouse_grabbed = 0;
+#endif
return entry;
}