diff options
| author | Gerd Moellmann | 2001-04-30 14:38:34 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-04-30 14:38:34 +0000 |
| commit | c95fc5f1b93d02b595eb7f3add9dffd692dcbc83 (patch) | |
| tree | 07d6968d54979b37d0e0c539deb2ba16d6246367 | |
| parent | 2a692ba46f7b1a245a11c82ec03f2e2aa5daeda0 (diff) | |
| download | emacs-c95fc5f1b93d02b595eb7f3add9dffd692dcbc83.tar.gz emacs-c95fc5f1b93d02b595eb7f3add9dffd692dcbc83.zip | |
(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.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xterm.c | 39 |
2 files changed, 45 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f0ae3d17eac..282d0a2de2c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2001-04-30 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xterm.c (x_window_to_menu_bar) [USE_LUCID]: New function. | ||
| 4 | (XTread_socket) <Expose> [USE_LUCID]: Handle events for | ||
| 5 | windows that are components of a Lucid menu bar. | ||
| 6 | |||
| 1 | 2001-04-27 Gerd Moellmann <gerd@gnu.org> | 7 | 2001-04-27 Gerd Moellmann <gerd@gnu.org> |
| 2 | 8 | ||
| 3 | * term.c (turn_on_face): Fix reverse video handling on terminals | 9 | * term.c (turn_on_face): Fix reverse video handling on terminals |
diff --git a/src/xterm.c b/src/xterm.c index 15ba1e9c6dc..118c1261ee9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8037,6 +8037,33 @@ x_window_to_scroll_bar (window_id) | |||
| 8037 | } | 8037 | } |
| 8038 | 8038 | ||
| 8039 | 8039 | ||
| 8040 | #if defined USE_X_TOOLKIT && defined USE_LUCID | ||
| 8041 | |||
| 8042 | /* Return the Lucid menu bar WINDOW is part of. Return null | ||
| 8043 | if WINDOW is not part of a menu bar. */ | ||
| 8044 | |||
| 8045 | static Widget | ||
| 8046 | x_window_to_menu_bar (window) | ||
| 8047 | Window window; | ||
| 8048 | { | ||
| 8049 | Lisp_Object tail; | ||
| 8050 | |||
| 8051 | for (tail = Vframe_list; | ||
| 8052 | XGCTYPE (tail) == Lisp_Cons; | ||
| 8053 | tail = XCDR (tail)) | ||
| 8054 | { | ||
| 8055 | Lisp_Object frame = XCAR (tail); | ||
| 8056 | Widget menu_bar = XFRAME (frame)->output_data.x->menubar_widget; | ||
| 8057 | |||
| 8058 | if (menu_bar && xlwmenu_window_p (menu_bar, window)) | ||
| 8059 | return menu_bar; | ||
| 8060 | } | ||
| 8061 | |||
| 8062 | return NULL; | ||
| 8063 | } | ||
| 8064 | |||
| 8065 | #endif /* USE_X_TOOLKIT && USE_LUCID */ | ||
| 8066 | |||
| 8040 | 8067 | ||
| 8041 | /************************************************************************ | 8068 | /************************************************************************ |
| 8042 | Toolkit scroll bars | 8069 | Toolkit scroll bars |
| @@ -9990,6 +10017,18 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 9990 | } | 10017 | } |
| 9991 | else | 10018 | else |
| 9992 | { | 10019 | { |
| 10020 | #if defined USE_X_TOOLKIT && defined USE_LUCID | ||
| 10021 | /* Submenus of the Lucid menu bar aren't widgets | ||
| 10022 | themselves, so there's no way to dispatch events | ||
| 10023 | to them. Recognize this case separately. */ | ||
| 10024 | { | ||
| 10025 | Widget widget | ||
| 10026 | = x_window_to_menu_bar (event.xexpose.window); | ||
| 10027 | if (widget) | ||
| 10028 | xlwmenu_redisplay (widget); | ||
| 10029 | } | ||
| 10030 | #endif /* USE_X_TOOLKIT && USE_LUCID */ | ||
| 10031 | |||
| 9993 | #ifdef USE_TOOLKIT_SCROLL_BARS | 10032 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 9994 | /* Dispatch event to the widget. */ | 10033 | /* Dispatch event to the widget. */ |
| 9995 | goto OTHER; | 10034 | goto OTHER; |