Mercurial > emacs
diff src/xmenu.c @ 9572:b36d5e88cccc
*** empty log message ***
author | Morten Welinder <terra@diku.dk> |
---|---|
date | Mon, 17 Oct 1994 08:42:36 +0000 |
parents | c5a0a84a76a7 |
children | 1a85137cb257 |
line wrap: on
line diff
--- a/src/xmenu.c Mon Oct 17 08:04:13 1994 +0000 +++ b/src/xmenu.c Mon Oct 17 08:42:36 1994 +0000 @@ -42,9 +42,11 @@ #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. */ @@ -54,7 +56,9 @@ #include "dispextern.h" +#ifdef HAVE_X_WINDOWS #include "../oldXMenu/XMenu.h" +#endif #ifdef USE_X_TOOLKIT #include <X11/Xlib.h> @@ -759,7 +763,6 @@ if (FRAMEP (window)) { f = XFRAME (window); - xpos = 0; ypos = 0; } @@ -1969,11 +1972,13 @@ } 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) @@ -2071,6 +2076,7 @@ return Qnil; } +#ifdef HAVE_X_WINDOWS /* Adjust coordinates to relative to the outer (window manager) window. */ { Window child; @@ -2097,6 +2103,7 @@ y += win_y; } } +#endif /* HAVE_X_WINDOWS */ /* Adjust coordinates to be root-window-relative. */ x += f->display.x->left_pos; @@ -2282,11 +2289,13 @@ } 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; }