From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left Date: Wed, 06 Nov 2024 09:29:29 +0100 Message-ID: <87y11wn4t2.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22054"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74074@debbugs.gnu.org, martin rudalics To: Jimmy Yuen Ho Wong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 06 09:31:26 2024 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 1t8bRm-0005Yc-3B for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Nov 2024 09:31:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8bRR-00039g-Ju; Wed, 06 Nov 2024 03:31:05 -0500 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 1t8bRO-00039G-L5 for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 03:31:03 -0500 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 1t8bRO-0004q3-Cw for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 03:31:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=+XmIWEb9kpsk3lQLAvqJyjNsP4YX76mVdxpfheHE6Yo=; b=tNfkjHcSmWAKsHnZQTlxYCTKPdjLEDL9fJivAXMJ9r8u9/x8lQKcpNcHq8Rbr1t47AfVoIKtyVlF0+x12SqMJ08Dyc56hfP5mJ2uFDioxzNevAUwhbLeNu2yTPtk1RHriwfLXS76KRZ4EjZtDFvL9r7IbNLn55bwBexDkEB3YKhziPiFzM5hkUbC2BwZhxdmC6gP1Dl/94O9ZRO1B3WnQkXxjzCGJcWXePdE5T9Fxlchhqf99m4jv+W/kPzvsD2UsqLB1m7YkK1aA2Eg07wudJ6CIviZwUnBlJX8l4ska6LEjSRnyhPEcBGWDUZd+KRCA19uWUziGT3lgsTLiBmHOg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8bRO-00031x-7Y for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 03:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Nov 2024 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74074 X-GNU-PR-Package: emacs Original-Received: via spool by 74074-submit@debbugs.gnu.org id=B74074.173088183411610 (code B ref 74074); Wed, 06 Nov 2024 08:31:02 +0000 Original-Received: (at 74074) by debbugs.gnu.org; 6 Nov 2024 08:30:34 +0000 Original-Received: from localhost ([127.0.0.1]:39234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8bQw-00031C-5t for submit@debbugs.gnu.org; Wed, 06 Nov 2024 03:30:34 -0500 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:46357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8bQu-000312-98 for 74074@debbugs.gnu.org; Wed, 06 Nov 2024 03:30:32 -0500 Original-Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43167ff0f91so57026065e9.1 for <74074@debbugs.gnu.org>; Wed, 06 Nov 2024 00:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730881771; x=1731486571; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+XmIWEb9kpsk3lQLAvqJyjNsP4YX76mVdxpfheHE6Yo=; b=mmlANa5sjrWsxStSIQOoSt+evWOI1p02dr/loX7CAlSMN5wbzmkD1jt1VR4aV0b4gV wglPHGLGnJeoOiYRE0vBH97yA2chUUdrV3IqzocD9wAsdoFGttkSdOfBDwZVp5buarLy qSvuMvbJ94fxogwyFGEeRIbrlS8ezhCH0y5Z/UeGKeIPyq6nidu1ab1EBcteXu6nixIU V437ojLwcfpUqWmjZMuB3aZE6v9lfo/ww++CymcQP7jwFB2Qy0quntH+uwDZa0k4NPoG AoS+uRZ+znfqAqzllRL1E4o1RMFTNrzTiIFlgeUdwCKnIRuMsJ/rDhwuVBNT0Ej5IsJT iKvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730881771; x=1731486571; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+XmIWEb9kpsk3lQLAvqJyjNsP4YX76mVdxpfheHE6Yo=; b=wR9Q3VWV0QrGS5KJy662jFvFqFGFRT1DsRU94lPugSctuuXN8W06VV6Dp5PvCY+9Nx clCdZakq04Kw6r5zKji0wKA/KwtC0lITWyVcUdwI09FIFMAAyXhbBv71RmDmXfWhWyIi 84ZPIDRhd60PuEDaBsDtq+S+d8qlLf4X8xsxFPEHxYXk9YR8u+5nVPlml2G+7k6/kFmH d6kTqVbBOZITArMGu/j6azDsYRJA87v8md4ZknL5XbCQZgQDyr9kHX8fZ2zKhqtOoZuS III6O/2sKvPNVBkCQiBU602HVZmj3jzh7q7BD6TfHt5q1Pfs2dL7ykg07Mk9hPpMyr/q KhmA== X-Gm-Message-State: AOJu0YyN/64BWRghz3lrUw8Z2DQvwHfNNbLzEWUpKd52HNhHuUZecoSA /ivSVa6jkWR2KIJHz9ojPbG3eAJKmtH4sEDvZFtt1eaXxrw21HdZ X-Google-Smtp-Source: AGHT+IH7QDHRCoA8XFhI/gvFylv0MT4ETHNg+XkZ0yLZLmBVpFqCo0nqu4aZ6azkod9EgHijmdUI5g== X-Received: by 2002:a05:600c:3507:b0:431:1512:743b with SMTP id 5b1f17b1804b1-4327b7019a5mr197037215e9.21.1730881770940; Wed, 06 Nov 2024 00:29:30 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb51:dff4:95e6:c486:428f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432aa6c5fc8sm13638785e9.19.2024.11.06.00.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 00:29:30 -0800 (PST) In-Reply-To: (Jimmy Yuen Ho Wong's message of "Mon, 28 Oct 2024 23:36:52 +0000") 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:294937 Archived-At: >>>>> On Mon, 28 Oct 2024 23:36:52 +0000, Jimmy Yuen Ho Wong said: Jimmy> Same problem as #74064, since I can't close duplicate, I'm filin= g this Jimmy> one against Emacs 30 in the hope that it might get addressed. Jimmy> Reproduction Jimmy> 1. eval the following in the scratch buffer Jimmy> (let ((selected-frame (selected-frame))) Jimmy> (add-hook 'move-frame-functions Jimmy> (lambda (frame) Jimmy> (with-selected-frame selected-frame Jimmy> (message "frame pos in move-frame-functions: %s" = (frame-position frame))))) Jimmy> (add-hook 'window-size-change-functions Jimmy> (lambda (frame) Jimmy> (with-selected-frame selected-frame Jimmy> (message "frame pos in window-size-change-functio= ns %s" (frame-position frame))))) Jimmy> (add-hook 'window-state-change-functions Jimmy> (lambda (frame) Jimmy> (with-selected-frame selected-frame Jimmy> (message "frame pos in window-state-change-functi= ons %s" (frame-position frame)))))) Jimmy> (make-frame '((width . 100) (height . 50))) Jimmy> 2. Resize the new frame from the top left corner on the title bar Jimmy> 3. Check the logs in the *Messages* buffer and notice the frame = position Jimmy> was never changed. Jimmy> 4. Move the new frame by dragging from the title bar, notice the Jimmy> move-frame-functions hook was run and reported the new position. Jimmy> Expectation: Jimmy> When a frame is resized from the top left corner by the window m= anager, the frame position Jimmy> should update and be reported to Elisp programs, otherwise Elisp Jimmy> programs have no way to find out what the X/Y coordinate of the = frame is Jimmy> when its resized from the top left. I see that under X11, the `move-frame-functions' are called when resizing from the top left. I don=CA=BCt know what happens on MSWindows or in a pgtk build. A quick experiment shows that it=CA=BCs fixable on macOS, although there is a (strong) tendency for the 'move=CA=BC events to get bunched up until after the resize ends, which means they all report the same position. But then again this happens to a lesser extent under X as well. The question is: do we *want* to fix this? Robert --=20