x_update_begin (struct frame *f)
{
#ifdef USE_CAIRO
- if (FRAME_TOOLTIP_P (f) && ! FRAME_VISIBLE_P (f))
+ if (! NILP (tip_frame) && XFRAME (tip_frame) == f
+ && ! FRAME_VISIBLE_P (f))
return;
if (! FRAME_CR_SURFACE (f))
case UnmapNotify:
/* Redo the mouse-highlight after the tooltip has gone. */
- if (dpyinfo->x_tooltip_frame
- && FRAME_X_WINDOW (dpyinfo->x_tooltip_frame) == event->xunmap.window)
- x_redo_mouse_highlight (dpyinfo);
+ if (event->xunmap.window == tip_window)
+ {
+ tip_window = 0;
+ x_redo_mouse_highlight (dpyinfo);
+ }
f = x_top_window_to_frame (dpyinfo, event->xunmap.window);
if (f) /* F may no longer exist if
#ifdef USE_X_TOOLKIT
/* Tip frames are pure X window, set size for them. */
- if (FRAME_TOOLTIP_P (f))
+ if (! NILP (tip_frame) && XFRAME (tip_frame) == f)
{
if (FRAME_PIXEL_HEIGHT (f) != configureEvent.xconfigure.height
|| FRAME_PIXEL_WIDTH (f) != configureEvent.xconfigure.width)
/* Don't change the size of a tip frame; there's no point in
doing it because it's done in Fx_show_tip, and it leads to
problems because the tip frame has no widget. */
- if (!FRAME_TOOLTIP_P (f))
+ if (NILP (tip_frame) || XFRAME (tip_frame) != f)
{
adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3,
/* The following breaks our calculations. If it's really needed,
think of something else. */
#if false
- if (!FRAME_TOOLTIP_P (f))
+ if (NILP (tip_frame) || XFRAME (tip_frame) != f)
{
int text_width, text_height;
dpyinfo->x_focus_event_frame = 0;
if (f == dpyinfo->x_highlight_frame)
dpyinfo->x_highlight_frame = 0;
- if (f == dpyinfo->x_tooltip_frame)
- dpyinfo->x_tooltip_frame = 0;
if (f == hlinfo->mouse_face_mouse_frame)
reset_mouse_highlight (hlinfo);