From: Jan D Date: Fri, 3 Apr 2015 11:59:05 +0000 (+0200) Subject: Don't optimized away tool tip redraw, may lead to corrupted text. X-Git-Tag: emacs-25.0.90~2008^2~12^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c775195c62843deed10e7967e488b3b04b84c412;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7c7892a3fe8..09225f26dfc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-04-03 Jan Djärv + + * xterm.c (handle_one_xevent): Always redraw tool tips on + MapNotify. Update tool tip frame sizes on ConfigureNotify. + 2015-03-31 Eli Zaretskii * keyboard.c (read_key_sequence): Don't let diff --git a/src/xterm.c b/src/xterm.c index bdc85ae71fc..e904343387c 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);