From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#28872: [PATCH v2] Fix NS frame resizing issues (bug#40200, bug#28872) Date: Sat, 28 Mar 2020 02:56:59 +0100 (CET) Message-ID: <20200328015657.GA66478@breton.holly.idiocy.org> References: <20200326212125.GA66331@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="16856"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40200@debbugs.gnu.org, 28872@debbugs.gnu.org, aaronjensen@gmail.com To: Andrii Kolomoiets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 28 02:58:13 2020 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 1jI0jk-0004Hs-Me for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Mar 2020 02:58:12 +0100 Original-Received: from localhost ([::1]:49202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jI0jj-0005Q3-KA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Mar 2020 21:58:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48687) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jI0jb-0005Pq-I5 for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 21:58:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jI0ja-0003xB-HR for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 21:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55823) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jI0ja-0003w5-0x for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 21:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jI0ja-0003PY-00 for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 21:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Mar 2020 01:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28872 X-GNU-PR-Package: emacs Original-Received: via spool by 28872-submit@debbugs.gnu.org id=B28872.158536063013039 (code B ref 28872); Sat, 28 Mar 2020 01:58:01 +0000 Original-Received: (at 28872) by debbugs.gnu.org; 28 Mar 2020 01:57:10 +0000 Original-Received: from localhost ([127.0.0.1]:33561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jI0ik-0003OE-HT for submit@debbugs.gnu.org; Fri, 27 Mar 2020 21:57:10 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:57948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jI0ih-0003Nd-MQ; Fri, 27 Mar 2020 21:57:09 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 2DC6F569; Sat, 28 Mar 2020 02:57:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1585360621; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; l=1512; bh=JbpLq6D54BVkg37xFu2xtP7LyEaAlAY9HKjrtZl5oGM=; b=nhN3VLX9tGAqrYD47CiRiZgmrIanxPQhCzk9skAqPoYIvvS8Qqs0ddFK6fdoUWl0 wf00DVzJEt81iFprNf45q2V8UUrGlbiwkmHwTrhBpJNUSL6VbEbi9hb2KosOmNyt/wP wsJJL+kIOLcPDuFCoQ7oRPpsKN69zUDe04cf5GIoECrUnnOIYsZVOqTbAoD3ZGlaA9W ILqdg3OAARphZc2BZKS/Ja4hVHRMUCw2UPjafsrT4a+EUhOzcKvXfajx9LJXjhioOQw D6I+rlvMqPxjmpB/q3rAe5WfBApPm8imTuDGreqisVt47r1FTPb9NDDuarX9pOc49jW xQlrCDDPvQ== Original-Received: by smtp.mailfence.com with ESMTPA ; Sat, 28 Mar 2020 02:56:58 +0100 (CET) Original-Received: by idiocy.org (Postfix, from userid 501) id 5A0402020AAF8D; Sat, 28 Mar 2020 01:56:57 +0000 (GMT) Mail-Followup-To: Alan Third , Andrii Kolomoiets , 40200@debbugs.gnu.org, 28872@debbugs.gnu.org, aaronjensen@gmail.com Content-Disposition: inline In-Reply-To: X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:177795 Archived-At: On Fri, Mar 27, 2020 at 03:22:08PM +0200, Andrii Kolomoiets wrote: > On 26 Mar 2020, at 23:21, Alan Third wrote: > > Hopefully this works better. > > Found another changed behavior: > 1. emacs -Q > 2. (setq test/frame (make-frame `((parent-frame . ,(selected-frame))))) > 3. (modify-frame-parameters test/frame '((height . 1) (top . (- 40)))) > > Old behavior: child frame is at bottom of the parent frame. This is wrong. > New behavior: child frame is at top of the parent frame. This is wrong too. > Child frame moves to bottom after code from step 3 applied one more time. Still wrong. The bottom of the child frame should be 40 pixels from the bottom of the parent frame. This is quite annoying, it means Emacs 27 behaves wrongly. I wonder if Emacs 26 does too, or has it been broken the whole time? > Step 3 can be replaced with these two steps to achieve old behavior: > (modify-frame-parameters test/frame '((height . 1))) > (modify-frame-parameters test/frame '((top . (- 40)))) I inadvertently made order of operations matter when they shouldn’t. I’ve got a fix for this, but it’s opening up a whole other can of worms regarding frame positioning and the reporting of positions. I think I know what to do but the last time I worked on this we had a lot of edge cases that weren’t easy to test, with multiple monitors and spaces. I think I’ll have to look at the old bug reports to work out how we handle that. -- Alan Third