From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Emacs's set-frame-size can not work well with gnome-shell? Date: Fri, 14 Feb 2020 10:52:48 +0100 Message-ID: References: <2056a194.3971.16f8d4dd4c5.Coremail.tumashu@163.com> <728856fd-dab1-eade-54f5-6ba2c299373a@gmx.at> <6c775e15-1113-8406-5583-97c259305a7d@yandex.ru> <0fe2d245-9ac1-3528-e710-38462441f8aa@gmx.at> <9bac54df-8cd3-303d-910e-07e161ff1f3e@gmx.at> <414ade05-1ae6-75c2-9af1-e1eee42799a0@yandex.ru> <44010781-43f0-3bc3-06ed-475c526dee36@gmx.at> <70813591-8c24-cb30-8ecf-0c413a51f472@gmx.at> <81215100-3476-9d2c-f535-f57fbd18fd8b@yandex.ru> <8a485c09-535a-97e6-9817-31e6d2f93adb@gmx.at> <0734f22f-9237-d46a-27d5-016444f48d70@gmx.at> <5e28c37f-95a9-a5ae-d73c-b5bb769154c0@yandex.ru> <4c0993c7-0583-8573-60c5-ab0a92121fd3@gmx.at> <4b114f01-d8d9-2c33-6312-1e2e60a5d462@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="71363"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Dmitry Gutov , tumashu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 14 10:56:52 2020 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 1j2XiO-000IS3-QD for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Feb 2020 10:56:52 +0100 Original-Received: from localhost ([::1]:36686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2XiN-0008MV-La for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Feb 2020 04:56:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55756) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Xeg-0005pH-5V for emacs-devel@gnu.org; Fri, 14 Feb 2020 04:53:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2Xee-0002TN-Tx for emacs-devel@gnu.org; Fri, 14 Feb 2020 04:53:02 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:41199) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2Xee-0002Qh-Gf for emacs-devel@gnu.org; Fri, 14 Feb 2020 04:53:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581673969; bh=Oofc9gjf0Mi35s5dSro9Teia1iJ1DOcJdl2yQAgrxlQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=iLR2FsbBjD3r6RwRY1Dgod7ZZB+YLwO3NPBNsdnqfU4ZzITXHcOpwfhFGHzmoCGjq QTc4NblMinTtv31WoI4mZjB/sIA6CWFjztOc/wVeYHRb03Opc9rA4GMAHBGeu3DxD0 mmiSXKlVdyFt18yMnZBp+oZbO51svzubfJTMiaOg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.66]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MYeMt-1ixmWw1myp-00VkMV; Fri, 14 Feb 2020 10:52:49 +0100 In-Reply-To: <4b114f01-d8d9-2c33-6312-1e2e60a5d462@yandex.ru> Content-Language: en-US X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vFkGk8jKiSYXctr2OBtYUuiHPcFPAlF5CujkR+ruRDAap X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:244937 Archived-At: > I think we have made out due diligence and studied the problem with some detail, and we can write the details out to the Mutter bug report. > > Maybe we'll have some luck, and one of the developers replies with a simple alternative fix? That happened to me before with other projects. > > I won't be holding my breath, of course. I had a glimpse at https://gitlab.gnome.org/GNOME/gnome-shell/issues/1733 but its Javascript use annoys me and I'm not very enthusiastic about registering or signing in to post a reply. So, if possible, please pass along the information below to them. Thanks, martin Below find some additional informations wrt the issue at hand. Emacs makes the child window via XReparentWindow and asks to resize it via gtk_window_resize. The initial resize request gives the child window the expected initial size and position when it is subsequently mapped. Further resize requests fail however. There's no visible feedback after the gtk_window_resize request has been issued and Emacs never receives a ConfigureNotify event for it. The problem does not occur for Lucid, Motif and GTK2 builds, it happens with GTK3 builds only. The following two workarounds are currently tested: (1) Use gdk_window_resize instead of gtk_window_resize. This requires to tweak our handling of ConfigureNotify events in a way that is incompatible with other window managers. Hence we would have to special-case mutter in a very queer fashion. What's worse, however, is that the child window cannot be enlarged beyond its "initial" size - apparently the one given to it when it was mapped for the first time. So one has to make a child window very large initially in order to handle all future resize requests. We have no idea as to who manages that "initial" size and refuses our requests to make the child window larger. (2) Make child windows temporarily invisible when resizing them. This means that for every resize request we have to invoke gtk_widget_hide first, then apply gtk_window_resize and finally call gtk_widget_show_all to show the window again. This usually will cause the child window to flicker whenever it gets resized. Neither of these solutions appear satisfactory so your help in this matter would be highly appreciated. Thanks in advance