]> code.delx.au - gnu-emacs/blobdiff - src/w32term.c
Revert "Cleanup tooltips"
[gnu-emacs] / src / w32term.c
index 8c2fdaf0f59f1e7523f3c3541a56fc5ae8408db0..5a11e2a871a74730aa8f8716efbb8b52e8374d67 100644 (file)
@@ -5024,10 +5024,11 @@ w32_read_socket (struct terminal *terminal,
          /* wParam non-zero means Window is about to be shown, 0 means
             about to be hidden.  */
          /* Redo the mouse-highlight after the tooltip has gone.  */
-         if (!msg.msg.wParam
-             && dpyinfo->w32_tooltip_frame
-             && FRAME_W32_WINDOW (dpyinfo->w32_tooltip_frame) == msg.msg.hwnd)
-           x_redo_mouse_highlight (dpyinfo);
+         if (!msg.msg.wParam && msg.msg.hwnd == tip_window)
+           {
+             tip_window = NULL;
+             x_redo_mouse_highlight (dpyinfo);
+           }
 
          /* If window has been obscured or exposed by another window
             being maximized or minimized/restored, then recheck
@@ -5393,7 +5394,7 @@ w32_read_socket (struct terminal *terminal,
        struct frame *f = XFRAME (frame);
        /* The tooltip has been drawn already.  Avoid the
           SET_FRAME_GARBAGED below.  */
-       if (FRAME_TOOLTIP_P (f))
+       if (EQ (frame, tip_frame))
          continue;
 
        /* Check "visible" frames and mark each as obscured or not.
@@ -5870,7 +5871,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
       /* 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,
                           false, Qfont);
@@ -6568,8 +6569,6 @@ x_free_frame_resources (struct frame *f)
     dpyinfo->w32_focus_event_frame = 0;
   if (f == dpyinfo->x_highlight_frame)
     dpyinfo->x_highlight_frame = 0;
-  if (f == dpyinfo->w32_tooltip_frame)
-    dpyinfo->w32_tooltip_frame = 0;
   if (f == hlinfo->mouse_face_mouse_frame)
     reset_mouse_highlight (hlinfo);