For additional customization options for displaying tooltips, use
@kbd{M-x customize-group @key{RET} tooltip @key{RET}}.
-@vindex x-gtk-use-system-tooltips
- If Emacs is built with GTK+ support, it displays tooltips via GTK+,
-using the default appearance of GTK+ tooltips. To disable this,
-change the variable @code{x-gtk-use-system-tooltips} to @code{nil}.
-If you do this, or if Emacs is built without GTK+ support, most
-attributes of the tooltip text are specified by the @code{tooltip}
-face, and by X resources (@pxref{X Resources}).
+@vindex use-system-tooltips
+ If Emacs is built with the GTK+ toolkit or Haiku windowing support,
+it displays tooltips via the toolkit, using the default appearance of
+the toolkit's tooltips. To disable this, change the variable
+@code{use-system-tooltips} to @code{nil}. If you do this, or if Emacs
+is built without GTK+ or Haiku windowing support, most attributes of
+the tooltip text are specified by the @code{tooltip} face, and by X
+resources (@pxref{X Resources}).
@dfn{GUD tooltips} are special tooltips that show the values of
variables when debugging a program with GUD@. @xref{Debugger
@cindex tooltips (haiku)
@cindex haiku tooltips
-@vindex haiku-use-system-tooltips
On Haiku, Emacs defaults to using the system tooltip mechanism.
This usually leads to more responsive tooltips, but the tooltips will
not be able to display text properties or faces. If you need those
-features, customize the variable @code{haiku-use-system-tooltips} to
-the nil value, and Emacs will use its own implementation of tooltips.
+features, customize the variable @code{use-system-tooltips} to the
+@code{nil} value, and Emacs will use its own implementation of
+tooltips.
- System tooltips cannot display above the menu bar, so help text
-in the menu bar will display in the echo area instead when they are
+ System tooltips cannot display above the menu bar, so help text in
+the menu bar will display in the echo area instead when they are
enabled.
@cindex X resources on Haiku
@end defun
@cindex system tooltips
-@vindex x-gtk-use-system-tooltips
-When Emacs is built with GTK+ support, it by default displays tooltips
-using GTK+ functions, and the appearance of the tooltips is then
-controlled by GTK+ settings. GTK+ tooltips can be disabled by
-changing the value of the variable @code{x-gtk-use-system-tooltips} to
-@code{nil}. The rest of this subsection describes how to control
-non-GTK+ tooltips, which are presented by Emacs itself.
+@vindex use-system-tooltips
+When Emacs is built with the GTK+ toolkit or Haiku windowing support,
+it by default displays tooltips using toolkit functions, and the
+appearance of the tooltips is then controlled by by the toolkit's
+settings. Toolkit-provided tooltips can be disabled by changing the
+value of the variable @code{use-system-tooltips} to @code{nil}. The
+rest of this subsection describes how to control non-toolkit tooltips,
+which are presented by Emacs itself.
@cindex tooltip frames
Tooltips are displayed in special frames called tooltip frames, which
This controls whether or not GTK input methods are used by Emacs,
instead of XIM input methods.
++++
+** New user option 'use-system-tooltips'.
+This controls whether or not to use the toolkit Emacs was built with
+to display tooltips, if supported.
+
---
** New minor mode 'pixel-scroll-precision-mode'.
When enabled, and if your mouse supports it, you can scroll the
(const :tag "Iconify" t))
"26.1")
(tooltip-reuse-hidden-frame tooltip boolean "26.1")
+ (use-system-tooltips tooltip boolean "29.1")
;; fringe.c
(overflow-newline-into-fringe fringe boolean)
;; image.c
(define-key special-event-map [drag-n-drop]
'haiku-dnd-handle-drag-n-drop-event)
+(defvaralias 'haiku-use-system-tooltips 'use-system-tooltips)
+
(provide 'haiku-win)
(provide 'term/haiku-win)
(t
(popup-menu (mouse-menu-bar-map) last-nonmenu-event))))
+(defvaralias 'x-gtk-use-system-tooltips 'use-system-tooltips)
+
(provide 'pgtk-win)
(provide 'term/pgtk-win)
(define-key special-event-map [preedit-text] 'x-preedit-text)
+(defvaralias 'x-gtk-use-system-tooltips 'use-system-tooltips)
+
(provide 'x-win)
(provide 'term/x-win)
Gtk+ tooltips are not used) and on Windows. */);
tooltip_reuse_hidden_frame = false;
+ DEFVAR_BOOL ("use-system-tooltips", use_system_tooltips,
+ doc: /* Use the toolkit to display tooltips.
+This option is only meaningful when Emacs is built with GTK+ or Haiku
+windowing support, and results in tooltips that look like those
+displayed by other GTK+ or Haiku programs, but will not be able to
+display text properties inside tooltip text. */);
+ use_system_tooltips = true;
+
DEFVAR_LISP ("iconify-child-frame", iconify_child_frame,
doc: /* How to handle iconification of child frames.
This variable tells Emacs how to proceed when it is asked to iconify a
else
CHECK_FIXNUM (dy);
- if (haiku_use_system_tooltips)
+ if (use_system_tooltips)
{
int root_x, root_y;
CHECK_STRING (string);
doc: /* SKIP: real doc in xfns.c. */);
Vx_max_tooltip_size = Fcons (make_fixnum (80), make_fixnum (40));
- DEFVAR_BOOL ("haiku-use-system-tooltips", haiku_use_system_tooltips,
- doc: /* When non-nil, Emacs will display tooltips using the App Kit.
-This can avoid a great deal of consing that does not play
-well with the Haiku memory allocator, but comes with the
-disadvantage of not being able to use special display properties
-within tooltips. */);
- haiku_use_system_tooltips = 1;
-
#ifdef USE_BE_CAIRO
DEFVAR_LISP ("cairo-version-string", Vcairo_version_string,
doc: /* Version info for cairo. */);
value of x_gtk_use_system_tooltips might not be the same as used
for the tooltip we have to hide, see Bug#30399. */
if ((NILP (tip_last_frame) && NILP (tip_frame))
- || (!x_gtk_use_system_tooltips
+ || (!use_system_tooltips
&& !delete
&& FRAMEP (tip_frame)
&& FRAME_LIVE_P (XFRAME (tip_frame))
/* When using GTK+ system tooltips (compare Bug#41200) reset
tip_last_frame. It will be reassigned when showing the next
GTK+ system tooltip. */
- if (x_gtk_use_system_tooltips)
+ if (use_system_tooltips)
tip_last_frame = Qnil;
/* Now look whether there's an Emacs tip around. */
if (FRAME_LIVE_P (f))
{
- if (delete || x_gtk_use_system_tooltips)
+ if (delete || use_system_tooltips)
{
/* Delete the Emacs tooltip frame when DELETE is true
or we change the tooltip type from an Emacs one to
else
CHECK_FIXNUM (dy);
- if (x_gtk_use_system_tooltips)
+ if (use_system_tooltips)
{
bool ok;
to turn the additional text off. */);
x_gtk_file_dialog_help_text = true;
- DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips,
- doc: /* If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used.
-Otherwise use Emacs own tooltip implementation.
-When using Gtk+ tooltips, the tooltip face is not used. */);
- x_gtk_use_system_tooltips = true;
-
DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size,
doc: /* Maximum size for tooltips.
Value is a pair (COLUMNS . ROWS). Text larger than this is clipped. */);
}
#ifdef USE_GTK
- /* Any GTK+ system tooltip can be found via the x_output structure of
- tip_last_frame, provided that frame is still live. Any Emacs
- tooltip is found via the tip_frame variable. Note that the current
- value of x_gtk_use_system_tooltips might not be the same as used
- for the tooltip we have to hide, see Bug#30399. */
+ /* Any GTK+ system tooltip can be found via the x_output structure
+ of tip_last_frame, provided that frame is still live. Any Emacs
+ tooltip is found via the tip_frame variable. Note that the
+ current value of use_system_tooltips might not be the same as
+ used for the tooltip we have to hide, see Bug#30399. */
if ((NILP (tip_last_frame) && NILP (tip_frame))
- || (!x_gtk_use_system_tooltips
+ || (!use_system_tooltips
&& !delete
&& !NILP (tip_frame)
&& FRAME_LIVE_P (XFRAME (tip_frame))
/* When using GTK+ system tooltips (compare Bug#41200) reset
tip_last_frame. It will be reassigned when showing the next
GTK+ system tooltip. */
- if (x_gtk_use_system_tooltips)
+ if (use_system_tooltips)
tip_last_frame = Qnil;
/* Now look whether there's an Emacs tip around. */
if (FRAME_LIVE_P (f))
{
- if (delete || x_gtk_use_system_tooltips)
+ if (delete || use_system_tooltips)
{
/* Delete the Emacs tooltip frame when DELETE is true
or we change the tooltip type from an Emacs one to
CHECK_FIXNUM (dy);
#ifdef USE_GTK
- if (x_gtk_use_system_tooltips)
+ if (use_system_tooltips)
{
bool ok;
to turn the additional text off. */);
x_gtk_file_dialog_help_text = true;
- DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips,
- doc: /* If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used.
-Otherwise use Emacs own tooltip implementation.
-When using Gtk+ tooltips, the tooltip face is not used. */);
- x_gtk_use_system_tooltips = true;
-
DEFVAR_LISP ("x-gtk-resize-child-frames", x_gtk_resize_child_frames,
doc: /* If non-nil, resize child frames specially with GTK builds.
If this is nil, resize child frames like any other frames. This is the