diff options
| author | Juanma Barranquero | 2014-04-02 17:14:50 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2014-04-02 17:14:50 +0200 |
| commit | 09aba8153a8297e415477dbfa9a8c7e999fb3457 (patch) | |
| tree | 1b15e57f5cb0d6fb4cec8e2ca03747d9e7abf163 /src | |
| parent | af1a69f4d17a482c359d98c00ef86fac835b5fac (diff) | |
| parent | ffcd5669d6a71dd9450a9c45b2ea67d3ddc7c988 (diff) | |
| download | emacs-09aba8153a8297e415477dbfa9a8c7e999fb3457.tar.gz emacs-09aba8153a8297e415477dbfa9a8c7e999fb3457.zip | |
Merge from emacs-24; up to 2014-03-28T01:39:30Z!rgm@gnu.org
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 19 | ||||
| -rw-r--r-- | src/conf_post.h | 4 | ||||
| -rw-r--r-- | src/frame.c | 41 | ||||
| -rw-r--r-- | src/xterm.c | 32 |
4 files changed, 63 insertions, 33 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2f028c48247..6638325a434 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2014-04-02 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar | ||
| 4 | width from font width (Bug#17163). | ||
| 5 | |||
| 6 | * frame.c (x_set_frame_parameters): Calculate default values of | ||
| 7 | new frame sizes only after all other frame parameters have been | ||
| 8 | processed (Bug#17142). | ||
| 9 | |||
| 10 | 2014-04-02 Ken Brown <kbrown@cornell.edu> | ||
| 11 | |||
| 12 | * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000. | ||
| 13 | (Bug#17112) | ||
| 14 | |||
| 15 | 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 16 | |||
| 17 | * xterm.c (x_draw_image_glyph_string): Adjust image background | ||
| 18 | width accordingly when its x position is adjusted. (Bug#17115) | ||
| 19 | |||
| 1 | 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru> | 20 | 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 21 | ||
| 3 | * font.c (font_list_entities): Do not add empty vector to font cache. | 22 | * font.c (font_list_entities): Do not add empty vector to font cache. |
diff --git a/src/conf_post.h b/src/conf_post.h index 7419b53c5df..80d561090ed 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -161,6 +161,10 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 161 | #endif | 161 | #endif |
| 162 | #endif | 162 | #endif |
| 163 | 163 | ||
| 164 | #ifdef CYGWIN | ||
| 165 | #define SYSTEM_PURESIZE_EXTRA 10000 | ||
| 166 | #endif | ||
| 167 | |||
| 164 | #if defined HAVE_NTGUI && !defined DebPrint | 168 | #if defined HAVE_NTGUI && !defined DebPrint |
| 165 | # ifdef EMACSDEBUG | 169 | # ifdef EMACSDEBUG |
| 166 | extern void _DebPrint (const char *fmt, ...); | 170 | extern void _DebPrint (const char *fmt, ...); |
diff --git a/src/frame.c b/src/frame.c index 055ce36ff4f..c5a2f6ab245 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2795,6 +2795,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2795 | set them both at once. So we wait until we've looked at the | 2795 | set them both at once. So we wait until we've looked at the |
| 2796 | entire list before we set them. */ | 2796 | entire list before we set them. */ |
| 2797 | int width, height; | 2797 | int width, height; |
| 2798 | bool width_change = 0, height_change = 0; | ||
| 2798 | 2799 | ||
| 2799 | /* Same here. */ | 2800 | /* Same here. */ |
| 2800 | Lisp_Object left, top; | 2801 | Lisp_Object left, top; |
| @@ -2810,7 +2811,6 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2810 | #ifdef HAVE_X_WINDOWS | 2811 | #ifdef HAVE_X_WINDOWS |
| 2811 | bool icon_left_no_change = 0, icon_top_no_change = 0; | 2812 | bool icon_left_no_change = 0, icon_top_no_change = 0; |
| 2812 | #endif | 2813 | #endif |
| 2813 | bool size_changed = 0; | ||
| 2814 | struct gcpro gcpro1, gcpro2; | 2814 | struct gcpro gcpro1, gcpro2; |
| 2815 | 2815 | ||
| 2816 | i = 0; | 2816 | i = 0; |
| @@ -2844,18 +2844,6 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2844 | top = left = Qunbound; | 2844 | top = left = Qunbound; |
| 2845 | icon_left = icon_top = Qunbound; | 2845 | icon_left = icon_top = Qunbound; |
| 2846 | 2846 | ||
| 2847 | /* Provide default values for HEIGHT and WIDTH. */ | ||
| 2848 | width = (f->new_width | ||
| 2849 | ? (f->new_pixelwise | ||
| 2850 | ? f->new_width | ||
| 2851 | : (f->new_width * FRAME_COLUMN_WIDTH (f))) | ||
| 2852 | : FRAME_TEXT_WIDTH (f)); | ||
| 2853 | height = (f->new_height | ||
| 2854 | ? (f->new_pixelwise | ||
| 2855 | ? f->new_height | ||
| 2856 | : (f->new_height * FRAME_LINE_HEIGHT (f))) | ||
| 2857 | : FRAME_TEXT_HEIGHT (f)); | ||
| 2858 | |||
| 2859 | /* Process foreground_color and background_color before anything else. | 2847 | /* Process foreground_color and background_color before anything else. |
| 2860 | They are independent of other properties, but other properties (e.g., | 2848 | They are independent of other properties, but other properties (e.g., |
| 2861 | cursor_color) are dependent upon them. */ | 2849 | cursor_color) are dependent upon them. */ |
| @@ -2897,12 +2885,12 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2897 | 2885 | ||
| 2898 | if (EQ (prop, Qwidth) && RANGED_INTEGERP (0, val, INT_MAX)) | 2886 | if (EQ (prop, Qwidth) && RANGED_INTEGERP (0, val, INT_MAX)) |
| 2899 | { | 2887 | { |
| 2900 | size_changed = 1; | 2888 | width_change = 1; |
| 2901 | width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; | 2889 | width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; |
| 2902 | } | 2890 | } |
| 2903 | else if (EQ (prop, Qheight) && RANGED_INTEGERP (0, val, INT_MAX)) | 2891 | else if (EQ (prop, Qheight) && RANGED_INTEGERP (0, val, INT_MAX)) |
| 2904 | { | 2892 | { |
| 2905 | size_changed = 1; | 2893 | height_change = 1; |
| 2906 | height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); | 2894 | height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); |
| 2907 | } | 2895 | } |
| 2908 | else if (EQ (prop, Qtop)) | 2896 | else if (EQ (prop, Qtop)) |
| @@ -2989,11 +2977,30 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2989 | 2977 | ||
| 2990 | XSETFRAME (frame, f); | 2978 | XSETFRAME (frame, f); |
| 2991 | 2979 | ||
| 2992 | if (size_changed | 2980 | if ((width_change || height_change) |
| 2993 | && (width != FRAME_TEXT_WIDTH (f) | 2981 | && (width != FRAME_TEXT_WIDTH (f) |
| 2994 | || height != FRAME_TEXT_HEIGHT (f) | 2982 | || height != FRAME_TEXT_HEIGHT (f) |
| 2995 | || f->new_height || f->new_width)) | 2983 | || f->new_height || f->new_width)) |
| 2996 | Fset_frame_size (frame, make_number (width), make_number (height), Qt); | 2984 | { |
| 2985 | /* If necessary provide default values for HEIGHT and WIDTH. Do | ||
| 2986 | that here since otherwise a size change implied by an | ||
| 2987 | intermittent font change may get lost as in Bug#17142. */ | ||
| 2988 | if (!width_change) | ||
| 2989 | width = (f->new_width | ||
| 2990 | ? (f->new_pixelwise | ||
| 2991 | ? f->new_width | ||
| 2992 | : (f->new_width * FRAME_COLUMN_WIDTH (f))) | ||
| 2993 | : FRAME_TEXT_WIDTH (f)); | ||
| 2994 | |||
| 2995 | if (!height_change) | ||
| 2996 | height = (f->new_height | ||
| 2997 | ? (f->new_pixelwise | ||
| 2998 | ? f->new_height | ||
| 2999 | : (f->new_height * FRAME_LINE_HEIGHT (f))) | ||
| 3000 | : FRAME_TEXT_HEIGHT (f)); | ||
| 3001 | |||
| 3002 | Fset_frame_size (frame, make_number (width), make_number (height), Qt); | ||
| 3003 | } | ||
| 2997 | 3004 | ||
| 2998 | if ((!NILP (left) || !NILP (top)) | 3005 | if ((!NILP (left) || !NILP (top)) |
| 2999 | && ! (left_no_change && top_no_change) | 3006 | && ! (left_no_change && top_no_change) |
diff --git a/src/xterm.c b/src/xterm.c index 1c0aea01f6e..b0d64dfeb7f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2399,15 +2399,19 @@ x_draw_image_glyph_string (struct glyph_string *s) | |||
| 2399 | { | 2399 | { |
| 2400 | int x = s->x; | 2400 | int x = s->x; |
| 2401 | int y = s->y; | 2401 | int y = s->y; |
| 2402 | int width = s->background_width; | ||
| 2402 | 2403 | ||
| 2403 | if (s->first_glyph->left_box_line_p | 2404 | if (s->first_glyph->left_box_line_p |
| 2404 | && s->slice.x == 0) | 2405 | && s->slice.x == 0) |
| 2405 | x += box_line_hwidth; | 2406 | { |
| 2407 | x += box_line_hwidth; | ||
| 2408 | width -= box_line_hwidth; | ||
| 2409 | } | ||
| 2406 | 2410 | ||
| 2407 | if (s->slice.y == 0) | 2411 | if (s->slice.y == 0) |
| 2408 | y += box_line_vwidth; | 2412 | y += box_line_vwidth; |
| 2409 | 2413 | ||
| 2410 | x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); | 2414 | x_draw_glyph_string_bg_rect (s, x, y, width, height); |
| 2411 | } | 2415 | } |
| 2412 | 2416 | ||
| 2413 | s->background_filled_p = 1; | 2417 | s->background_filled_p = 1; |
| @@ -7775,20 +7779,16 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 7775 | 7779 | ||
| 7776 | compute_fringe_widths (f, 1); | 7780 | compute_fringe_widths (f, 1); |
| 7777 | 7781 | ||
| 7782 | /* Compute character columns occupied by scrollbar. | ||
| 7783 | |||
| 7784 | Don't do things differently for non-toolkit scrollbars | ||
| 7785 | (Bug#17163). */ | ||
| 7778 | unit = FRAME_COLUMN_WIDTH (f); | 7786 | unit = FRAME_COLUMN_WIDTH (f); |
| 7779 | #ifdef USE_TOOLKIT_SCROLL_BARS | 7787 | if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) |
| 7780 | /* The width of a toolkit scrollbar does not change with the new | 7788 | FRAME_CONFIG_SCROLL_BAR_COLS (f) |
| 7781 | font but we have to calculate the number of columns it occupies | 7789 | = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; |
| 7782 | anew. */ | 7790 | else |
| 7783 | FRAME_CONFIG_SCROLL_BAR_COLS (f) | 7791 | FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; |
| 7784 | = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; | ||
| 7785 | #else | ||
| 7786 | /* The width of a non-toolkit scrollbar is at least 14 pixels and a | ||
| 7787 | multiple of the frame's character width. */ | ||
| 7788 | FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; | ||
| 7789 | FRAME_CONFIG_SCROLL_BAR_WIDTH (f) | ||
| 7790 | = FRAME_CONFIG_SCROLL_BAR_COLS (f) * unit; | ||
| 7791 | #endif | ||
| 7792 | 7792 | ||
| 7793 | if (FRAME_X_WINDOW (f) != 0) | 7793 | if (FRAME_X_WINDOW (f) != 0) |
| 7794 | { | 7794 | { |
| @@ -7994,7 +7994,7 @@ xim_close_dpy (struct x_display_info *dpyinfo) | |||
| 7994 | { | 7994 | { |
| 7995 | #ifdef HAVE_X11R6_XIM | 7995 | #ifdef HAVE_X11R6_XIM |
| 7996 | struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data; | 7996 | struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data; |
| 7997 | 7997 | ||
| 7998 | if (dpyinfo->display) | 7998 | if (dpyinfo->display) |
| 7999 | { | 7999 | { |
| 8000 | Bool ret = XUnregisterIMInstantiateCallback | 8000 | Bool ret = XUnregisterIMInstantiateCallback |