diff options
| author | Glenn Morris | 2014-03-21 12:04:57 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-03-21 12:04:57 -0700 |
| commit | 5671dc515946c8a27b09d060bc34345d42a8fa6e (patch) | |
| tree | 54668c08879422e9c9d8c8c7a9e612d357971a49 /src | |
| parent | 26e91130ed0611a1074d0cac5880c065f9ba69c8 (diff) | |
| parent | 1e92a8a3aa7958ba699cd0430be4f23aff6c4c01 (diff) | |
| download | emacs-5671dc515946c8a27b09d060bc34345d42a8fa6e.tar.gz emacs-5671dc515946c8a27b09d060bc34345d42a8fa6e.zip | |
Merge from emacs-24; up to 2014-03-21T08:51:02Z!eliz@gnu.org
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/w32fns.c | 3 | ||||
| -rw-r--r-- | src/w32term.c | 48 | ||||
| -rw-r--r-- | src/xterm.c | 24 |
4 files changed, 60 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c3af54910a2..59e39614af8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | Fix regression introduced by patch for Bug#10500. | ||
| 4 | * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin. | ||
| 5 | * w32term.c (x_draw_image_relief): Likewise. | ||
| 6 | |||
| 7 | 2014-03-21 Martin Rudalics <rudalics@gmx.at> | ||
| 8 | |||
| 9 | * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't | ||
| 10 | constrain frame size in SW_SHOWMAXIMIZED case so we can truly | ||
| 11 | maximize a frame for odd default fonts. | ||
| 12 | |||
| 1 | 2014-03-21 Glenn Morris <rgm@gnu.org> | 13 | 2014-03-21 Glenn Morris <rgm@gnu.org> |
| 2 | 14 | ||
| 3 | * minibuf.c (history-length): Increase default from 30 to 100. | 15 | * minibuf.c (history-length): Increase default from 30 to 100. |
diff --git a/src/w32fns.c b/src/w32fns.c index a79135374ed..fff1e3efde6 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3805,7 +3805,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3805 | wp.length = sizeof (WINDOWPLACEMENT); | 3805 | wp.length = sizeof (WINDOWPLACEMENT); |
| 3806 | GetWindowPlacement (hwnd, &wp); | 3806 | GetWindowPlacement (hwnd, &wp); |
| 3807 | 3807 | ||
| 3808 | if (wp.showCmd != SW_SHOWMINIMIZED && (lppos->flags & SWP_NOSIZE) == 0) | 3808 | if (wp.showCmd != SW_SHOWMAXIMIZED && wp.showCmd != SW_SHOWMINIMIZED |
| 3809 | && (lppos->flags & SWP_NOSIZE) == 0) | ||
| 3809 | { | 3810 | { |
| 3810 | RECT rect; | 3811 | RECT rect; |
| 3811 | int wdiff; | 3812 | int wdiff; |
diff --git a/src/w32term.c b/src/w32term.c index 2981320e136..15b502b7c1b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1892,6 +1892,7 @@ static void | |||
| 1892 | x_draw_image_relief (struct glyph_string *s) | 1892 | x_draw_image_relief (struct glyph_string *s) |
| 1893 | { | 1893 | { |
| 1894 | int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; | 1894 | int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; |
| 1895 | int extra_x, extra_y; | ||
| 1895 | RECT r; | 1896 | RECT r; |
| 1896 | int x = s->x; | 1897 | int x = s->x; |
| 1897 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); | 1898 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); |
| @@ -1925,16 +1926,31 @@ x_draw_image_relief (struct glyph_string *s) | |||
| 1925 | 1926 | ||
| 1926 | x1 = x + s->slice.width - 1; | 1927 | x1 = x + s->slice.width - 1; |
| 1927 | y1 = y + s->slice.height - 1; | 1928 | y1 = y + s->slice.height - 1; |
| 1929 | |||
| 1930 | extra_x = extra_y = 0; | ||
| 1931 | if (s->face->id == TOOL_BAR_FACE_ID) | ||
| 1932 | { | ||
| 1933 | if (CONSP (Vtool_bar_button_margin) | ||
| 1934 | && INTEGERP (XCAR (Vtool_bar_button_margin)) | ||
| 1935 | && INTEGERP (XCDR (Vtool_bar_button_margin))) | ||
| 1936 | { | ||
| 1937 | extra_x = XINT (XCAR (Vtool_bar_button_margin)); | ||
| 1938 | extra_y = XINT (XCDR (Vtool_bar_button_margin)); | ||
| 1939 | } | ||
| 1940 | else if (INTEGERP (Vtool_bar_button_margin)) | ||
| 1941 | extra_x = extra_y = XINT (Vtool_bar_button_margin); | ||
| 1942 | } | ||
| 1943 | |||
| 1928 | top_p = bot_p = left_p = right_p = 0; | 1944 | top_p = bot_p = left_p = right_p = 0; |
| 1929 | 1945 | ||
| 1930 | if (s->slice.x == 0) | 1946 | if (s->slice.x == 0) |
| 1931 | x -= thick, left_p = 1; | 1947 | x -= thick + extra_x, left_p = 1; |
| 1932 | if (s->slice.y == 0) | 1948 | if (s->slice.y == 0) |
| 1933 | y -= thick, top_p = 1; | 1949 | y -= thick + extra_y, top_p = 1; |
| 1934 | if (s->slice.x + s->slice.width == s->img->width) | 1950 | if (s->slice.x + s->slice.width == s->img->width) |
| 1935 | x1 += thick, right_p = 1; | 1951 | x1 += thick + extra_x, right_p = 1; |
| 1936 | if (s->slice.y + s->slice.height == s->img->height) | 1952 | if (s->slice.y + s->slice.height == s->img->height) |
| 1937 | y1 += thick, bot_p = 1; | 1953 | y1 += thick + extra_y, bot_p = 1; |
| 1938 | 1954 | ||
| 1939 | x_setup_relief_colors (s); | 1955 | x_setup_relief_colors (s); |
| 1940 | get_glyph_string_clip_rect (s, &r); | 1956 | get_glyph_string_clip_rect (s, &r); |
| @@ -5651,21 +5667,11 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b | |||
| 5651 | if (!frame_resize_pixelwise) | 5667 | if (!frame_resize_pixelwise) |
| 5652 | { | 5668 | { |
| 5653 | /* If we don't resize frames pixelwise, round sizes to multiples | 5669 | /* If we don't resize frames pixelwise, round sizes to multiples |
| 5654 | of character sizes. Otherwise, Windows may clip our frame | 5670 | of character sizes here. Otherwise, when enforcing size hints |
| 5655 | rectangle at a character size boundary and we risk losing our | 5671 | while processing WM_WINDOWPOSCHANGING in w32_wnd_proc, we might |
| 5656 | mode line. Bug#16923 might be a consequence of this. | 5672 | clip our frame rectangle to a multiple of the frame's character |
| 5657 | 5673 | size and subsequently lose our mode line or scroll bar. | |
| 5658 | So far, this is a Windows specific problem; other toolkits may | 5674 | Bug#16923 could be one possible consequence of this. */ |
| 5659 | prefer to not resize the frame if the delta is not large enough | ||
| 5660 | (GTK) or resize the frame pixelwise as requested (Lucid, | ||
| 5661 | Motif). Windows just doesn't call us back (probably because of | ||
| 5662 | the size hint settings which it apparently interprets strictly) | ||
| 5663 | neither when the user tries to mouse-drag a frame border by, | ||
| 5664 | nor when calling `set-frame-size' with a delta of less than the | ||
| 5665 | canonical character size. If w32_enable_frame_resize_hack is | ||
| 5666 | enabled (which it now is by default) we'd then below resize the | ||
| 5667 | frame's root window in preparation of a WM_SIZE message to come | ||
| 5668 | which, however, is not going to happen. */ | ||
| 5669 | int unit_width = FRAME_COLUMN_WIDTH (f); | 5675 | int unit_width = FRAME_COLUMN_WIDTH (f); |
| 5670 | int unit_height = FRAME_LINE_HEIGHT (f); | 5676 | int unit_height = FRAME_LINE_HEIGHT (f); |
| 5671 | 5677 | ||
| @@ -5695,9 +5701,7 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b | |||
| 5695 | } | 5701 | } |
| 5696 | 5702 | ||
| 5697 | /* If w32_enable_frame_resize_hack is non-nil, immediately apply the | 5703 | /* If w32_enable_frame_resize_hack is non-nil, immediately apply the |
| 5698 | new pixel sizes to the frame and its subwindows. This approach is | 5704 | new pixel sizes to the frame and its subwindows. |
| 5699 | fragile because Windows might not honor the resize request issued | ||
| 5700 | by my_set_window_pos with a WM_SIZE message (see previous comment). | ||
| 5701 | 5705 | ||
| 5702 | Jason Rumney earlier refused to call change_frame_size right here | 5706 | Jason Rumney earlier refused to call change_frame_size right here |
| 5703 | with the following argument: | 5707 | with the following argument: |
diff --git a/src/xterm.c b/src/xterm.c index c7f56e1f1f2..31e1b9cb74f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2162,6 +2162,7 @@ static void | |||
| 2162 | x_draw_image_relief (struct glyph_string *s) | 2162 | x_draw_image_relief (struct glyph_string *s) |
| 2163 | { | 2163 | { |
| 2164 | int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; | 2164 | int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; |
| 2165 | int extra_x, extra_y; | ||
| 2165 | XRectangle r; | 2166 | XRectangle r; |
| 2166 | int x = s->x; | 2167 | int x = s->x; |
| 2167 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); | 2168 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); |
| @@ -2194,16 +2195,31 @@ x_draw_image_relief (struct glyph_string *s) | |||
| 2194 | 2195 | ||
| 2195 | x1 = x + s->slice.width - 1; | 2196 | x1 = x + s->slice.width - 1; |
| 2196 | y1 = y + s->slice.height - 1; | 2197 | y1 = y + s->slice.height - 1; |
| 2198 | |||
| 2199 | extra_x = extra_y = 0; | ||
| 2200 | if (s->face->id == TOOL_BAR_FACE_ID) | ||
| 2201 | { | ||
| 2202 | if (CONSP (Vtool_bar_button_margin) | ||
| 2203 | && INTEGERP (XCAR (Vtool_bar_button_margin)) | ||
| 2204 | && INTEGERP (XCDR (Vtool_bar_button_margin))) | ||
| 2205 | { | ||
| 2206 | extra_x = XINT (XCAR (Vtool_bar_button_margin)); | ||
| 2207 | extra_y = XINT (XCDR (Vtool_bar_button_margin)); | ||
| 2208 | } | ||
| 2209 | else if (INTEGERP (Vtool_bar_button_margin)) | ||
| 2210 | extra_x = extra_y = XINT (Vtool_bar_button_margin); | ||
| 2211 | } | ||
| 2212 | |||
| 2197 | top_p = bot_p = left_p = right_p = 0; | 2213 | top_p = bot_p = left_p = right_p = 0; |
| 2198 | 2214 | ||
| 2199 | if (s->slice.x == 0) | 2215 | if (s->slice.x == 0) |
| 2200 | x -= thick, left_p = 1; | 2216 | x -= thick + extra_x, left_p = 1; |
| 2201 | if (s->slice.y == 0) | 2217 | if (s->slice.y == 0) |
| 2202 | y -= thick, top_p = 1; | 2218 | y -= thick + extra_y, top_p = 1; |
| 2203 | if (s->slice.x + s->slice.width == s->img->width) | 2219 | if (s->slice.x + s->slice.width == s->img->width) |
| 2204 | x1 += thick, right_p = 1; | 2220 | x1 += thick + extra_x, right_p = 1; |
| 2205 | if (s->slice.y + s->slice.height == s->img->height) | 2221 | if (s->slice.y + s->slice.height == s->img->height) |
| 2206 | y1 += thick, bot_p = 1; | 2222 | y1 += thick + extra_y, bot_p = 1; |
| 2207 | 2223 | ||
| 2208 | x_setup_relief_colors (s); | 2224 | x_setup_relief_colors (s); |
| 2209 | get_glyph_string_clip_rect (s, &r); | 2225 | get_glyph_string_clip_rect (s, &r); |