]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix compilation under GLYPH_DEBUG, broken by conditional tool_bar_window.
authorEli Zaretskii <eliz@gnu.org>
Sat, 28 Sep 2013 08:19:33 +0000 (11:19 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 28 Sep 2013 08:19:33 +0000 (11:19 +0300)
 src/xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
 frame' does not have the tool_bar_window member.

src/ChangeLog
src/xdisp.c

index a6774e30b0c7569fef8d25ac2bc9f71787988b33..ec36db90dfa5ae6ab8e4372987fb2291dc886c44 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-28  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
+       frame' does not have the tool_bar_window member.
+
 2013-09-26  Barry O'Reilly  <gundaetiapo@gmail.com>
 
        Signal error when reading an empty byte-code object (Bug#15405)
index 0dc34dfbab09c94fa1fb14770a533b196fce5b17..22ada2049548f1a6ad9622f3e96e7a762b83fe54 100644 (file)
@@ -18109,9 +18109,13 @@ DEFUN ("dump-tool-bar-row", Fdump_tool_bar_row, Sdump_tool_bar_row, 1, 2, "",
        doc: /* Dump glyph row ROW of the tool-bar of the current frame to stderr.
 GLYPH 0 means don't dump glyphs.
 GLYPH 1 means dump glyphs in short form.
-GLYPH > 1 or omitted means dump glyphs in long form.  */)
+GLYPH > 1 or omitted means dump glyphs in long form.
+
+If there's no tool-bar, or if the tool-bar is not drawn by Emacs,
+do nothing.  */)
   (Lisp_Object row, Lisp_Object glyphs)
 {
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
   struct frame *sf = SELECTED_FRAME ();
   struct glyph_matrix *m = XWINDOW (sf->tool_bar_window)->current_matrix;
   EMACS_INT vpos;
@@ -18121,6 +18125,7 @@ GLYPH > 1 or omitted means dump glyphs in long form.  */)
   if (vpos >= 0 && vpos < m->nrows)
     dump_glyph_row (MATRIX_ROW (m, vpos), vpos,
                    TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 2);
+#endif
   return Qnil;
 }