From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.bugs Subject: bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion Date: Wed, 25 Nov 2015 20:00:38 +0100 Message-ID: <87fuztq4yx.fsf@isaac.fritz.box> References: <87k2p8h1vn.fsf@isaac.fritz.box> <56541F95.8010006@gmx.at> <87y4dnfind.fsf@isaac.fritz.box> <5654B9F2.7000609@gmx.at> <87k2p6oy22.fsf@isaac.fritz.box> <5655F489.6050906@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1448478089 18844 80.91.229.3 (25 Nov 2015 19:01:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 19:01:29 +0000 (UTC) Cc: 22000@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 20:01:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a1fJX-0003C4-2S for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 20:01:11 +0100 Original-Received: from localhost ([::1]:47242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1fJZ-0000C8-1C for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 14:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1fJR-0000Bq-0s for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:01:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1fJO-0002Qr-Aq for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:01:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1fJO-0002Qn-50 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1fJN-0006Ui-Uz for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Nov 2015 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22000 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22000-submit@debbugs.gnu.org id=B22000.144847804723972 (code B ref 22000); Wed, 25 Nov 2015 19:01:01 +0000 Original-Received: (at 22000) by debbugs.gnu.org; 25 Nov 2015 19:00:47 +0000 Original-Received: from localhost ([127.0.0.1]:53124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1fJ8-0006Dw-NA for submit@debbugs.gnu.org; Wed, 25 Nov 2015 14:00:47 -0500 Original-Received: from randomsample.de ([5.45.97.173]:54698) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1fJ5-0006A2-IF for 22000@debbugs.gnu.org; Wed, 25 Nov 2015 14:00:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=+nznDopXnOZJ1q4UX2HsD2xrgPgBUDi6JstMfOO374c=; b=JgRmEfPGq0hltL8dmlMu9GabxIiUs5gkmyT/NDyv8BzOvAMVsu9D+onAOXlqtLS+dplCkhBi/zsCXFLITSYE7pS4pO/580G1YB3HXhWoPnMVqJhS4sknlf6hBqx3cmV4; Original-Received: from ip4d1645ea.dynamic.kabel-deutschland.de ([77.22.69.234] helo=isaac.fritz.box) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1a1fJ4-00085T-CD; Wed, 25 Nov 2015 20:00:42 +0100 In-Reply-To: <5655F489.6050906@gmx.at> (martin rudalics's message of "Wed, 25 Nov 2015 18:48:57 +0100") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.5 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109253 Archived-At: martin rudalics writes: >>> And obviously this is Bug#15700 ;-) >> >> I really need to improve my search-fu... > > I could have noticed sooner too. Google also lists: > > https://bugzilla.redhat.com/show_bug.cgi?id=3D881760 > > https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00276.html > > https://bbs.archlinux.org/viewtopic.php?id=3D168847 > > https://cygwin.com/ml/cygwin/2013-07/msg00070.html I've actually found most of those, as well as bug #12234, but I think that one was a problem only with Unity. >> 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. > > Here with xfce =E2=80=98set-frame-width=E2=80=99 and =E2=80=98default-fra= me-alist=E2=80=99 both crop the > menubar. That's weird. I just tested with 'icewm' and saw the same behavior as in 'i3' (flickering during resize and (set-frame-width nil 10) not working). Maybe it also depends on the exact GTK3 version? >> 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. > > If I'm not mistaken the problem should happen in one of the two > gtk_distribute_natural_allocation calls of gtk_menu_bar_size_allocate. > > But create_menus in gtkutil.c has this > > /* Set width of menu bar to a small value so it doesn't enlarge > a small initial frame size. The width will be set to the > width of the frame later on when it is added to a container. > height -1: Natural height. */ > gtk_widget_set_size_request (wmenu, 1, -1); > > I have no idea yet how these are related and when the "width will be set". I think the final width is set when container containing the menu widget is actually displayed. The code is pretty opaque to me - I guess we can't just use a plain gtk menu_bar because we need to add/remove menu items at runtime? Because any other GTK3 app I've tried did not have any problem with cropping the menu bar during resize. -David