From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Proposing changes to adjust_frame_size Date: Mon, 10 May 2021 10:25:36 +0200 Message-ID: <48753133-11a3-a21f-a1f9-4e58508079ac@gmx.at> 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> <87a6p3iv9q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 10 10:26:36 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 1lg1FM-0007ik-8K for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 10:26:36 +0200 Original-Received: from localhost ([::1]:48600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg1FL-0000eD-AF for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 04:26:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg1EU-0007wc-GP for emacs-devel@gnu.org; Mon, 10 May 2021 04:25:42 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:55133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg1ER-0001ib-DN; Mon, 10 May 2021 04:25:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620635137; bh=V+vhr8i7gqsOHaiLB7M1PNzRR33vBiSlfgdiohLitws=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=JcaKGQLgPKzPg8lzfb4DUjDRkwAUqJXf/dODN+LDoqtusblD+bNzvcQStuzwMmzul gqlfT4UNvcXuT2RclC0dB6tY4K8FWSAtPMKgVL01hGvOXCjk0jqOZ62QuYmoJwwazR ch7Ep1yx8hXNTB+AMlEekomCe2oRqujwdkfgTq5M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.90]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MI5UN-1lmJyJ46HX-00FCDy; Mon, 10 May 2021 10:25:37 +0200 In-Reply-To: <87a6p3iv9q.fsf@gnu.org> Content-Language: en-US X-Provags-ID: V03:K1:vEn6oPV1FuXXKvYKVA+brQe0w0vkgXuMpWkmTfnedcVG1ul1ka/ 5aXsQIE3fA6owt2JS5JDveBlPaZS0Vft/JvjRfqWvbqOzntjD8Uq2WCOhn22vAO+uC3QhJi tueMNsUvI5CkfVfxp45FNqH5vpyeWNWGSwjnoZEyprXr+dbhyjxkb94SO4pBcpH2XZUeNaz Mr1DDSIs/7Z7XytFK1pUw== X-UI-Out-Filterresults: notjunk:1;V03:K0:npnKI/ogGPE=:/b06txEsD59zKBoz5BPKMF o8AkpDtaUGnyvWCN1EbDo7r3KKjVymNRlPGLBX7H2qZu3Nm3SycfcrxT1GIU8xzpqMJXbHerj Wrt12enYjDMhI0q0ABbPjYWeYDcgs0BxbaGJqANSrUKkVmQ7dn1XV0F4HkPt3GQ83NFX/Oj7L ZD3JkGxxrA8VAjz5FoUUMo91v7wss5L9Z0KhVJhnYCosQ1awRWMNDICx6kqbAW9xv4rYpvyLS cPpgKzcxmTZzmKZmx354MNMeRt6QG6UQKyi+Uenn2oSsQQAkCmd+bh1sN7vi2V56mlilr/lpX 49R1o5rGJzMHAyWnHolHmXg2nfYUWBSHkJ7dr3ZjF/qsZup/TR/BqLXOuMoEpSn+HuMrFM9R5 zEnjiei0pbHhqtYOYXa4zgskUFgIuD5hqX8tUtnAl3vPKrtaU6AqbuJMp6vvYbKGRF60GQeMQ 5n5bEtegp/teW3EXg1LJxObyoRa9XvEwDMuDZflm8IxrPXAjOO62mBRMbXU59ntSdaorQAe28 zL3leEsfDgeIXR91kFD5sW7U9CjBJUqeuFd2eOaaLu3ODLxr+2ogTyvKNw3wql9EgCOHVH0ib UNfto7LU/5q6lZ3PU5etPDK2bqLCEvjnkntGkhIOMqyXdZ0ZYdja0iOH5jwhHChJnyUTMdhoH iucuil8ozI/HjrUKjnLRD60kyKEK78bo13AEl08vlHLMHbBCpAUWts+1QFfYP1yDNavkGo6gx upyhzQBUHxvcUirffaoXq2ZrytfWwXH8opYplMrh+S+MvWcIkZW/bbmDS1mn6ykaav4wr5T5 Received-SPF: pass client-ip=212.227.17.21; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:269105 Archived-At: >> 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? If I only knew. From what I've been able to understand till now, a tiling WM on X that sends Emacs a MapNotify event when displaying a frame, doesn't like to be told by Emacs that the size it allots to the Emacs frame is not the size Emacs actually wants (with emacs -Q that's the default 80 columns 36 lines frame). >> 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. That would not help because IIUC XMonad and EXWM do the same. >> 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. Darn. It could not have worked because `x-create-frame-with-faces' removes any visibility spec, creates the frame as invisible and re-adds the visibility spec later on (let* (... (visibility-spec (assq 'visibility parameters)) ... (setq frame (x-create-frame `((visibility . nil) . ,params))) ... (if (null visibility-spec) (make-frame-visible frame) (modify-frame-parameters frame (list visibility-spec))) so I could never have caught this anyway and the entire if (EQ (visibility, Qicon)) x_iconify_frame (f); else { if (EQ (visibility, Qunbound)) visibility = Qt; if (!NILP (visibility)) x_make_frame_visible (f); else f->was_invisible = true; } store_frame_param (f, Qvisibility, visibility); block in Fx_create_frame is for the birds when this is called from `x-create-frame-with-faces'. This kludge needs additional surgery in the Lisp part so please bear with me. martin