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: Mon, 16 Jul 2018 09:28:17 +0200 Message-ID: <5B4C4911.8040900@gmx.at> References: <87k2p8h1vn.fsf@isaac.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1531726035 23150 195.159.176.226 (16 Jul 2018 07:27:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 07:27:15 +0000 (UTC) To: Vivek Dasmohapatra , 22000@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 16 09:27:11 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 1fexuZ-0005tO-98 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jul 2018 09:27:11 +0200 Original-Received: from localhost ([::1]:49246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fexwe-0006JE-Jr for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jul 2018 03:29:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fexwP-0006J6-Sy for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 03:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fexwM-0000mj-OP for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 03:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fexwM-0000mX-Kg for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 03:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fexwM-0001DY-5H for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 03:29: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: Mon, 16 Jul 2018 07:29: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.15317261144639 (code B ref 22000); Mon, 16 Jul 2018 07:29:02 +0000 Original-Received: (at 22000) by debbugs.gnu.org; 16 Jul 2018 07:28:34 +0000 Original-Received: from localhost ([127.0.0.1]:42258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fexvu-0001Cl-AS for submit@debbugs.gnu.org; Mon, 16 Jul 2018 03:28:34 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:50789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fexvs-0001CZ-O8 for 22000@debbugs.gnu.org; Mon, 16 Jul 2018 03:28:33 -0400 Original-Received: from [192.168.1.101] ([213.162.73.117]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MUpFU-1fXFFa0R0G-00Y7UG; Mon, 16 Jul 2018 09:28:22 +0200 In-Reply-To: X-Provags-ID: V03:K1:4WYKquppWkjZ7UpMqQnKN6n5lVs72tMEQJ5kcKMydrahoMUS62r U4g3SJtJHNtT2kUqFbwrZTeowBYBIhSZQ3cghpbU1KAWbteZoijq+wECQnmQGUfODBLHZlk ftpC6geFQQ2h8a4ShHkEeC2haEDoQ3sMYy8oSf4plvvQQFAt+znY4q+i6PctyG+JPs77nPW BvuU/keqplU1uLmfA8aXA== X-UI-Out-Filterresults: notjunk:1;V01:K0:O/ojLH+x7Og=:IuIzpp25JFD8bwscVrNSgi vr3VkRpqozSqCAHshJFAqCICYvW+UdyyzfWPjlZ+VYQrHjwmhX7VFt16UYF9I8SvHwReaH3Iw 1TrySsZ+0w+VbovYR+bAsbDIoP4xneR8S0X6be+WtlcIQnXqEB8LVQ9BB4rHNCKvPOw5VNZr/ P8hTXa81++K2m8zXERYzwkc3zVDZVY8N4X3tuf0mM+1BBD6cZ1lGb5rSG206/jpycLLCGTDKW ZjysZ1zfZRtP/4BBw3+RFPscs+53k0+H6K1klTpJoA4jOJDVsBQVrRLoidCuNQP2y4yy2fgLw DRIkeBMzA79YQED7IrTaSm0MUEy96pqC2RaoYEY/39RwbQb7LcY1qVAu3ohT9haqjVpwhsFrC sGiTGOJsS2SnZuI5PftL34n69/SN8IExaJ5IucyeKUkKo2nthL2ZwMUN+UxjZhoK2PWHrS7LC A+08cLCyz3+/g9KhKZd8Kd2hiAlBi+slYKEVu+hQUBPOf7fvdx7eBK0Bp2I19uHmNFZMVkY6Z 9vK7puZ3TNtBk3NpxhSI8uXU7+S3FFSao4gg5gnJ9/v069k9aTeGgooWzX2/K3ofl14yXydxI nYWleWGkeSmdZerDLECx/qJSx7xBd2xhuHGxfIfs04lxBYRL4Xn+E0s4W6smVpRj2edEm/AmQ W7EY/M/afz0xixogv/oidv2mKck4kJKAsQrW8udeZjn1nOqy9nQ+SegUdYQPiaFO0B5r6M/e8 kTdgII6slFkcF3N7mP44ynSlDLJB2QYNMywdI3B09QVDL9VapsIMnWMh7Zdyofu8aqjGBrE4 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:148560 Archived-At: > This patch attempts to address the menu-bar interaction with the > frame size: I've been using it locally for a short while now. Thanks. 'gtk_widget_set_focus_on_click' is only available since GTK 3.20 and 'gtk_scrolled_window_set_overlay_scrolling' since 3.16 so please condition your patch accordingly in order to allow compilation with older versions (like mine). Making the menu bar a "scrolled window" appears like a rather gross hack to me and I think we should use it only as a last resort. Can you tell what actually is different for a scrolled window in order to not trigger auto-resizing of its parent? I wonder why 'gtk_widget_set_size_request' does not handle this problem in the first place. In 'create_menus' we do wmenu = gtk_menu_bar_new (); /* 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); Is it possible that this gets reset later and/or another such call is needed when adding a new menu bar item? After all, you can set a small initial width of a frame via 'default-frame-alist' so that the menu bar is initially partially hidden/truncated. Right? So in principle truncating should work but somehow breaks when we add items to the menu bar. Note that I can't really experiment with this because I don't get any resizing here. > It does make the menu bar taller than it was - This may be > addressable by using overlay scrollbars but there is currently > a bad focus interaction with those so the patch suppresses them > (overlay scrollbars) for now. How much taller does the menu bar get? By the possible height of a horizontal scroll bar? Thank you for working on this problem, martin