emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c775195: Don't optimized away tool tip redraw, may


From: Jan D.
Subject: [Emacs-diffs] master c775195: Don't optimized away tool tip redraw, may lead to corrupted text.
Date: Fri, 03 Apr 2015 11:59:36 +0000

branch: master
commit c775195c62843deed10e7967e488b3b04b84c412
Author: Jan D <address@hidden>
Commit: Jan D <address@hidden>

    Don't optimized away tool tip redraw, may lead to corrupted text.
    
    * src/xterm.c (handle_one_xevent): Always redraw tool tips on
    MapNotify.  Update tool tip frame sizes on ConfigureNotify.
---
 src/ChangeLog |    5 +++++
 src/xterm.c   |   17 ++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 7c7892a..09225f2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-03  Jan Djärv  <address@hidden>
+
+       * xterm.c (handle_one_xevent): Always redraw tool tips on
+       MapNotify.  Update tool tip frame sizes on ConfigureNotify.
+
 2015-03-31  Eli Zaretskii  <address@hidden>
 
        * keyboard.c (read_key_sequence): Don't let
diff --git a/src/xterm.c b/src/xterm.c
index bdc85ae..e904343 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7010,11 +7010,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       goto OTHER;
 
     case MapNotify:
-      if (event->xmap.window == tip_window)
-        /* The tooltip has been drawn already.  Avoid
-           the SET_FRAME_GARBAGED below.  */
-        goto OTHER;
-
       /* We use x_top_window_to_frame because map events can
          come for sub-windows and they don't mean that the
          frame is visible.  */
@@ -7544,6 +7539,18 @@ handle_one_xevent (struct x_display_info *dpyinfo,
         {
          x_net_wm_state (f, event->xconfigure.window);
 
+#ifdef USE_X_TOOLKIT
+          /* Tip frames are pure X window, set size for them.  */
+          if (! NILP (tip_frame) && XFRAME (tip_frame) == f)
+            {
+              if (FRAME_PIXEL_HEIGHT (f) != event->xconfigure.height
+                  || FRAME_PIXEL_WIDTH (f) != event->xconfigure.width)
+                SET_FRAME_GARBAGED (f);
+              FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height;
+              FRAME_PIXEL_WIDTH (f) = event->xconfigure.width;
+            }
+#endif
+
 #ifndef USE_X_TOOLKIT
 #ifndef USE_GTK
           int width = FRAME_PIXEL_TO_TEXT_WIDTH (f, event->xconfigure.width);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]