unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: martin rudalics <rudalics@gmx.at>
Cc: 22000@debbugs.gnu.org
Subject: bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion
Date: Wed, 25 Nov 2015 17:15:17 +0100	[thread overview]
Message-ID: <87k2p6oy22.fsf@isaac.fritz.box> (raw)
In-Reply-To: <5654B9F2.7000609@gmx.at> (martin rudalics's message of "Tue, 24 Nov 2015 20:26:42 +0100")

martin rudalics writes:
>> Yes. But at least I know now what really triggers this problem: GTK
>> throws this assertion when the menubar is not completely visible. This
>> is also why running Dired triggers this, because it adds a bunch of
>> additional menu entries. The frame is then resized so that the menu-bar
>> fits.
>
> Magnificent!  Easy to trigger here by continuously narrowing the frame
> until a menubar item disappears.  And starting dired from a fairly
> narrow frame with the menubar fully visible resizes the frame so that
> all menubar items are visible.  Thanks for finding the cause of this.
>
> And obviously this is Bug#15700 ;-)

I really need to improve my search-fu...

> I don't think we can/should do anything about this.

Not sure about the "can", but I think we definitely should. The
dired-thing is already pretty annoying for people like my co-worker who
are very adamant about having an Emacs frame that is *exactly* 80
characters wide. He has to resize the frame every time he leaves Dired.

Also, after some more testing, it seems pretty clear that the frame size
is battled out between GTK and Emacs when you make the width smaller
than the menu-bar. If you resize with the mouse, it depends on the
window manager what exactly happens, but I've seen two things:

- with 'wmii', the window simply snaps back to the width that's needed
  by the menu bar

- with 'i3', I can resize to a smaller width with the mouse, but during
  the resize I see flickering to the menu-bar width

Also, it seems to be impossible to programatically set a frame width
that is smaller than the menu-bar. `set-frame-width' doesn't work,
neither does `initial-frame-alist' or even the '-geometry' switch.

Unfortunately, I'm not very familiar with GTK. My guess is that you
would somehow have to catch the 'size-allocate' signal and do The Right
Thing in the callback, but my hacks so far were not successful.

> But at least we have to document it somewhere.  Any ideas?

For starters, I think this should be documented in the Emacs manual
about frame parameters and in functions/variables like `set-frame-width'
and `initial-frame-alist'.

-David





  reply	other threads:[~2015-11-25 16:15 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 20:55 bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion David Engster
2015-11-24  8:28 ` martin rudalics
2015-11-24 16:48   ` David Engster
2015-11-24 19:26     ` martin rudalics
2015-11-25 16:15       ` David Engster [this message]
2015-11-25 17:48         ` martin rudalics
2015-11-25 19:00           ` David Engster
2015-11-26  8:22             ` martin rudalics
2018-07-15 18:09 ` bug#22000: Patch addressing the menu-bar frame-resize interaction Vivek Dasmohapatra
2018-07-16  7:28   ` martin rudalics
2018-07-16  9:46     ` Vivek Dasmohapatra
2018-07-16 19:58       ` Vivek Dasmohapatra
2018-07-17  7:48         ` martin rudalics
2018-07-17 13:45           ` Vivek Dasmohapatra
2018-07-17 19:02             ` Vivek Dasmohapatra
2018-07-18  7:01               ` martin rudalics
2018-07-18  7:07                 ` martin rudalics
2018-07-18 10:39                 ` Vivek Dasmohapatra
2018-07-19  8:19                   ` martin rudalics
2018-07-19 12:04                     ` Vivek Dasmohapatra
2018-07-20  8:14                       ` martin rudalics
2018-07-20  9:21                         ` Vivek Dasmohapatra
2018-07-20 12:34                           ` martin rudalics
2018-07-20 17:44                             ` Vivek Dasmohapatra
2018-07-21  7:43                               ` martin rudalics
2018-07-21 13:24                                 ` Vivek Dasmohapatra
2018-07-22  7:24                                   ` martin rudalics
2018-07-22 12:29                                     ` Vivek Dasmohapatra
2018-07-23  6:50                                       ` martin rudalics
2018-10-11 13:05                                         ` Vivek Dasmohapatra
2018-10-11 18:17                                           ` martin rudalics
2018-10-11 18:27                                             ` martin rudalics
2018-10-11 18:48                                               ` Vivek Dasmohapatra
2018-10-11 20:51                                             ` Vivek Dasmohapatra
2018-10-12  8:44                                               ` martin rudalics
2018-10-12 12:47                                                 ` Vivek Dasmohapatra
2018-10-12 18:12                                                   ` martin rudalics
2018-10-12 18:25                                                     ` Vivek Dasmohapatra
2018-10-13  8:20                                                       ` martin rudalics
2018-10-13 10:03                                                         ` Vivek Dasmohapatra
2018-10-15 13:57                                                         ` Vivek Dasmohapatra
2018-10-15 18:23                                                           ` martin rudalics
2018-10-16  1:19                                                             ` Vivek Dasmohapatra
2018-10-16  8:47                                                               ` martin rudalics
2018-10-16 18:58                                                             ` Vivek Dasmohapatra
2018-10-17  7:29                                                               ` martin rudalics
2018-10-18  1:02                                                                 ` Vivek Dasmohapatra
2018-10-18  8:06                                                                   ` martin rudalics
2018-10-18 12:23                                                                     ` Vivek Dasmohapatra
2018-10-18 12:48                                                                       ` Robert Pluim
2018-10-18 13:24                                                                         ` Vivek Dasmohapatra
2018-10-18 13:46                                                                           ` Robert Pluim
2018-10-18 13:56                                                                           ` Eli Zaretskii
2018-10-18 17:08                                                                             ` Vivek Dasmohapatra
2018-10-18 18:16                                                                               ` Eli Zaretskii
2018-10-18 18:34                                                                                 ` Vivek Dasmohapatra
2018-10-18 13:51                                                                         ` Stephen Berman
2018-10-18 14:31                                                                           ` Robert Pluim
2018-10-18 13:51                                                                       ` Eli Zaretskii
2018-10-18 17:26                                                                         ` Vivek Dasmohapatra
2018-10-18 18:20                                                                           ` Eli Zaretskii
2018-10-18 18:32                                                                             ` Vivek Dasmohapatra
2018-10-18 19:55                                                                             ` Drew Adams
2018-10-19  6:23                                                                               ` Eli Zaretskii
2018-10-18 13:34                                                                     ` Eli Zaretskii
2018-10-18 14:22                                                                       ` Robert Pluim
2018-10-18 16:41                                                                         ` martin rudalics
2018-10-19  7:41                                                                           ` Robert Pluim
2018-10-19  8:34                                                                             ` martin rudalics
2018-10-19  9:14                                                                               ` Robert Pluim
2018-10-19 13:44                                                                                 ` Robert Pluim
2018-10-19 17:57                                                                                   ` martin rudalics
2018-10-23 10:07                                                                                     ` Robert Pluim
2018-10-23 13:45                                                                                       ` martin rudalics
2018-10-23 14:02                                                                                         ` Robert Pluim
2018-10-23 18:18                                                                                           ` martin rudalics
2018-10-23 19:19                                                                                             ` Robert Pluim
2018-10-24  9:44                                                                                               ` martin rudalics
2018-10-24 11:52                                                                                                 ` Robert Pluim
2018-10-24 12:18                                                                                                   ` Vivek Dasmohapatra
2018-10-19 14:17                                                                               ` Stephen Berman
2018-10-19 14:44                                                                                 ` Vivek Dasmohapatra
2018-10-19 16:21                                                                                   ` Stephen Berman
2018-10-21 15:44                                                                                     ` Vivek Dasmohapatra
2018-10-21 15:50                                                                                     ` Vivek Dasmohapatra
2018-10-22 17:11                                                                                       ` Vivek Dasmohapatra
2018-10-19 17:57                                                                                 ` martin rudalics
2018-10-18 16:40                                                                       ` martin rudalics
2018-10-18 17:07                                                                         ` Eli Zaretskii
2018-10-18 17:13                                                                           ` Vivek Dasmohapatra
2018-10-19  7:26                                                                             ` Robert Pluim
2018-10-19  8:23                                                                               ` Eli Zaretskii
2018-10-19  9:25                                                                                 ` Robert Pluim
2018-10-12 18:34                                                     ` Vivek Dasmohapatra
2018-10-12 18:16                                                 ` Vivek Dasmohapatra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2p6oy22.fsf@isaac.fritz.box \
    --to=deng@randomsample.de \
    --cc=22000@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).