GNU bug report logs - #74074
30.0.92; [NS] Frame position not reported on resize from top left

Previous Next

Package: emacs;

Reported by: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Mon, 28 Oct 2024 23:38:01 UTC

Severity: normal

Tags: fixed

Merged with 74064

Found in versions 29.4, 30.0.92

Fixed in version 31.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
Cc: 74074 <at> debbugs.gnu.org, martin rudalics <rudalics <at> 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
>>>>> On Mon, 28 Oct 2024 23:36:52 +0000, Jimmy Yuen Ho Wong <wyuenho <at> 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
-- 




This bug report was last modified 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.