mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 07:11:34 -08:00
(x_window_to_menu_bar) [USE_LUCID]: New function.
(XTread_socket) [USE_LUCID] <Expose>: Handle events for windows that are components of a Lucid menu bar.
This commit is contained in:
parent
2a692ba46f
commit
c95fc5f1b9
2 changed files with 45 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2001-04-30 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* xterm.c (x_window_to_menu_bar) [USE_LUCID]: New function.
|
||||
(XTread_socket) <Expose> [USE_LUCID]: Handle events for
|
||||
windows that are components of a Lucid menu bar.
|
||||
|
||||
2001-04-27 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* term.c (turn_on_face): Fix reverse video handling on terminals
|
||||
|
|
|
|||
39
src/xterm.c
39
src/xterm.c
|
|
@ -8037,6 +8037,33 @@ x_window_to_scroll_bar (window_id)
|
|||
}
|
||||
|
||||
|
||||
#if defined USE_X_TOOLKIT && defined USE_LUCID
|
||||
|
||||
/* Return the Lucid menu bar WINDOW is part of. Return null
|
||||
if WINDOW is not part of a menu bar. */
|
||||
|
||||
static Widget
|
||||
x_window_to_menu_bar (window)
|
||||
Window window;
|
||||
{
|
||||
Lisp_Object tail;
|
||||
|
||||
for (tail = Vframe_list;
|
||||
XGCTYPE (tail) == Lisp_Cons;
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object frame = XCAR (tail);
|
||||
Widget menu_bar = XFRAME (frame)->output_data.x->menubar_widget;
|
||||
|
||||
if (menu_bar && xlwmenu_window_p (menu_bar, window))
|
||||
return menu_bar;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* USE_X_TOOLKIT && USE_LUCID */
|
||||
|
||||
|
||||
/************************************************************************
|
||||
Toolkit scroll bars
|
||||
|
|
@ -9990,6 +10017,18 @@ XTread_socket (sd, bufp, numchars, expected)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined USE_X_TOOLKIT && defined USE_LUCID
|
||||
/* Submenus of the Lucid menu bar aren't widgets
|
||||
themselves, so there's no way to dispatch events
|
||||
to them. Recognize this case separately. */
|
||||
{
|
||||
Widget widget
|
||||
= x_window_to_menu_bar (event.xexpose.window);
|
||||
if (widget)
|
||||
xlwmenu_redisplay (widget);
|
||||
}
|
||||
#endif /* USE_X_TOOLKIT && USE_LUCID */
|
||||
|
||||
#ifdef USE_TOOLKIT_SCROLL_BARS
|
||||
/* Dispatch event to the widget. */
|
||||
goto OTHER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue