diff options
author | Noam Postavsky <npostavs@gmail.com> | 2017-11-11 11:10:49 -0500 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-11-11 11:12:00 -0500 |
commit | 1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e (patch) | |
tree | 66f1607d41b0bc490f3202c327ecb3fcdc5746bf /src | |
parent | 1ef6d2b0e679c035dd2a1f2f858865eeafc5bc28 (diff) | |
parent | 9533d76b0b5bfe2df1cccc55a92c2545b1de4e2b (diff) | |
download | emacs-1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e.tar.gz emacs-1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e.tar.bz2 emacs-1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e.zip |
; Merge from emacs-26
9533d76b0b Keep Man sections in natural order (bug#28998)
d63c9a96f5 * lisp/minibuffer.el: Install a workaround for bug#16274
7657a86709 Fix comparisons with tip_frame in GTK builds
603a0716a8 Improve the documentation of M-n for entering file names
72f813fb56 Fix desktop auto-save timer when linum-mode is used
44340b475f Fix "C-h k" in xterm-mouse-mode
05aa6d4a68 Fix off-by-1 bug in --enable-checking=stringbytes
096f638ddc Correct the indentation of C99's compound literals.
c52a2aa8f3 Improve the doc string of 'dired-isearch-filter-filenames'
e592b92482 * lisp/isearch.el (search-invisible): Doc fix. (Bug#29222)
f3e69a80ab Fix display of line numbers in GTK builds
e6f1fd4091 Fix previous change to flymake-diag-region (bug#29174)
89382780e1 flymake-diag-region really returns nil if region is invali...
535688a418 Flymake correctly highlights whole last line if eob (bug#2...
72e62d3fdb Protect Flymake checkdoc backend against checkdoc errors (...
b28de57411 Sort entries of the Flymake diagnostics buffer (bug#29175)
fc56bea142 Correctly indent C++14 brace lists which are a second argu...
9dde8be9cd Fix redisplay of overlay-arrows on GUI frames
0da08f2f8e Protect Flymake tests against older Ruby and Perl (bug#29187)
781f276cc1 Fix URL cookie expiration bug
Diffstat (limited to 'src')
-rw-r--r-- | src/alloc.c | 2 | ||||
-rw-r--r-- | src/dispextern.h | 7 | ||||
-rw-r--r-- | src/frame.c | 6 | ||||
-rw-r--r-- | src/xdisp.c | 20 | ||||
-rw-r--r-- | src/xfns.c | 6 | ||||
-rw-r--r-- | src/xterm.c | 12 |
6 files changed, 44 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c index f479226845a..ae892e49d7d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1760,7 +1760,7 @@ static char const string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] = #ifdef GC_CHECK_STRING_BYTES -#define SDATA_SIZE(NBYTES) FLEXSIZEOF (struct sdata, data, NBYTES) +#define SDATA_SIZE(NBYTES) FLEXSIZEOF (struct sdata, data, (NBYTES) + 1) #else /* not GC_CHECK_STRING_BYTES */ diff --git a/src/dispextern.h b/src/dispextern.h index 2f55d8cbc87..430afbf09a3 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3452,7 +3452,14 @@ void gamma_correct (struct frame *, COLORREF *); void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); void x_change_tool_bar_height (struct frame *f, int); +/* The frame used to display a tooltip. + + Note: In a GTK build with non-zero x_gtk_use_system_tooltips, this + variable holds the frame that shows the tooltip, not the frame of + the tooltip itself, so checking whether a frame is a tooltip frame + cannot just compare the frame to what this variable holds. */ extern Lisp_Object tip_frame; + extern Window tip_window; extern frame_parm_handler x_frame_parm_handlers[]; diff --git a/src/frame.c b/src/frame.c index fe1709e6ede..2b32751c0d3 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1472,7 +1472,11 @@ DEFUN ("frame-list", Fframe_list, Sframe_list, Lisp_Object frames; frames = Fcopy_sequence (Vframe_list); #ifdef HAVE_WINDOW_SYSTEM - if (FRAMEP (tip_frame)) + if (FRAMEP (tip_frame) +#ifdef USE_GTK + && !NILP (Fframe_parameter (tip_frame, Qtooltip)) +#endif + ) frames = Fdelq (tip_frame, frames); #endif return frames; diff --git a/src/xdisp.c b/src/xdisp.c index f1a6c622d09..f1c6b9ff699 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16066,8 +16066,10 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, since the handling of this_line_start_pos, etc., in redisplay handles the same cases. */ && !EQ (window, minibuf_window) - && (FRAME_WINDOW_P (f) - || !overlay_arrow_in_current_buffer_p ())) + /* When overlay arrow is shown in current buffer, point movement + is no longer "simple", as it typically causes the overlay + arrow to move as well. */ + && !overlay_arrow_in_current_buffer_p ()) { int this_scroll_margin, top_scroll_margin; struct glyph_row *row = NULL; @@ -17698,7 +17700,11 @@ try_window_reusing_current_matrix (struct window *w) /* Don't try to reuse the display if windows have been split or such. */ || windows_or_buffers_changed - || f->cursor_type_changed) + || f->cursor_type_changed + /* This function cannot handle buffers where the overlay arrow + is shown on the fringes, because if the arrow position + changes, we cannot just reuse the current matrix. */ + || overlay_arrow_in_current_buffer_p ()) return false; /* Can't do this if showing trailing whitespace. */ @@ -21126,7 +21132,13 @@ should_produce_line_number (struct it *it) #ifdef HAVE_WINDOW_SYSTEM /* Don't display line number in tooltip frames. */ - if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame)) + if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame) +#ifdef USE_GTK + /* GTK builds store in tip_frame the frame that shows the tip, + so we need an additional test. */ + && !NILP (Fframe_parameter (tip_frame, Qtooltip)) +#endif + ) return false; #endif diff --git a/src/xfns.c b/src/xfns.c index 9022e4a9674..83fc07dc6cb 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4915,7 +4915,11 @@ Internal use only, use `display-monitor-attributes-list' instead. */) struct frame *f = XFRAME (frame); if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo - && !EQ (frame, tip_frame)) + && !(EQ (frame, tip_frame) +#ifdef USE_GTK + && !NILP (Fframe_parameter (tip_frame, Qtooltip)) +#endif + )) { GdkWindow *gwin = gtk_widget_get_window (FRAME_GTK_WIDGET (f)); diff --git a/src/xterm.c b/src/xterm.c index dbb8349452d..e11cde771ab 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -997,7 +997,11 @@ x_update_begin (struct frame *f) { #ifdef USE_CAIRO if (! NILP (tip_frame) && XFRAME (tip_frame) == f - && ! FRAME_VISIBLE_P (f)) + && ! FRAME_VISIBLE_P (f) +#ifdef USE_GTK + && !NILP (Fframe_parameter (tip_frame, Qtooltip)) +#endif + ) return; if (! FRAME_CR_SURFACE (f)) @@ -9960,7 +9964,11 @@ 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 (NILP (tip_frame) || XFRAME (tip_frame) != f) + if (NILP (tip_frame) || XFRAME (tip_frame) != f +#ifdef USE_GTK + || NILP (Fframe_parameter (tip_frame, Qtooltip)) +#endif + ) { adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, |