all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
Cc: 74074@debbugs.gnu.org, martin rudalics <rudalics@gmx.at>
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	[thread overview]
Message-ID: <87y11wn4t2.fsf@gmail.com> (raw)
In-Reply-To: <m2v7xbztnv.fsf@MobileCat.localdomain> (Jimmy Yuen Ho Wong's message of "Mon, 28 Oct 2024 23:36:52 +0000")

>>>>> On Mon, 28 Oct 2024 23:36:52 +0000, Jimmy Yuen Ho Wong <wyuenho@gmail.com> said:

    Jimmy> Same problem as #74064, since I can't close duplicate, I'm filing 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-functions %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-functions %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 manager, 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ʼt know what happens on MSWindows or
in a pgtk build.

A quick experiment shows that itʼs fixable on macOS, although there is
a (strong) tendency for the 'moveʼ 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
-- 





  reply	other threads:[~2024-11-06  8:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 23:36 bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left Jimmy Yuen Ho Wong
2024-11-06  8:29 ` Robert Pluim [this message]
2024-11-06  9:31   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-06 10:16     ` Robert Pluim
2024-11-06 12:52       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-06 12:58   ` Eli Zaretskii
2024-11-06 13:50     ` Robert Pluim
2024-11-06 13:59       ` Jimmy Wong
2024-11-06 14:36       ` Eli Zaretskii
2024-11-07  8:34         ` Robert Pluim
2024-11-07 18:26           ` Jimmy Wong
2024-11-07 20:13             ` Robert Pluim
2024-11-08 12:26               ` Jimmy Wong
2024-11-08 13:37                 ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y11wn4t2.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=74074@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    --cc=wyuenho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.