GNU bug report logs - #17120
Fwd: Error displaying a frame modified with (tool-bar-lines . 0)

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Thu, 27 Mar 2014 15:29:02 UTC

Severity: minor

Tags: fixed

Fixed in version 28.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 17120 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Juanma Barranquero <lekktu <at> gmail.com>, 17120 <at> debbugs.gnu.org
Cc: robert <at> capuchin.co.uk
Subject: Re: bug#17120: Fwd: Error displaying a frame modified with
 (tool-bar-lines . 0)
Date: Sun, 2 May 2021 10:47:47 +0200
> This is the underlying bug with GTK and Emacs that caused bug#17046.
>
> It's minor because it's unlikely that modifying frames' heights with
> tool-bar-lines = 0 be a common operation.
>
>
>    emacs -Q -l bug.el
>
> with bug.el:
>
> ;;; bug.el
> (let* ((default-frame-alist nil)
>         (frame (make-frame '((width . 80) (height . 20))))
>         (lines (frame-parameter frame 'tool-bar-lines)))
>    (discard-input)
>    (read-event nil nil 2)
>    (modify-frame-parameters frame '((tool-bar-lines . 0)
>                                     (width . 60) (height . 25)))
>    (modify-frame-parameters frame `((tool-bar-lines . ,lines))))
> ;;, end
>
> causes the frame to be redisplayed incorrectly (the trigger being the
> (tool-bar-lines . 0) parameter:
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?msg=26;filename=emacs-sshot.png;att=1;bug=17046
>
> This happens on a Ubuntu 13.10:
>
> GNU Emacs 24.3.50.2 (i686-pc-linux-gnu, GTK+ Version 3.8.6)
>   of 2014-03-14 on poulenc
> Repository revision: 116756 rudalics <at> gmx.at-20140314103846-ytcz7b30ocmzo8jh
> Windowing system distributor `The X.Org Foundation', version 11.0.11405000
> System Description: Ubuntu 13.10

I now checked in a fix.  Please have a look.

On builds with an internal tool bar you have to, for example,

(setq frame-inhibit-implied-resize nil)

to get the desired 25 lines.  Otherwise, the

(tool-bar-lines . ,lines)

will steal the necessary lines from the frame's text area.

Thanks, martin




This bug report was last modified 4 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.