[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116849: Refine previous fix of x_set_window_size
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-24 r116849: Refine previous fix of x_set_window_size to handle Bug#17077. |
Date: |
Mon, 24 Mar 2014 08:50:30 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116849
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-03-24 09:50:17 +0100
message:
Refine previous fix of x_set_window_size to handle Bug#17077.
* w32term.c (x_set_window_size): Refine fix from 2014-03-14
(Bug#17077).
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32term.c w32term.c-20091113204419-o5vbwnq5f7feedwu-950
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-03-23 23:38:40 +0000
+++ b/src/ChangeLog 2014-03-24 08:50:17 +0000
@@ -1,3 +1,8 @@
+2014-03-24 Martin Rudalics <address@hidden>
+
+ * w32term.c (x_set_window_size): Refine fix from 2014-03-14
+ (Bug#17077).
+
2014-03-23 Glenn Morris <address@hidden>
* fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2014-03-21 10:14:10 +0000
+++ b/src/w32term.c 2014-03-24 08:50:17 +0000
@@ -5653,30 +5653,41 @@
compute_fringe_widths (f, 0);
- if (pixelwise)
+ if (frame_resize_pixelwise)
{
- pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
- pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height);
+ if (pixelwise)
+ {
+ pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
+ pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height);
+ }
+ else
+ {
+ pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width);
+ pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height);
+ }
}
else
{
- pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width);
- pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height);
- }
-
- if (!frame_resize_pixelwise)
- {
/* If we don't resize frames pixelwise, round sizes to multiples
of character sizes here. Otherwise, when enforcing size hints
while processing WM_WINDOWPOSCHANGING in w32_wnd_proc, we might
clip our frame rectangle to a multiple of the frame's character
size and subsequently lose our mode line or scroll bar.
- Bug#16923 could be one possible consequence of this. */
+ Bug#16923 could be one possible consequence of this. Carefully
+ reverse-engineer what WM_WINDOWPOSCHANGING does here since
+ otherwise we might make our frame too small, see Bug#17077. */
int unit_width = FRAME_COLUMN_WIDTH (f);
int unit_height = FRAME_LINE_HEIGHT (f);
- pixelwidth = (pixelwidth / unit_width) * unit_width;
- pixelheight = (pixelheight / unit_height) * unit_height;
+ pixelwidth = (((((pixelwise ? width : (width * FRAME_COLUMN_WIDTH (f)))
+ + FRAME_TOTAL_FRINGE_WIDTH (f))
+ / unit_width) * unit_width)
+ + FRAME_SCROLL_BAR_AREA_WIDTH (f)
+ + 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
+
+ pixelheight = ((((pixelwise ? height : (height * FRAME_LINE_HEIGHT (f)))
+ / unit_height) * unit_height)
+ + 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
}
f->win_gravity = NorthWestGravity;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116849: Refine previous fix of x_set_window_size to handle Bug#17077.,
Martin Rudalics <=