diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-11 09:07:16 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-11 09:07:16 -0700 |
commit | 435da5d2955ce35be4785b7d46566ed9b42ea9fb (patch) | |
tree | 581fac64374d0997e53bba0ae3cbd4968fa55121 /src/xwidget.c | |
parent | 7c9e6254bbac949aa5493ab1741d2523a7d595b7 (diff) | |
parent | b134c206bc07dbbb9e74b3be2db269c4f1196e40 (diff) | |
download | emacs-435da5d2955ce35be4785b7d46566ed9b42ea9fb.tar.gz emacs-435da5d2955ce35be4785b7d46566ed9b42ea9fb.tar.bz2 emacs-435da5d2955ce35be4785b7d46566ed9b42ea9fb.zip |
Merge from origin/emacs-25
b134c20 Sync with gnulib
bb30fa9 Fix last change on 2016-01-02
488a72f ; Spelling fixes
9b1aab9 Port run-prolog EMACS to SWI-Prolog 7.2.3
0e7bcec Avoid crashes due to unreasonably large or small text scaling
85f257c Improve documentation of 'with-eval-after-load'
668c7bc Improve handling of non-ASCII characters in Git log messages
b570769 Remove undefined behavior in OS X dumper.
97211f3 Fix clipping of xwidgets
e87fbc0 Improve Lisp-level documentation of tooltips
9f1786e Faces names should not end in "-face".
3283271 * src/xsmfns.c (syms_of_xsmfns): Remove stray "s in doc strings.
a1f221b Comint and compile no longer set EMACS
5c28890 * lisp/subr.el (read-key): Don't let the prompt linger (bug#2...
a75b9a6 Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emac...
c93ae7a Allow to customize names of executables used by grep.el
f6497c6 Set locale encoding to UTF-8 when run from OS X GUI.
7ad1d07 Avoid signaling errors in 'M-n' at the 'C-x C-f' prompt
a3f1ac2 Avoid infinite loop in 'studlify-word'
f36df4b Don’t recommend obsolete EMACS env var
fb0b531 * lisp/emacs-lisp/package.el: Change from a few days ago need...
Diffstat (limited to 'src/xwidget.c')
-rw-r--r-- | src/xwidget.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index 8ff4c23b1f2..7e96307bdd8 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -578,24 +578,22 @@ x_draw_xwidget_glyph_string (struct glyph_string *s) other time to know things like window placement etc. */ xv = xwidget_init_view (xww, s, x, y); - /* Calculate clipping, which is used for all manner of onscreen - xwidget views. Each widget border can get clipped by other emacs - objects so there are four clipping variables. */ - clip_right = - min (xww->width, - WINDOW_RIGHT_EDGE_X (s->w) - x - - WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w) - - WINDOW_RIGHT_FRINGE_WIDTH (s->w)); - clip_left = - max (0, - WINDOW_LEFT_EDGE_X (s->w) - x + - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (s->w) + - WINDOW_LEFT_FRINGE_WIDTH (s->w)); - - clip_bottom = - min (xww->height, - WINDOW_BOTTOM_EDGE_Y (s->w) - WINDOW_MODE_LINE_HEIGHT (s->w) - y); - clip_top = max (0, WINDOW_TOP_EDGE_Y (s->w) - y); + int text_area_x, text_area_y, text_area_width, text_area_height; + + window_box (s->w, + ANY_AREA, + &text_area_x, + &text_area_y, + &text_area_width, + &text_area_height); + clip_right = min (xww->width, + text_area_width); + clip_left = max (0, + text_area_x); + + clip_bottom = min (xww->height, + text_area_height); + clip_top = max (0, text_area_y); /* We are concerned with movement of the onscreen area. The area might sit still when the widget actually moves. This happens |