From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Proposing changes to adjust_frame_size Date: Sun, 09 May 2021 20:48:47 +0200 Message-ID: <87a6p3iv9q.fsf@gnu.org> References: <69a5e928-2998-f776-fa0d-f35e6ab1e65d@gmx.at> <20210505.230733.1330791046879877132.masm@luna.pink.masm11.me> <87a6p9knr9.fsf@gnu.org> <9712b3f0-c442-61fc-93a6-773ffcde1c2e@gmx.at> <87y2cswam6.fsf@gnu.org> <1b11ac72-6687-f2d4-1d9f-0619d6d2462c@gmx.at> <87v97ww8h4.fsf@gnu.org> <87eaa667-b3cd-0274-669c-3cb4e0076ce0@gmx.at> <87sg30vy7w.fsf@gnu.org> <87pmy3x620.fsf@gnu.org> <52a5361a-451e-7167-edfd-09066dfdcc3e@gmx.at> <875yzt907k.fsf@gnu.org> <0633b8ac-de8e-b57a-f3f4-804c5efb009a@gmx.at> <874kfdtj5l.fsf@gnu.org> <37f3ce19-d858-111e-a5aa-06c24803e17b@gmx.at> <87v97tvt7e.fsf@gnu.org> <726883d4-8d13-a3cb-30b7-a74c4b44f8ed@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36794"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.13; emacs 28.0.50 Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 09 21:05:05 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lfojg-0009Tx-Ts for ged-emacs-devel@m.gmane-mx.org; Sun, 09 May 2021 21:05:04 +0200 Original-Received: from localhost ([::1]:58392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfojf-0004rw-Ny for ged-emacs-devel@m.gmane-mx.org; Sun, 09 May 2021 15:05:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfoj6-0003q7-Bb for emacs-devel@gnu.org; Sun, 09 May 2021 15:04:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40726) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfoj5-0002WU-LU; Sun, 09 May 2021 15:04:27 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:33205) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfoj4-0004IR-ON; Sun, 09 May 2021 15:04:27 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 4C92B27C0054; Sun, 9 May 2021 15:04:26 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 09 May 2021 15:04:26 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegiedgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe evveeikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucfk phepkeejrdduieefrdefuddrudehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgr lhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 May 2021 15:04:24 -0400 (EDT) In-reply-to: <726883d4-8d13-a3cb-30b7-a74c4b44f8ed@gmx.at> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269093 Archived-At: martin rudalics writes: >> Yes, pretty much like Emacs splits windows into two balanced halves. >> I have a 1600 pixel wide screen, 3 pixels gap between WM windows, and >> 3 pixel window borders. That makes 1579 pixels width for actual WM >> windows, divided by two (I've had a terminal at the left and emacs at >> the right), makes 789.5 pixels per window. > > Elementary. But why should it react so allergically to our resize > request? Sorry, I'm a layman in WMs. What does or doesn't it do? > Basically, we have no choice: For some "normal" WMs we have to tell > them the size we want when the frame is mapped because before that > they may ignore our resize requests and after that the frame has > already appeared with its wrong size. For a tiling WM requesting a > size when the frame is mapped is apparently a mortal sin. If you think that the window manager does something wrong or could at least so something better, I'm happy to file a sway bug report or ask the sway devs on IRC. > Whatever it be, I attach a patch to address this issue. Hm, I can see no difference with your patch applied. Still emacs -Q has just a menubar and the toolbar is not shown until I move focus to another WM window and back to the emacs frame. That's the frame size history with your patch applied. --8<---------------cut here---------------start------------->8--- Frame size history of # x_create_frame_1 (5), TS=80x25~>640x525, NS=80x25~>656x525, IS=80x25~>656x525, MS=16x42 IH IV gui_figure_window_size (5), TS=640x525~>640x756, TC=80x25~>80x36, NS=656x525~>656x756, IS=656x525~>656x756, MS=16x42 IH IV scroll-bar-width (3), NS=656x756~>672x756, IS=656x756~>672x756, MS=80x105 scroll-bar-height (3), MS=80x105 menu-bar-lines (2), MS=80x105 x_create_frame_2 (0), MS=80x105 xg_frame_set_char_size, invisible, PS=672x756, XS=672x756, DS=672x756 xg_frame_set_char_size (5), MS=16x42 IH IV MapNotify, not hidden & not iconified, PS=672x756, DS=672x756 xg_frame_set_char_size, visible, PS=672x756, XS=672x756, DS=672x756 ConfigureNotify, PS=672x756, XS=672x756, DS=672x756 xg_frame_resized, unchanged, PS=672x756, XS=672x756 ConfigureNotify, PS=672x756, XS=794x851, DS=672x756 xg_frame_resized, changed, PS=672x756, XS=794x851 change_frame_size_1, delayed, PS=672x756, XS=794x851, DS=672x756 change_frame_size (5), TS=640x756~>762x851, TC=80x36~>95x40, NS=672x756~>794x851, IS=672x756~>794x851, MS=16x42 IH IV tool-bar-lines (2), MS=80x105 IH IV ConfigureNotify, PS=794x851, XS=794x810 xg_frame_resized, changed, PS=794x851, XS=794x810 change_frame_size_1, delayed, PS=794x851, XS=794x810 change_frame_size (5), TS=762x851~>762x810, TC=95x40~>95x38, NS=794x851~>794x810, IS=794x851~>794x810, MS=16x42 IH IV --8<---------------cut here---------------end--------------->8--- The numbers are slightly different (the frame is a bit larger) because I've deactivated gaps between windows. Bye, Tassilo