[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112107: * frame.h (struct frame)
From: |
Dmitry Antipov |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112107: * frame.h (struct frame): Put menu_bar_window under #ifdef |
Date: |
Sat, 23 Mar 2013 06:11:41 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
On 03/22/2013 08:09 PM, Eli Zaretskii wrote:
--- a/src/dispnew.c 2013-03-20 11:29:37 +0000
+++ b/src/dispnew.c 2013-03-22 12:41:34 +0000
@@ -794,11 +794,13 @@
if (f->current_matrix)
clear_glyph_matrix (f->current_matrix);
+#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined
(USE_GTK)
/* Clear the matrix of the menu bar window, if such a window exists.
The menu bar window is currently used to display menus on X when
no toolkit support is compiled in. */
if (WINDOWP (f->menu_bar_window))
clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
+#endif
What about w32 and NS?
IIUC both of them doesn't define HAVE_X_WINDOWS and use native toolkit
features to create menu bar, so menu_bar_window is not needed.
Why not just use #ifdef HAVE_WINDOW_SYSTEM?
Because menu_bar window is needed only if --with-x --with-x-toolkit=none.
For that matter, why ifdef this away at all? On a TTY,
menu_bar_window is not a window, so the call to clear_glyph_matrix is
never made anyway.
See above: the only configuration where menu_bar_window is really used
is --with-x --with-x-toolkit=none, and there are no reasons to have
"constant nil" object in struct frame for other configurations.
Dmitry