From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!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, 10 Jan 2020 10:56:39 +0100 Message-ID: <7c344291-8161-eff1-b07b-fb764535abef@gmx.at> References: <2056a194.3971.16f8d4dd4c5.Coremail.tumashu@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114355"; mail-complaints-to="usenet@blaine.gmane.org" To: tumashu , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 10 11:01:37 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ipr5V-000GLT-Ti for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jan 2020 11:00:18 +0100 Original-Received: from localhost ([::1]:43358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipr5U-0007tD-HU for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jan 2020 05:00:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32868) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipr2B-0004zq-3G for emacs-devel@gnu.org; Fri, 10 Jan 2020 04:56:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipr29-0003k7-Qx for emacs-devel@gnu.org; Fri, 10 Jan 2020 04:56:50 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:52729) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipr29-0003WR-Bh for emacs-devel@gnu.org; Fri, 10 Jan 2020 04:56:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578650200; bh=rU7aEza77ybSmersmZbaFnzMUw/n1ITr77YDV/HGUKU=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=b9L3IQP5JJnFWYAqmCUPk1nshjpXCG39FDF00aHCEplb2VtlUp7H4x1vU1hk6prfR UOyWPsSsp1FuZ4wAi+nhATz2JKjXYwgh/0pDvB5SnWgfAY+cHVN5tWnso6dfTRCp8G H2WxIg5sQLGwEt/arhWvE68I33bbtns928EJsjLg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M1Ycr-1ioTBb0CBn-003875; Fri, 10 Jan 2020 10:56:40 +0100 In-Reply-To: <2056a194.3971.16f8d4dd4c5.Coremail.tumashu@163.com> Content-Language: de-AT X-Provags-ID: V03:K1:q/TCrGiukB9pHMJTZkHRan0ngV9YnS4NlY61AGnJeIKcnb+llLu c7znjl0+fZFuRRR2DyOQ5EI22u4SrS6n4164p1Z4fVSPynwQHN+CPqA9RORBRy3IMbuXWoM i7ppnVESYgnfWhLkxe7MJAX6aOzmPyfRx3GNkD7vIjD+9DsuIKlq95LAYY53EmqLFt5cPMa Vhl5VhYlRq4iywXtVG6xA== X-UI-Out-Filterresults: notjunk:1;V03:K0:P83bIQzgTYs=:oFVpKkjtGADrA/5xOxU1XM QBIiFsPb7qwwkTlTm60CLXSXZ4YpRoft5CNYmP18ZxAfMVSuaW28N8QJYaIX3H5HJw5J7UCgV uoLOmOUPfTCy48HoTaaqTm8VClvjhu3o/lF+Tc0HIlsh+aAukjhvfnhdy05HeGiEja2B2NZzi z4Q+iPczKQAKVzzKUTTY9+VpSQlLm4BlIqR06h9rqJdNxD9EoJsYpHVYQcRSCSQDKlEdZfH6d 6ug8k5tKJr8VLtQS8iEVLNAYuvAXvA9KPn5nPH5l8+ggWZi/rfT+0b5/x0vt5rx0A2tGNrKwC 2WnEdcjKgFgjbiedz1QsOJm9xuBaanjD8kCeaappyjnCBlQMswS3DHo2g52lzvCizuzTKAs5S PFxLuwUYy6LrkU3VUHWHpB/bdDlEqF7rpDi9JkkrFRl7C7QK8EU/qo9gMskKUPQCoDG241BwA /0tWuy08/6vUg6n5429XUhHCEpuJh3N3VwW2UVYkWQJL+CiE7NtiDAppbNhlQQn0Qkn7a+iQT V62LMytzTbApDQmti5ufaKeCMaMbuo6XOx9P25vv8hLvi5VB/vgmuxe6n+NQOJd1dMqUf90Ca HLanRuuV8xxvTDV6MRqvMVXkKNoVm6iGzjMjfkvuieIqnpXIuhFR+SPNQVKOYk068bY2s0CML YucJhw1N+OBatloU6BPQDxHvXF9eL1lRaI9YW0A/rSXS5Z9+4+0wvp4gJIc8CXM34SFbBJh5q 1aCrZ0xsp8ycpBuqnyv5lsGK1aJu+Bk8D93b77AI1U/z90M1z6isU4sStRV5isC+y+B21WqO X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 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.org gmane.emacs.devel:244172 Archived-At: > When I use child-frame with gnome-shell, I find that set-frame-size is very slow and can not resize at all. > Is it emacs's problem or gnome problem? > > > ``` > (defun open-test (buffer) > (display-buffer-in-child-frame > buffer '((child-frame-parameters > . ((width . 40) > (height . 10) > (top . 50) > (left . 50) > ))))) > > (defun resize-test (frame) > (set-frame-height frame 20)) > > (setq-local test-buffer (get-buffer-create "test child-frame")) > (setq-local test-frame (window-frame (open-test test-buffer))) > > (resize-test test-frame) > ``` > The below links are relate infos of this problem: > > 1. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1733 > > 2. https://github.com/tumashu/company-posframe/issues/17 > > 3. https://github.com/tumashu/company-posframe/issues/2 Both, 'display-buffer-in-child-frame' and 'set-frame-height', should be written in a way that the child frame surely fits into its parent. If you don't, the window manager might do strange things. Also, I would disable all decorations that are not strictly needed. For example, with a GTK build using your parameters I get a tool bar on the child frame as soon as I type some character into it (which might be an Emacs bug in one or the other way). That tool bar is truncated and GTK may not behave well with truncated tool bars. See section 29.14 of the Elisp manual for what better not to do on child frames. If neither of these helps, we would have to look into how Gnome-shell treats child windows. Gnome-shell seems particular (see Bug#38452). martin