From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#22000: Patch addressing the menu-bar frame-resize interaction Date: Fri, 20 Jul 2018 10:14:47 +0200 Message-ID: <5B5199F7.7000303@gmx.at> References: <87k2p8h1vn.fsf@isaac.fritz.box> <5B4C4911.8040900@gmx.at> <5B4D9F5F.20506@gmx.at> <5B4EE5AF.5000304@gmx.at> <5B504994.3090202@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532074457 10859 195.159.176.226 (20 Jul 2018 08:14:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2018 08:14:17 +0000 (UTC) Cc: 22000@debbugs.gnu.org, David Engster To: Vivek Dasmohapatra Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 20 10:14:12 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQYE-0002h9-48 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2018 10:14:10 +0200 Original-Received: from localhost ([::1]:46895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgQaK-0003tE-Ma for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2018 04:16:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgQa8-0003ss-Lv for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:16:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgQa2-00008W-Td for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:16:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43752) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgQa2-00008O-PI for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fgQa2-0004ir-BY for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jul 2018 08:16:02 +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.153207451218087 (code B ref 22000); Fri, 20 Jul 2018 08:16:02 +0000 Original-Received: (at 22000) by debbugs.gnu.org; 20 Jul 2018 08:15:12 +0000 Original-Received: from localhost ([127.0.0.1]:48770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQZE-0004he-42 for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:15:12 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:46127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQZC-0004hP-By for 22000@debbugs.gnu.org; Fri, 20 Jul 2018 04:15:11 -0400 Original-Received: from [192.168.1.101] ([213.162.73.201]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LdYdG-1gOsBR1qWQ-00ilGd; Fri, 20 Jul 2018 10:14:55 +0200 In-Reply-To: X-Provags-ID: V03:K1:9hI4lCqyWspwfco+wlc9CWGX5MFS8BbR12dj1LQ6qFcUtojT7f8 AuCoWI1O48512qUV6JY0KQRIvR9yyAd7z9nIDZsUNi5GhRDA7n7JFuQoTwjwz/4CudB3TRh FCtxFaAt1P8k399eRzaV5McV7/5tEQKnfGmJky3sXy+NXekio7fuMuxrsSJN76sRPiUniIy QkQozJZ5EJc9BYi9sE8aA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Vxxmy0UMEcI=:fHhOnEuRR6lM5IbQZilk20 4MIX7T3qJijy2ZS1N9C4XbnoClituxK+xBYcpyOu10DOs5vaxQalZ3dZ+qdejzak41TnWC5jx QeW5GeyCJJLR4iaFeY06zgYLYUzx9Ym1E4Vtjy51JKkxa1JWzi+8S5uWuujVu+is50jhvJhuD R1zSf04YB7FTbj79MClB3TFqWZq5vAwJVH153vwBp/j2pfwab9ldCuAyELqiKlUUx3f88+5Hw PL7AOLnqrqqHm0K6Jf7J2cQoncitewpQzf1VWrXt8nGTdggrhdrmnKFmdXUuc2DJfR7B4HaVT 2gKX7Zgc/OK8VtoCnwNlLb2apCXF+naKQ6bfZC5VbkUNUwAZG5Tti13qR0sFSvgnA9V+VQ5pt OJM0NKvOQPuuCTnZSZSAY3qEXEUwHIFM0Ek2vZFvEr5P0GDxqcaMUi2O75vu1gU1d7NXCoVWm /PeadKxIx9w2j2VNRtozWojIcm0Dfi2DRCYLxpdG5/KUzuVqUK0JtvhB1Vz2/Gl0Hxkq+oFmW Ifq5yk9Nv/3lp5QfXYHNcnmhBQajj3Kg+0pheYwlRunL9KS9UBdug+Ow0f4P/pVKF5LF84KJP dMMg/GzEoHKmDgjVo6W87W/+DZ7PLQxQD+YzyOKVisUviDnjju3PAnonqOnBvgLntBViDF4vM XDBoBK9b6G9w0me+S90p3SAcBgRDY6OPgSryNBlgICDph1zJkcXcYG5fjJp787YwaeJwDP0jx TX5233e3Cb4saKAHVglU41O7FyMaqMqesXAVv9RLHIjuupWUFV2g0Cfv5pP8Fu7LxiijZ524 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:148709 Archived-At: > Backtrace (attached): > > gdk_frame_clock_paint_idle > =E2=80=A6 > =E2=86=92 gtk_container_idle_sizer > =E2=80=A6 > =E2=86=92 gtk_distribute_natural_allocation > > Is the path, I think. Why doesn't this process kick in after I shrink the frame width manually such that the menu bar is cropped? Something in the course of adding an item to the menu bar must trigger it. >> I suppose the container respecting its wishes is that of the Emacs >> frame's window. And if that container were a scrolled window, it >> would not auto-resize. Do I reason correctly? > > Initially it's the box (vbox?) that the menubar is added to. > Not sure that's the top level widget. If my reading of this is correct, resizing gets passed on from one container to its parent until the top-level widget is reached. Maybe we could intercept that chain via gtk_container_set_resize_mode but I don't know to which value. 'queued' doesn't sound very intriguing. >> Only the "virtual" container we'd add would have fixed size but this >> does not mean that it passes on the fixed size property to the menu >> bar's widget. Inherently, this means that we would be cheating GTK >> another time. Or am I wrong? > > IIUC you are right - that's how you're supposed to do it - I just don'= t > know if there's a non-deprecated widget that does what we want. > > Worst case scenario: If I grab the scrolled window class and mutilate = it Above I meant using the gtk fixed window class for the container, not the scrolled window one. > till it does what we want, would you consider emacs carrying that widg= et > class in its code? It shouldn't change any of the build dependencies. > > NOTE: FWIW even the hbox and vbox we are using are deprecated and have= > been for a while, so this whole area of code is going to need to be co= nverted over to gtk grid at some point anyway. I never started counting the areas of Emacs code that would require similar treatment. > You can suppress the scrollbars independently, but that's what restore= s > the unwanted resizing behaviour in that direction: Suppress the vertic= al > scrollbar and suddenly vertical size requests are honoured, suppress > the horizontal and suddenly the menu bar can force the frame size agai= n. I made the silly assumption that turning off horizontal bars would still inhibit horizontal resizing. It must be the other way round. martin