Fix display of line numbers in GTK builds
* src/xdisp.c (should_produce_line_number) [USE_GTK]: Make sure tip_frame is indeed a tooltip frame, before disabling line numbers on it. (Bug#27647) * src/dispextern.h (tip_frame): Add commentary describing the kludgey usage of this variable in GTK builds.
This commit is contained in:
parent
e6f1fd4091
commit
f3e69a80ab
2 changed files with 14 additions and 1 deletions
|
@ -3452,7 +3452,14 @@ void gamma_correct (struct frame *, COLORREF *);
|
||||||
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
|
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
|
||||||
void x_change_tool_bar_height (struct frame *f, int);
|
void x_change_tool_bar_height (struct frame *f, int);
|
||||||
|
|
||||||
|
/* The frame used to display a tooltip.
|
||||||
|
|
||||||
|
Note: In a GTK build with non-zero x_gtk_use_system_tooltips, this
|
||||||
|
variable holds the frame that shows the tooltip, not the frame of
|
||||||
|
the tooltip itself, so checking whether a frame is a tooltip frame
|
||||||
|
cannot just compare the frame to what this variable holds. */
|
||||||
extern Lisp_Object tip_frame;
|
extern Lisp_Object tip_frame;
|
||||||
|
|
||||||
extern Window tip_window;
|
extern Window tip_window;
|
||||||
extern frame_parm_handler x_frame_parm_handlers[];
|
extern frame_parm_handler x_frame_parm_handlers[];
|
||||||
|
|
||||||
|
|
|
@ -21132,7 +21132,13 @@ should_produce_line_number (struct it *it)
|
||||||
|
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
/* Don't display line number in tooltip frames. */
|
/* Don't display line number in tooltip frames. */
|
||||||
if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame))
|
if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame)
|
||||||
|
#ifdef USE_GTK
|
||||||
|
/* GTK builds store in tip_frame the frame that shows the tip,
|
||||||
|
so we need an additional test. */
|
||||||
|
&& !NILP (Fframe_parameter (tip_frame, Qtooltip))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue