unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19048: Frame height decreases at Emacs start
@ 2014-11-13 21:01 Angelo Graziosi
  2014-12-31 18:35 ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-13 21:01 UTC (permalink / raw)
  To: 19048

With current master, each time I start Emacs, the frame decreases its 
height (about 1 line of text). After few times one starts Emacs, one 
have to resize the height otherwise it is too short.

I see this with my Cygwin build (--with-w32)... I wonder if this issue 
is related to the other I see on OSX [*]...


Ciao,
  Angelo.

---
[*] http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00582.html





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 11:37     ` martin rudalics
@ 2014-11-16 13:02       ` Angelo Graziosi
  2014-11-16 13:54         ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-16 13:02 UTC (permalink / raw)
  To: rudalics, 19048

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]


Il 16/11/2014 12:37, martin rudalics ha scritto:
>  >> (you can use the function `window--dump-frame' for that) and what the
>  >> height stored by `desktop-save' is.  I suppose this is somewhere in a
>  >> cons whose car is something like `height' or `frame-height' or the
> like.
>  >
>  > I am afraid, I wasn't able to use that function.. How to evaluate it?
> I tried a few command but they didn't work.
>
> M-: (window--dump-frame)
>

OK. I removed the desktop and history files, than I started Emacs with 
this simple init file:

$ cat init.el
;; Instead to save in ~/.emacs.desktop
(setq desktop-base-file-name "~/.emacs.d/desktop")

;; Save desktop
(desktop-save-mode t)


I did M-: (window--dump-frame), saved the window-frame-dump in 
window-frame-dump-00.txt file. Then I closed Emacs saving the desktop at 
the request.

Restarted Emacs repeating the M-: (window--dump-frame) command and saved 
the window-frame-dump in window-frame-dump-01.txt file.

Repeating the same saving in window-frame-dump-02.txt file. These files 
are in the attached tar-ball.


Ciao,
  Angelo.


[-- Attachment #2: window-frame-dump.tar.gz --]
[-- Type: application/x-gzip, Size: 615 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 13:02       ` bug#19048: Frame height decreases at Emacs start Angelo Graziosi
@ 2014-11-16 13:54         ` martin rudalics
  2014-11-16 14:16           ` Angelo Graziosi
  0 siblings, 1 reply; 22+ messages in thread
From: martin rudalics @ 2014-11-16 13:54 UTC (permalink / raw)
  To: angelo.graziosi, 19048

 > OK. I removed the desktop and history files, than I started Emacs with this simple init file:
 >
 > $ cat init.el
 > ;; Instead to save in ~/.emacs.desktop
 > (setq desktop-base-file-name "~/.emacs.d/desktop")
 >
 > ;; Save desktop
 > (desktop-save-mode t)
 >
 >
 > I did M-: (window--dump-frame), saved the window-frame-dump in window-frame-dump-00.txt file. Then I closed Emacs saving the desktop at the request.
 >
 > Restarted Emacs repeating the M-: (window--dump-frame) command and saved the window-frame-dump in window-frame-dump-01.txt file.
 >
 > Repeating the same saving in window-frame-dump-02.txt file. These files are in the attached tar-ball.

Fine.  Just that now I can't relate this to the saved desktop.  To avoid
an incorrect guess please do the following:

(1) Save the result of `window--dump-frame' in window-frame-dump-00.

(2) Exit Emacs.

(3) Save the contents of you desktop file in desktop-00.

(4) Restart Emacs.

(5) Save the result of `window--dump-frame' in window-frame-dump-01.

And please also try to do the same with `tool-bar-mode' turned off.  I
suspect that restoring frames has problems reestablishing the correct
height of the tool bar.

Thanks, martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 13:54         ` martin rudalics
@ 2014-11-16 14:16           ` Angelo Graziosi
  2014-11-16 14:22             ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-16 14:16 UTC (permalink / raw)
  To: rudalics, 19048

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

Il 16/11/2014 14:54, martin rudalics ha scritto:
>
> Fine.  Just that now I can't relate this to the saved desktop.  To avoid
> an incorrect guess please do the following:
>
> (1) Save the result of `window--dump-frame' in window-frame-dump-00.
>
> (2) Exit Emacs.
>
> (3) Save the contents of you desktop file in desktop-00.
>
> (4) Restart Emacs.
>
> (5) Save the result of `window--dump-frame' in window-frame-dump-01.
>
> And please also try to do the same with `tool-bar-mode' turned off.  I
> suspect that restoring frames has problems reestablishing the correct
> height of the tool bar.

Attached the result. As before, I used the same minimal init.el file and 
have removed the desktop file before to repeat with `tool-bar-mode' 
turned off (no-TB)


Ciao,
Angelo.

[-- Attachment #2: window-frame-dump2.tar.gz --]
[-- Type: application/x-gzip, Size: 1842 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 14:16           ` Angelo Graziosi
@ 2014-11-16 14:22             ` martin rudalics
  2014-11-16 14:33               ` Angelo Graziosi
  0 siblings, 1 reply; 22+ messages in thread
From: martin rudalics @ 2014-11-16 14:22 UTC (permalink / raw)
  To: angelo.graziosi, 19048

 > Attached the result. As before, I used the same minimal init.el file and have removed the desktop file before to repeat with `tool-bar-mode' turned off (no-TB)

So IIUC the problem doesn't happen without the tool bar.  Right?

martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 14:22             ` martin rudalics
@ 2014-11-16 14:33               ` Angelo Graziosi
  2014-11-16 14:42                 ` Angelo Graziosi
  2014-11-16 15:14                 ` martin rudalics
  0 siblings, 2 replies; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-16 14:33 UTC (permalink / raw)
  To: rudalics, 19048



Il 16/11/2014 15:22, martin rudalics ha scritto:
>  > Attached the result. As before, I used the same minimal init.el file
> and have removed the desktop file before to repeat with `tool-bar-mode'
> turned off (no-TB)
>
> So IIUC the problem doesn't happen without the tool bar.  Right?

Confirmed!





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 14:33               ` Angelo Graziosi
@ 2014-11-16 14:42                 ` Angelo Graziosi
  2014-11-16 15:14                 ` martin rudalics
  1 sibling, 0 replies; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-16 14:42 UTC (permalink / raw)
  To: rudalics, 19048

Hi Martin,

Il 16/11/2014 15:33, Angelo Graziosi ha scritto:
>
>
> Il 16/11/2014 15:22, martin rudalics ha scritto:
>>  > Attached the result. As before, I used the same minimal init.el file
>> and have removed the desktop file before to repeat with `tool-bar-mode'
>> turned off (no-TB)
>>
>> So IIUC the problem doesn't happen without the tool bar.  Right?
>
> Confirmed!

just for completeness...

Here: http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00582.html

I flagged a similar issue on OSX which has been fixed:

http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00582.html

I don't know if this could be useful also for you...

Ciao,
  Angelo.





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 14:33               ` Angelo Graziosi
  2014-11-16 14:42                 ` Angelo Graziosi
@ 2014-11-16 15:14                 ` martin rudalics
  2014-11-16 18:05                   ` Angelo Graziosi
  2014-11-17 10:56                   ` Angelo Graziosi
  1 sibling, 2 replies; 22+ messages in thread
From: martin rudalics @ 2014-11-16 15:14 UTC (permalink / raw)
  To: angelo.graziosi, 19048

 >> So IIUC the problem doesn't happen without the tool bar.  Right?
 >
 > Confirmed!

Damn!  In a normal frame with tool bar, please evaluate the following
three forms

(tool-bar-height nil t)
(tool-bar-height)
(frame-parameter nil 'tool-bar-lines)

and tell me what they give.  I fail to understand why `tool-bar-lines'
is 2 in your saved desktop.

And while you're there: In a saved desktop find the (tool-bar-lines . 2)
entry, replace it with (tool-bar-lines . 3), fire another instance of
Emacs and tell me whether the frame height decreased.

martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 15:14                 ` martin rudalics
@ 2014-11-16 18:05                   ` Angelo Graziosi
  2014-11-17 10:56                   ` Angelo Graziosi
  1 sibling, 0 replies; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-16 18:05 UTC (permalink / raw)
  To: rudalics, 19048



Il 16/11/2014 16:14, martin rudalics ha scritto:
>  >> So IIUC the problem doesn't happen without the tool bar.  Right?
>  >
>  > Confirmed!
>
> Damn!  In a normal frame with tool bar, please evaluate the following
> three forms
>
> (tool-bar-height nil t)
> (tool-bar-height)
> (frame-parameter nil 'tool-bar-lines)

Always with a minimal init.el, I have

M-: (tool-bar-height nil t)
36 (#o44, #x24, ?$)

M-: (tool-bar-height)
3 (#o3, #x3, ?\C-c)


M-: (frame-parameter nil 'tool-bar-lines)
3 (#o3, #x3, ?\C-c)


>
> and tell me what they give.  I fail to understand why `tool-bar-lines'
> is 2 in your saved desktop.

?? No, Martin I have : (tool-bar-lines . 3)

(the same on desktop-00 file I sent previously, and (tool-bar-lines . 0) 
in desktop-no-TB-00).

I havd done many tries: Emacs frame decreases as described but 
(tool-bar-lines . 3) NOT (tool-bar-lines . 2). So I am not sure how to 
do the test you require... :(

> And while you're there: In a saved desktop find the (tool-bar-lines . 2)
> entry, replace it with (tool-bar-lines . 3), fire another instance of
> Emacs and tell me whether the frame height decreased.
>
> martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-16 15:14                 ` martin rudalics
  2014-11-16 18:05                   ` Angelo Graziosi
@ 2014-11-17 10:56                   ` Angelo Graziosi
  2014-11-17 12:51                     ` Angelo Graziosi
  1 sibling, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-17 10:56 UTC (permalink / raw)
  To: rudalics, 19048



Il 16/11/2014 16:14, martin rudalics ha scritto:
>  >> So IIUC the problem doesn't happen without the tool bar.  Right?
>  >
>  > Confirmed!

Since this issue is recent, I wonder if it caused by this change:

src/ChangeLog:

2014-11-07  Martin Rudalics  <rudalics@gmx.at>

	* dispnew.c (change_frame_size_1): Fix call of
	adjust_frame_size.
	
[...]

	* window.c (Fset_window_configuration): Adjust adjust_frame_size call.
	* xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
	(Fx_create_frame): Adjust adjust_frame_size calls.
	(x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
	frame can get resized when tool-bar-lines parameter changes from
	or to zero.
	(Fx_frame_geometry): New function.
	* xmenu.c (update_frame_menubar): On Lucid call
	adjust_frame_size with one pixel less height to avoid that
	repeatedly adding/removing the menu bar grows the frame.
	(free_frame_menubar): On Motif arrange to optionally preserve
	the old frame height when removing the menu bar.
	* xterm.c (x_new_font): Adjust adjust_frame_size call.


  Angelo





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-17 10:56                   ` Angelo Graziosi
@ 2014-11-17 12:51                     ` Angelo Graziosi
  2014-11-17 18:25                       ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-17 12:51 UTC (permalink / raw)
  To: 19048



Il 17/11/2014 11:56, Angelo Graziosi ha scritto:
>
>
> Il 16/11/2014 16:14, martin rudalics ha scritto:
>>  >> So IIUC the problem doesn't happen without the tool bar.  Right?
>>  >
>>  > Confirmed!
>
> Since this issue is recent, I wonder if it caused by this change:

Bingo!

I have build this commit

author	Tassilo Horn 2014-11-07 10:48:25 (GMT)

download	emacs-a067ef9a5ddc9812e35734e8c027684e01d684ef.tar.gz

doc/misc/{gnus.texi,gnus-faq.texi}: Add link to EWW manual


...and the frame is restored with the same size..


And this commit (just one minute lather the previous):

author	Martin Rudalics 2014-11-07 10:49:22 (GMT)
download	emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz

Improve inhibiting of implied frame resizes.


..and the frame decreases in height each time one starts Emacs...


Ciao,
Angelo.

>
> src/ChangeLog:
>
> 2014-11-07  Martin Rudalics  <rudalics@gmx.at>
>
>      * dispnew.c (change_frame_size_1): Fix call of
>      adjust_frame_size.
>
> [...]
>
>      * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
>      * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
>      (Fx_create_frame): Adjust adjust_frame_size calls.
>      (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
>      frame can get resized when tool-bar-lines parameter changes from
>      or to zero.
>      (Fx_frame_geometry): New function.
>      * xmenu.c (update_frame_menubar): On Lucid call
>      adjust_frame_size with one pixel less height to avoid that
>      repeatedly adding/removing the menu bar grows the frame.
>      (free_frame_menubar): On Motif arrange to optionally preserve
>      the old frame height when removing the menu bar.
>      * xterm.c (x_new_font): Adjust adjust_frame_size call.
>
>
>   Angelo





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-17 12:51                     ` Angelo Graziosi
@ 2014-11-17 18:25                       ` martin rudalics
  2014-11-17 19:50                         ` Angelo Graziosi
  0 siblings, 1 reply; 22+ messages in thread
From: martin rudalics @ 2014-11-17 18:25 UTC (permalink / raw)
  To: Angelo Graziosi, 19048

 > And this commit (just one minute lather the previous):
 >
 > author    Martin Rudalics 2014-11-07 10:49:22 (GMT)
 > download    emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz
 >
 > Improve inhibiting of implied frame resizes.
 >
 >
 > ..and the frame decreases in height each time one starts Emacs...

OK.  But you didn't answer my earlier questions:

In a normal frame with tool bar, please evaluate the following
three forms

(tool-bar-height nil t)
(tool-bar-height)
(frame-parameter nil 'tool-bar-lines)

and tell me what they give.  I fail to understand why `tool-bar-lines'
is 2 in your saved desktop.

And while you're there: In a saved desktop find the (tool-bar-lines . 2)
entry, replace it with (tool-bar-lines . 3), fire another instance of
Emacs and tell me whether the frame height decreased.

Please do that now.

Thanks, martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-17 18:25                       ` martin rudalics
@ 2014-11-17 19:50                         ` Angelo Graziosi
  2014-11-18  7:51                           ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-17 19:50 UTC (permalink / raw)
  To: martin rudalics, 19048



Il 17/11/2014 19:25, martin rudalics ha scritto:
>  > And this commit (just one minute lather the previous):
>  >
>  > author    Martin Rudalics 2014-11-07 10:49:22 (GMT)
>  > download    emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz
>  >
>  > Improve inhibiting of implied frame resizes.
>  >
>  >
>  > ..and the frame decreases in height each time one starts Emacs...
>
> OK.  But you didn't answer my earlier questions:

I DID! See:

http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00792.html

Ciao,
  Angelo.

>
> In a normal frame with tool bar, please evaluate the following
> three forms
>
> (tool-bar-height nil t)
> (tool-bar-height)
> (frame-parameter nil 'tool-bar-lines)
>
> and tell me what they give.  I fail to understand why `tool-bar-lines'
> is 2 in your saved desktop.
>
> And while you're there: In a saved desktop find the (tool-bar-lines . 2)
> entry, replace it with (tool-bar-lines . 3), fire another instance of
> Emacs and tell me whether the frame height decreased.
>
> Please do that now.
>
> Thanks, martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-17 19:50                         ` Angelo Graziosi
@ 2014-11-18  7:51                           ` martin rudalics
  2014-11-18 13:46                             ` Angelo Graziosi
  2014-11-18 14:38                             ` Angelo Graziosi
  0 siblings, 2 replies; 22+ messages in thread
From: martin rudalics @ 2014-11-18  7:51 UTC (permalink / raw)
  To: Angelo Graziosi, 19048

 >> OK.  But you didn't answer my earlier questions:
 >
 > I DID! See:
 >
 > http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00792.html

Sorry, my bad.  That message must have got drowned by the GIT postings.

Quoting from that URL now:

 > Always with a minimal init.el, I have
 >
 > M-: (tool-bar-height nil t)
 > 36 (#o44, #x24, ?$)
 >
 > M-: (tool-bar-height)
 > 3 (#o3, #x3, ?\C-c)
 >
 >
 > M-: (frame-parameter nil 'tool-bar-lines)
 > 3 (#o3, #x3, ?\C-c)

That's fine.  I was confused because your first attachment (the one
containing desktop, desktop-00, desktop-01 and desktop-03) had a two
lines tool bar for each saved desktop and I wasn't able to reconcile
that with the frame dumps you sent later.  You apparently used a larger
font in your earlier posting.

I'll now look into why that change

 > And this commit (just one minute lather the previous):
 >
 > author    Martin Rudalics 2014-11-07 10:49:22 (GMT)
 > download    emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz
 >
 > Improve inhibiting of implied frame resizes.

may have caused the problems you see.  What is the value of
`frame-inhibit-implied-resize' on your system?

BTW, has

 > I flagged a similar issue on OSX which has been fixed:
 >
 > http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00582.html
 >
 > I don't know if this could be useful also for you...

been fixed for good now?  Did that issue appear at the same time as
bug#19048?

martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-18  7:51                           ` martin rudalics
@ 2014-11-18 13:46                             ` Angelo Graziosi
  2014-11-18 14:38                             ` Angelo Graziosi
  1 sibling, 0 replies; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-18 13:46 UTC (permalink / raw)
  To: martin rudalics, 19048



Il 18/11/2014 08:51, martin rudalics ha scritto:
>
> I'll now look into why that change
>
>  > And this commit (just one minute lather the previous):
>  >
>  > author    Martin Rudalics 2014-11-07 10:49:22 (GMT)
>  > download    emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz
>  >
>  > Improve inhibiting of implied frame resizes.
>
> may have caused the problems you see.  What is the value of
> `frame-inhibit-implied-resize' on your system?

C-h v frame-inhibit-implied-resize

frame-inhibit-implied-resize is a variable defined in `C source code'.
Its value is (tool-bar-lines)

Documentation:
Whether frames should be resized implicitly.
[...]

> BTW, has
>
>  > I flagged a similar issue on OSX which has been fixed:
>  >
>  > http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00582.html
>  >
>  > I don't know if this could be useful also for you...
>
> been fixed for good now?  Did that issue appear at the same time as
> bug#19048?

Yes it has been fixed:

author	Jan D 2014-11-15 13:35:15 (GMT)
[...]
Fix getting frame size wrong when restoring desktop.

from ChangeLog

+	* nsmenu.m (update_frame_tool_bar): If tool bar changes height,
+	call updateFrameSize.

Maybe these two issue were similar in appearance but different in 
substance...

Ciao, Angelo.





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-18  7:51                           ` martin rudalics
  2014-11-18 13:46                             ` Angelo Graziosi
@ 2014-11-18 14:38                             ` Angelo Graziosi
  2014-11-18 17:33                               ` martin rudalics
  1 sibling, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-18 14:38 UTC (permalink / raw)
  To: martin rudalics, 19048

Il 18/11/2014 08:51, martin rudalics ha scritto:
>
> I'll now look into why that change
>
>  > And this commit (just one minute lather the previous):
>  >
>  > author    Martin Rudalics 2014-11-07 10:49:22 (GMT)
>  > download    emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz
>  >
>  > Improve inhibiting of implied frame resizes.
>
> may have caused the problems you see.

BTW, I see the same issue in today build of Windows build (MSYS2-MinGW64)...


   Angelo





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-18 14:38                             ` Angelo Graziosi
@ 2014-11-18 17:33                               ` martin rudalics
  2014-11-19  8:30                                 ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: martin rudalics @ 2014-11-18 17:33 UTC (permalink / raw)
  To: Angelo Graziosi, 19048

> BTW, I see the same issue in today build of Windows build (MSYS2-MinGW64)...

I see it too, now.

martin







^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-18 17:33                               ` martin rudalics
@ 2014-11-19  8:30                                 ` martin rudalics
  2014-11-19 11:34                                   ` Angelo Graziosi
  0 siblings, 1 reply; 22+ messages in thread
From: martin rudalics @ 2014-11-19  8:30 UTC (permalink / raw)
  To: Angelo Graziosi, 19048

[-- Attachment #1: Type: text/plain, Size: 129 bytes --]

 >> BTW, I see the same issue in today build of Windows build (MSYS2-MinGW64)...

Please try the attached patch.

Thanks, martin

[-- Attachment #2: x_set_tool_bar_lines.patch --]
[-- Type: text/plain, Size: 3228 bytes --]

diff --git a/src/w32fns.c b/src/w32fns.c
index 1b290b7..e514970 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1721,15 +1721,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   else
     nlines = 0;

-  if (nlines == 0)
-    x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
-  else
-    {
-      f->n_tool_bar_rows = 0;
-      FRAME_TOOL_BAR_LINES (f) = nlines;
-      adjust_frame_glyphs (f);
-      SET_FRAME_GARBAGED (f);
-    }
+  x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
 }


@@ -1749,11 +1741,7 @@ x_change_tool_bar_height (struct frame *f, int height)
   /* Recalculate tool bar and frame text sizes.  */
   FRAME_TOOL_BAR_HEIGHT (f) = height;
   FRAME_TOOL_BAR_LINES (f) = lines;
-/**   FRAME_TEXT_HEIGHT (f) **/
-/**     = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/
-/**   FRAME_LINES (f) **/
-/**     = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/
-  /* Store the `tool-bar-lines' and `height' frame parameters.  */
+  /* Store `tool-bar-lines' and `height' frame parameters.  */
   store_frame_param (f, Qtool_bar_lines, make_number (lines));
   store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));

@@ -1772,6 +1760,10 @@ x_change_tool_bar_height (struct frame *f, int height)
   adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0,
 		     Qtool_bar_lines);

+  /* adjust_frame_size might not have done anything, garbage frame
+     here.  */
+  adjust_frame_glyphs (f);
+  SET_FRAME_GARBAGED (f);
   if (FRAME_X_WINDOW (f))
     x_clear_under_internal_border (f);
 }
diff --git a/src/xfns.c b/src/xfns.c
index aaa75f2..59715d0 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1075,19 +1075,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   else
     nlines = 0;

-#ifdef USE_GTK
   x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
-#else /* !USE_GTK */
-  if (nlines == 0)
-    x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
-  else
-    {
-      f->n_tool_bar_rows = 0;
-      FRAME_TOOL_BAR_LINES (f) = nlines;
-      adjust_frame_glyphs (f);
-      SET_FRAME_GARBAGED (f);
-    }
-#endif /* USE_GTK */
 }


@@ -1124,10 +1112,6 @@ x_change_tool_bar_height (struct frame *f, int height)
   /* Recalculate tool bar and frame text sizes.  */
   FRAME_TOOL_BAR_HEIGHT (f) = height;
   FRAME_TOOL_BAR_LINES (f) = lines;
-/**   FRAME_TEXT_HEIGHT (f) **/
-/**     = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/
-/**   FRAME_LINES (f) **/
-/**     = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/
   /* Store the `tool-bar-lines' and `height' frame parameters.  */
   store_frame_param (f, Qtool_bar_lines, make_number (lines));
   store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
@@ -1153,6 +1137,10 @@ x_change_tool_bar_height (struct frame *f, int height)
   adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0,
 		     Qtool_bar_lines);

+  /* adjust_frame_size might not have done anything, garbage frame
+     here.  */
+  adjust_frame_glyphs (f);
+  SET_FRAME_GARBAGED (f);
   if (FRAME_X_WINDOW (f))
     x_clear_under_internal_border (f);



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-19  8:30                                 ` martin rudalics
@ 2014-11-19 11:34                                   ` Angelo Graziosi
  2014-11-19 15:52                                     ` martin rudalics
  0 siblings, 1 reply; 22+ messages in thread
From: Angelo Graziosi @ 2014-11-19 11:34 UTC (permalink / raw)
  To: martin rudalics, 19048

Il 19/11/2014 09:30, martin rudalics ha scritto:
>  >> BTW, I see the same issue in today build of Windows build
> (MSYS2-MinGW64)...
>
> Please try the attached patch.

It seems to work both with Cygwin and MSYS2-MinGW64 builds.

Thanks,
  Angelo.

>
> Thanks, martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-19 11:34                                   ` Angelo Graziosi
@ 2014-11-19 15:52                                     ` martin rudalics
  0 siblings, 0 replies; 22+ messages in thread
From: martin rudalics @ 2014-11-19 15:52 UTC (permalink / raw)
  To: Angelo Graziosi, 19048

 > It seems to work both with Cygwin and MSYS2-MinGW64 builds.

OK.  If you don't have further problems I'll check it in in a couple of
days.

Thanks, martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-11-13 21:01 bug#19048: Frame height decreases at Emacs start Angelo Graziosi
@ 2014-12-31 18:35 ` martin rudalics
  2014-12-31 22:06   ` Angelo Graziosi
  0 siblings, 1 reply; 22+ messages in thread
From: martin rudalics @ 2014-12-31 18:35 UTC (permalink / raw)
  To: Angelo Graziosi, 19048-done

 > With current master, each time I start Emacs, the frame decreases its height (about 1 line of text). After few times one starts Emacs, one have to resize the height otherwise it is too short.
 >
 > I see this with my Cygwin build (--with-w32)... I wonder if this issue is related to the other I see on OSX [*]...

This should have been fixed with this commit on trunk/master:

2014-11-22  Martin Rudalics  <rudalics@gmx.at>

	Don't shrink frame when using desktop-save-mode (Bug#19048).

I'm closing this bug.  Please reopen if you still see problems.

Thanks, martin





^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#19048: Frame height decreases at Emacs start
  2014-12-31 18:35 ` martin rudalics
@ 2014-12-31 22:06   ` Angelo Graziosi
  0 siblings, 0 replies; 22+ messages in thread
From: Angelo Graziosi @ 2014-12-31 22:06 UTC (permalink / raw)
  To: martin rudalics, 19048-done



Il 31/12/2014 19:35, martin rudalics ha scritto:
>  > With current master, each time I start Emacs, the frame decreases its
> height (about 1 line of text). After few times one starts Emacs, one
> have to resize the height otherwise it is too short.
>  >
>  > I see this with my Cygwin build (--with-w32)... I wonder if this
> issue is related to the other I see on OSX [*]...
>
> This should have been fixed with this commit on trunk/master:
>
> 2014-11-22  Martin Rudalics  <rudalics@gmx.at>
>
>      Don't shrink frame when using desktop-save-mode (Bug#19048).
>
> I'm closing this bug.  Please reopen if you still see problems.

Oops.. I thought it was already closed... Here no problems!

> Thanks, martin

Thanks, Angelo...

...and Happy New Year :-)






^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-12-31 22:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 21:01 bug#19048: Frame height decreases at Emacs start Angelo Graziosi
2014-12-31 18:35 ` martin rudalics
2014-12-31 22:06   ` Angelo Graziosi
  -- strict thread matches above, loose matches on Subject: below --
2014-11-15 14:10 bug#19060: [FIX INCLUDED] Off-by-one-line scrolling bug in window_scroll_pixel_based Angelo Graziosi
2014-11-15 14:33 ` martin rudalics
2014-11-15 17:18   ` Angelo Graziosi
2014-11-16 11:37     ` martin rudalics
2014-11-16 13:02       ` bug#19048: Frame height decreases at Emacs start Angelo Graziosi
2014-11-16 13:54         ` martin rudalics
2014-11-16 14:16           ` Angelo Graziosi
2014-11-16 14:22             ` martin rudalics
2014-11-16 14:33               ` Angelo Graziosi
2014-11-16 14:42                 ` Angelo Graziosi
2014-11-16 15:14                 ` martin rudalics
2014-11-16 18:05                   ` Angelo Graziosi
2014-11-17 10:56                   ` Angelo Graziosi
2014-11-17 12:51                     ` Angelo Graziosi
2014-11-17 18:25                       ` martin rudalics
2014-11-17 19:50                         ` Angelo Graziosi
2014-11-18  7:51                           ` martin rudalics
2014-11-18 13:46                             ` Angelo Graziosi
2014-11-18 14:38                             ` Angelo Graziosi
2014-11-18 17:33                               ` martin rudalics
2014-11-19  8:30                                 ` martin rudalics
2014-11-19 11:34                                   ` Angelo Graziosi
2014-11-19 15:52                                     ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).