[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116822: Truly maximize w32 frames with odd fonts
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-24 r116822: Truly maximize w32 frames with odd fonts and some texi fixes. |
Date: |
Fri, 21 Mar 2014 09:23:51 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116822
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-03-21 10:23:22 +0100
message:
Truly maximize w32 frames with odd fonts and some texi fixes.
* w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
constrain frame size in SW_SHOWMAXIMIZED case so we can truly
maximize a frame for odd default fonts.
* frames.texi (Size and Position): In `frame-resize-pixelwise'
description drop remark about frame maximization.
* windows.texi (Display Action Functions): Add description for
`display-buffer-no-window' and explain use of `allow-no-window'
alist entries.
modified:
doc/lispref/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6155
doc/lispref/frames.texi
frames.texi-20091113204419-o5vbwnq5f7feedwu-6180
doc/lispref/windows.texi
windows.texi-20091113204419-o5vbwnq5f7feedwu-6224
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32fns.c w32fns.c-20091113204419-o5vbwnq5f7feedwu-945
src/w32term.c w32term.c-20091113204419-o5vbwnq5f7feedwu-950
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2014-03-21 07:06:55 +0000
+++ b/doc/lispref/ChangeLog 2014-03-21 09:23:22 +0000
@@ -1,3 +1,11 @@
+2014-03-21 Martin Rudalics <address@hidden>
+
+ * frames.texi (Size and Position): In `frame-resize-pixelwise'
+ description drop remark about frame maximization.
+ * windows.texi (Display Action Functions): Add description for
+ `display-buffer-no-window' and explain use of `allow-no-window'
+ alist entries.
+
2014-03-21 Glenn Morris <address@hidden>
* commands.texi (Defining Commands): Copyedit re `interactive-only'.
=== modified file 'doc/lispref/frames.texi'
--- a/doc/lispref/frames.texi 2014-03-18 01:19:03 +0000
+++ b/doc/lispref/frames.texi 2014-03-21 09:23:22 +0000
@@ -1163,10 +1163,7 @@
always done character-wise. Calling @code{set-frame-size} (see below)
with arguments that do not specify the frame size as an integer multiple
of its character size may be, however, either ignored or cause a
-rounding (GTK+, Windows) or get accepted (Lucid, Motif). This also
-means that with some toolkits and a display whose size is not an
-integral multiple of your default font, you may have to set this to
address@hidden in order to fully maximize a frame.
+rounding (GTK+, Windows) or get accepted (Lucid, Motif).
@end defopt
@defun set-frame-size frame width height pixelwise
=== modified file 'doc/lispref/windows.texi'
--- a/doc/lispref/windows.texi 2014-03-18 01:19:03 +0000
+++ b/doc/lispref/windows.texi 2014-03-21 09:23:22 +0000
@@ -2280,6 +2280,15 @@
windows are dedicated to another buffer (@pxref{Dedicated Windows}).
@end defun
address@hidden display-buffer-no-window buffer alist
+If @var{alist} has a address@hidden @code{allow-no-window} entry, then
+this function does not display @code{buffer}. This allows to override
+the default action and avoid displaying the buffer. It is assumed that
+when the caller specifies a address@hidden @code{allow-no-window} value
+it can handle a @code{nil} value returned from @code{display-buffer} in
+this case.
address@hidden defun
+
To illustrate the use of action functions, consider the following
example.
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2014-03-18 21:17:05 +0000
+++ b/etc/NEWS 2014-03-21 09:23:22 +0000
@@ -210,6 +210,7 @@
*** New hooks `focus-in-hook', `focus-out-hook'.
These are normal hooks run when an Emacs frame gains or loses input focus.
++++
*** Emacs can now change frame sizes in units of pixels, rather than
text rows or columns. When maximizing a frame or making it fullscreen,
remaining extra pixels are no longer given to the minibuffer, the rightmost
@@ -218,6 +219,7 @@
is non-nil, all frame size changes happen pixelwise and set the
corresponding size hints for the window manager.
++++
*** Emacs can now change window sizes in units of pixels.
Mouse-dragging a mode line or window divider now changes the size of
adjacent windows pixelwise. If the new option `window-resize-pixelwise'
@@ -231,6 +233,7 @@
count partially visible lines or columns if called with a nil PIXELWISE
argument.
++++
*** Emacs can now draw dividers between adjacent windows. To put
dividers between side-by-side/vertically stacked windows customize the
frame parameters `right-divider-width' and `bottom-divider-width' to
@@ -241,25 +244,30 @@
two are useful to provide a 3D effect, or to better distinguish dividers
from surrounding display objects.
++++
*** New functions are provided to return the pixel sizes of window
components, namely `window-scroll-bar-width', `window-mode-line-height'
`window-header-line-height', `window-right-divider-width' and
`window-bottom-divider-width'.
++++
*** The new function `window-text-pixel-size' returns the size of the
text of a window's buffer in pixels. This allows functions like
`fit-frame-to-buffer' and `fit-window-to-buffer' to accurately fit a
window to its buffer as it will be displayed.
++++
*** `fit-window-to-buffer' can now resize windows in both dimensions.
This behavior is controlled by the new option
`fit-window-to-buffer-horizontally'. The new option
`fit-frame-to-buffer' allows to fit the window's frame to its buffer.
++++
*** `fit-frame-to-buffer' now fits frames in both dimensions. The new
options `fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes'
control the size of the frame and its position on screen.
+---
*** Temp Buffer Resize Mode can now adjust height and width of windows
and frames. `temp-buffer-resize-mode' is now able to adjust the height
and the width of a window displaying a temporary buffer. The new option
@@ -298,9 +306,11 @@
`display-buffer' choose or make a window at the bottom of the selected
frame.
++++
*** New display action function `display-buffer-no-window' to not
display the buffer in a window.
++++
*** New display action alist entry `allow-no-window' to indicate the
caller of `display-buffer' is ready to handle the case of not
displaying the buffer in a window.
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-03-21 00:10:29 +0000
+++ b/src/ChangeLog 2014-03-21 09:23:22 +0000
@@ -1,3 +1,9 @@
+2014-03-21 Martin Rudalics <address@hidden>
+
+ * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
+ constrain frame size in SW_SHOWMAXIMIZED case so we can truly
+ maximize a frame for odd default fonts.
+
2014-03-20 Paul Eggert <address@hidden>
* doc.c (store_function_docstring): Fix pointer signedness mismatch.
=== modified file 'src/w32fns.c'
--- a/src/w32fns.c 2014-03-19 17:43:18 +0000
+++ b/src/w32fns.c 2014-03-21 09:23:22 +0000
@@ -3805,7 +3805,8 @@
wp.length = sizeof (WINDOWPLACEMENT);
GetWindowPlacement (hwnd, &wp);
- if (wp.showCmd != SW_SHOWMINIMIZED && (lppos->flags & SWP_NOSIZE) == 0)
+ if (wp.showCmd != SW_SHOWMAXIMIZED && wp.showCmd != SW_SHOWMINIMIZED
+ && (lppos->flags & SWP_NOSIZE) == 0)
{
RECT rect;
int wdiff;
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2014-03-14 10:38:46 +0000
+++ b/src/w32term.c 2014-03-21 09:23:22 +0000
@@ -5651,21 +5651,11 @@
if (!frame_resize_pixelwise)
{
/* If we don't resize frames pixelwise, round sizes to multiples
- of character sizes. Otherwise, Windows may clip our frame
- rectangle at a character size boundary and we risk losing our
- mode line. Bug#16923 might be a consequence of this.
-
- So far, this is a Windows specific problem; other toolkits may
- prefer to not resize the frame if the delta is not large enough
- (GTK) or resize the frame pixelwise as requested (Lucid,
- Motif). Windows just doesn't call us back (probably because of
- the size hint settings which it apparently interprets strictly)
- neither when the user tries to mouse-drag a frame border by,
- nor when calling `set-frame-size' with a delta of less than the
- canonical character size. If w32_enable_frame_resize_hack is
- enabled (which it now is by default) we'd then below resize the
- frame's root window in preparation of a WM_SIZE message to come
- which, however, is not going to happen. */
+ 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. */
int unit_width = FRAME_COLUMN_WIDTH (f);
int unit_height = FRAME_LINE_HEIGHT (f);
@@ -5695,9 +5685,7 @@
}
/* If w32_enable_frame_resize_hack is non-nil, immediately apply the
- new pixel sizes to the frame and its subwindows. This approach is
- fragile because Windows might not honor the resize request issued
- by my_set_window_pos with a WM_SIZE message (see previous comment).
+ new pixel sizes to the frame and its subwindows.
Jason Rumney earlier refused to call change_frame_size right here
with the following argument:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116822: Truly maximize w32 frames with odd fonts and some texi fixes.,
Martin Rudalics <=