From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias Nyrell Newsgroups: gmane.emacs.bugs Subject: bug#66141: 29.1; Window size properties not set immediately for window in new frame Date: Fri, 22 Sep 2023 08:47:02 +0200 Message-ID: <0ace9d7d-8a01-d0b8-f290-0e2ee2241246@nyrell.se> References: <999b2ee0-b9fe-c1a4-3696-442e8d53b212@nyrell.se> <83jzsj8or4.fsf@gnu.org> <83bkdv8imo.fsf@gnu.org> <79870529-9459-5ed9-3d90-18f449efc838@nyrell.se> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25713"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: 66141@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 22 08:48:15 2023 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 1qjZxW-0006Th-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Sep 2023 08:48:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjZxD-0000wH-1M; Fri, 22 Sep 2023 02:47:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjZxA-0000w8-AR for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 02:47:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjZxA-0003S6-1u for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 02:47:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjZxK-0007vb-3V for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 02:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias Nyrell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Sep 2023 06:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66141 X-GNU-PR-Package: emacs Original-Received: via spool by 66141-submit@debbugs.gnu.org id=B66141.169536524330331 (code B ref 66141); Fri, 22 Sep 2023 06:48:02 +0000 Original-Received: (at 66141) by debbugs.gnu.org; 22 Sep 2023 06:47:23 +0000 Original-Received: from localhost ([127.0.0.1]:35170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjZwg-0007t8-Ry for submit@debbugs.gnu.org; Fri, 22 Sep 2023 02:47:23 -0400 Original-Received: from hedgehog.birch.relay.mailchannels.net ([23.83.209.81]:4087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjZwc-0007sw-8I for 66141@debbugs.gnu.org; Fri, 22 Sep 2023 02:47:20 -0400 X-Sender-Id: stablehost|x-authuser|mattias@nyrell.se Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 214F93608C8; Fri, 22 Sep 2023 06:47:06 +0000 (UTC) Original-Received: from swe06.stablehost.com (unknown [127.0.0.6]) (Authenticated sender: stablehost) by relay.mailchannels.net (Postfix) with ESMTPA id F31B936050E; Fri, 22 Sep 2023 06:47:04 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1695365225; a=rsa-sha256; cv=none; b=qIwgCcQPF2pXrjkZAfFwt3KXMe5ngnM+FQlO4BsYguXXiCZBVcE8KPKIRg/71ybQbBOdAo WZ8VNu37/eGcWtkqUuugLIoE4ItIdoZsqUg+Sw7DONavp5nfUb5c6k8g/aPevwVRKvl/5X kxJFc5Is8vH8Sa/UaDmo++tCq9wcoRrChDdsD8hSc85iyO0UjF1ONkfS/Hj+eTuwh+nL7I fHGNuQRdc4FfB/gkD6yIDD5YZaVc5ZVYOTkbM4TWUCEuekKylcdw8AZmJNyA2lJ9MNonKJ IK9HSWfhh3GZxqhv24iRJ43aGGR1llCueWn6ucT177V2tOVWF9wjvtBX+xMk2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1695365225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GaxYSbytD2sy/gOihJCDCRwszY4fws55f/aOetxpxMg=; b=iEI+6gD9ixO4BtLYgo4sabA51h1he9xUL3agVpTGyoYXmazo+QnHufXr3Zk+qVAeZKazMW KXN6Avfhoak3ySg2NrWTpdy6pc0aC9++jS0ENBrkcrPkvtn9hmDm6HXMSDNd0xn2/Hrhe2 u8KpJdePMWrR1d/wA95cFaY1zIz91fYQEsu7bsnkeBx9Ak5Z9ckzpK1HQueAvtk34Lk4iB vP3jFr6JcKS+tfn9tEE/BhjnisgIByyLYL+3Xlj1SyC4axpK9kZaGSMF53KlcueNC43GoW U0s4L/OufJ+4jWzz7ZS9BSmSZereo6nYRJ1WIUFH8Vpm0T3VtOmq8lGL+tdypA== ARC-Authentication-Results: i=1; rspamd-7c449d4847-sc2sv; auth=pass smtp.auth=stablehost smtp.mailfrom=mattias@nyrell.se X-Sender-Id: stablehost|x-authuser|mattias@nyrell.se X-MC-Relay: Neutral X-MailChannels-SenderId: stablehost|x-authuser|mattias@nyrell.se X-MailChannels-Auth-Id: stablehost X-Squirrel-Obese: 5918d6d11caa4b48_1695365225921_1292329460 X-MC-Loop-Signature: 1695365225921:318453344 X-MC-Ingress-Time: 1695365225921 Original-Received: from swe06.stablehost.com (swe06.stablehost.com [185.215.199.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.99.159.71 (trex/6.9.1); Fri, 22 Sep 2023 06:47:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nyrell.se; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Cc :To:From:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GaxYSbytD2sy/gOihJCDCRwszY4fws55f/aOetxpxMg=; b=Woa5BKK8+EvijoMJBfyqwNw3ru 933Uy5UJpZtsLIpMqjYs1/qgIXUBnJO1xEoi8WBhqqti23+zrzzizaDCw987qSzfDzacI3fc7ZPUc S1OazrBZkpfb3gE5KRGB6yQsT71WizjQiCnfSpbrbSaBJHAkSMLWVhM9vLKDIjGxQYyix82ZwTLib DviR2rEVHmstbUHHxFDMFOMW89YHURjZCXxJy7yl++25IXDguoLfsKywgYj6k0OH6VTXjdl4OI2zf MRp8N/pssIwCYJw6YAw+WIq4GgWPbf/UKxaH6/xr3VLKC8C7/CCyKnSMwW3YqB/XE+JUl5Pr6nPLU xRJbWm0g==; Original-Received: from [88.131.68.202] (port=55511 helo=[10.15.122.134]) by swe06.stablehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qjZwQ-0008P5-03; Fri, 22 Sep 2023 06:47:02 +0000 Content-Language: en-US In-Reply-To: <79870529-9459-5ed9-3d90-18f449efc838@nyrell.se> X-AuthUser: mattias@nyrell.se 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271038 Archived-At: On 2023-09-21 21:04, Mattias Nyrell wrote: > > > On 2023-09-21 20:51, Eli Zaretskii wrote: >> [Please use Reply All to reply, to keep the bug tracer CC'ed.] >> >>> Date: Thu, 21 Sep 2023 20:48:19 +0200 >>> From: Mattias Nyrell >>> >>> >>> >>> On 2023-09-21 18:39, Eli Zaretskii wrote: >>>>> Date: Thu, 21 Sep 2023 18:16:01 +0200 >>>>> From: Mattias Nyrell >>>>> >>>>> Starting from emacs -Q, enter the following in *scratch*: >>>>> >>>>> (let ((f (make-frame '((fullscreen . maximized))))) >>>>>      (select-frame-set-input-focus f) >>>>>      (message "window-body-width=%s" (window-body-width)) >>>>>      (sleep-for 1) >>>>>      (message "window-body-width=%s" (window-body-width)) ) >>>>> >>>>> Execute with C-x C-e >>>>> >>>>> Result: >>>>> - A new frame is created. >>>>> - The message "window-body-width=80" is printed >>>>> - The message "window-body-width=190" is printed (exact value >>>>> depending >>>>> on screen size of course) >>>>> >>>>> Expected result: >>>>> The first printed message should be the same as the second printed >>>>> message. >>>> Isn't it because the actual resizing of the frame is done by the >>>> window-system, and we can only ask it to do so? >>>> >>>> IOW, I think your expectation is incorrect, as it assumes that frame >>>> move/resize operations are executed immediately. >>> I have no idea, but your explanation sounds very reasonable and it is >>> probably right! >>> >>> Is there a way to get notified when the resize operation has finished? >>> Or is sleeping for a short while a reasonable solution? >> Yes, calling sleep-for is one way.  I would also suggest to try >> >>    (sit-for 0) >> >> If that works, it is faster. > Ok, thank you! > > /Mattias I tried (sit-for 0) and even (sit-for 5), but none of those worked. (sleep-for 0.1) or (sleep-for 0) worked for me. /Mattias