From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#52666: 27.0.50; Unexpected mode line flickering when creating frames Date: Mon, 20 Dec 2021 19:23:22 +0100 Message-ID: <87wnjz6spx.fsf@metalevel.at> References: <837dbz2twl.fsf@gnu.org> <84953d3c-e328-6221-3747-f7cfc69d89f6@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="9241"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 52666@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 20 19:27:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mzNOB-00028h-Da for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 19:27:59 +0100 Original-Received: from localhost ([::1]:35974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzNOA-00077t-0F for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 13:27:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzNKM-0001sv-Bf for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 13:24:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzNKM-0007Us-1Y for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 13:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzNKL-0008Ti-Oy for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 13:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Dec 2021 18:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52666 X-GNU-PR-Package: emacs Original-Received: via spool by 52666-submit@debbugs.gnu.org id=B52666.164002460832543 (code B ref 52666); Mon, 20 Dec 2021 18:24:01 +0000 Original-Received: (at 52666) by debbugs.gnu.org; 20 Dec 2021 18:23:28 +0000 Original-Received: from localhost ([127.0.0.1]:51410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzNJn-0008Sn-SP for submit@debbugs.gnu.org; Mon, 20 Dec 2021 13:23:28 -0500 Original-Received: from [78.47.144.35] (port=41080 helo=metalevel.at) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzNJk-0008Sd-CO for 52666@debbugs.gnu.org; Mon, 20 Dec 2021 13:23:26 -0500 Original-Received: by metalevel.at (Postfix, from userid 1000) id C487C9C74E; Mon, 20 Dec 2021 19:23:22 +0100 (CET) In-Reply-To: <84953d3c-e328-6221-3747-f7cfc69d89f6@gmx.at> (martin rudalics's message of "Mon, 20 Dec 2021 18:21:50 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222789 Archived-At: martin rudalics writes: > immediately after the frame has been created is bad karma and should be > avoided at all costs. The right approach is > > (while t > (let ((f (make-frame `((parent-frame . ,(selected-frame)) > (left . 200) > (top . 200) > (width . 200) > (height . 200))))) This seems not equivalent to what I posted: In the original snippet, I set the width and height to 200 pixels, by specifying pixelwise as t. In contrast, this version now sets the width and height to 200 columns and rows, respectively, yielding a much larger frame. > This is the second problem: 200 x 200 is way too large for the parent > frame so the WM has to clip the child frame and where it overlaps with On my configuration, a frame of 200x200 pixels fits well within the parent frame at the given position, so this should not be a problem. You can evaluate the following form in isolation to see that the frame that is created with the original snippet fits within the parent frame: (let ((f (make-frame `((parent-frame . ,(selected-frame)) (left . 200) (top . 200))))) (set-frame-width f 200 nil t) (set-frame-height f 200 nil t)) If you execute it repeatedly, you will sometimes see the flickering in the mode line, and sometimes not. Putting this in a loop as in the original snippet lets you easily observe the flickering. Is there a way to set the pixelwise frame hight and width already when the frame is created? Thank you and all the best, Markus