/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2013 Free Software
+Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2014 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
{
popup_activated_flag = 1;
-#ifdef USE_X_TOOLKIT
x_activate_timeout_atimer ();
-#endif
}
#endif
#ifdef USE_GTK
/* If we have detached menus, we must update deep so detached menus
also gets updated. */
- deep_p = deep_p || xg_have_tear_offs ();
+ deep_p = deep_p || xg_have_tear_offs (f);
#endif
if (deep_p)
if (x1 == 0 && y1 == 0)
XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL);
#endif
- x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
+ x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
}
unblock_input ();
}
for (i = 0; i < 5; i++)
if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
break;
+ /* If keys aren't grabbed (i.e., a mouse up event), use 0. */
+ if (i == 5) i = 0;
}
/* Display the menu. */
#endif
wv_title->name = SSDATA (title);
- wv_title->enabled = TRUE;
+ wv_title->enabled = true;
wv_title->button_type = BUTTON_TYPE_NONE;
wv_title->help = Qnil;
wv_title->next = wv_sep1;
doc: /* Return t if a menu or popup dialog is active. */)
(void)
{
-#ifdef HAVE_MENUS
return (popup_activated ()) ? Qt : Qnil;
-#else
- return Qnil;
-#endif /* HAVE_MENUS */
}
\f
void