* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
@ 2024-10-28 23:36 Jimmy Yuen Ho Wong
2024-11-06 8:29 ` Robert Pluim
0 siblings, 1 reply; 14+ messages in thread
From: Jimmy Yuen Ho Wong @ 2024-10-28 23:36 UTC (permalink / raw)
To: 74074
Same problem as #74064, since I can't close duplicate, I'm filing this
one against Emacs 30 in the hope that it might get addressed.
Reproduction
1. eval the following in the scratch buffer
(let ((selected-frame (selected-frame)))
(add-hook 'move-frame-functions
(lambda (frame)
(with-selected-frame selected-frame
(message "frame pos in move-frame-functions: %s" (frame-position frame)))))
(add-hook 'window-size-change-functions
(lambda (frame)
(with-selected-frame selected-frame
(message "frame pos in window-size-change-functions %s" (frame-position frame)))))
(add-hook 'window-state-change-functions
(lambda (frame)
(with-selected-frame selected-frame
(message "frame pos in window-state-change-functions %s" (frame-position frame))))))
(make-frame '((width . 100) (height . 50)))
2. Resize the new frame from the top left corner on the title bar
3. Check the logs in the *Messages* buffer and notice the frame position
was never changed.
4. Move the new frame by dragging from the title bar, notice the
move-frame-functions hook was run and reported the new position.
Expectation:
When a frame is resized from the top left corner by the window manager, the frame position
should update and be reported to Elisp programs, otherwise Elisp
programs have no way to find out what the X/Y coordinate of the frame is
when its resized from the top left.
In GNU Emacs 30.0.92 (build 1, aarch64-apple-darwin23.6.0, NS
appkit-2487.70 Version 14.7.1 (Build 23H222)) of 2024-10-28 built on
MobileCat.localdomain
Windowing system distributor 'Apple', version 10.3.2487
System Description: macOS 14.7.1
Configured using:
'configure --prefix=/opt/local --disable-silent-rules --without-dbus
--without-gconf --without-libotf --without-m17n-flt --with-libgmp
--with-gnutls --with-xml2 --with-modules --with-sqlite3 --with-webp
--infodir /opt/local/share/info/emacs --with-ns --with-lcms2
--without-harfbuzz --without-imagemagick --without-xaw3d --with-rsvg
--with-native-compilation=aot --with-tree-sitter 'CFLAGS=-pipe -Os
-Wno-attributes
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch
arm64' 'CPPFLAGS=-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie
-Wl,-rpath /opt/local/lib/gcc14 -Wl,-rpath /opt/local/lib
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
-arch arm64''
Configured features:
ACL GIF GLIB GMP GNUTLS JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY
KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
rainbow-mode: t
elisp-def-mode: t
corfu-terminal-mode: t
corfu-prescient-mode: t
display-line-numbers-mode: t
subword-mode: t
beginend-prog-mode: t
imenu-list-minor-mode: t
purpose-mode: t
windmove-mode: t
magit-todos-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
projectile-rails-global-mode: t
projectile-mode: t
pdf-occur-global-minor-mode: t
page-break-lines-mode: t
yas-minor-mode: t
marginalia-mode: t
vertico-prescient-mode: t
prescient-persist-mode: t
vertico-mouse-mode: t
vertico-mode: t
override-global-mode: t
envrc-mode: t
dap-tooltip-mode: t
dap-ui-many-windows-mode: t
dap-ui-controls-mode: t
dap-ui-mode: t
treemacs-filewatch-mode: t
treemacs-follow-mode: t
treemacs-git-mode: t
treemacs-fringe-indicator-mode: t
winner-mode: t
which-key-mode: t
which-function-mode: t
smooth-scrolling-mode: t
show-smartparens-global-mode: t
show-smartparens-mode: t
smartparens-global-mode: t
smartparens-mode: t
server-mode: t
savehist-mode: t
save-place-mode: t
rxt-global-mode: t
rxt-mode: t
recentf-mode: t
minibuffer-depth-indicate-mode: t
global-whitespace-cleanup-mode: t
whitespace-cleanup-mode: t
global-treesit-fold-indicators-mode: t
global-treesit-fold-mode: t
global-so-long-mode: t
global-move-dup-mode: t
move-dup-mode: t
global-hl-line-mode: t
global-flycheck-mode: t
global-diff-hl-show-hunk-mouse-mode: t
diff-hl-show-hunk-mouse-mode: t
global-auto-revert-mode: t
global-aggressive-indent-mode: t
aggressive-indent-mode: t
gcmh-mode: t
editorconfig-mode: t
diff-hl-margin-mode: t
diff-hl-flydiff-mode: t
global-diff-hl-mode: t
desktop-save-mode: t
delete-selection-mode: t
dap-auto-configure-mode: t
dap-mode: t
corfu-popupinfo-mode: t
global-corfu-mode: t
corfu-mode: t
auto-compile-on-save-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
window-divider-mode: t
minibuffer-regexp-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
visual-line-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
temp-buffer-resize-mode: t
Load-path shadows:
/Users/wyuenho/.emacs.d/elpa/ef-themes-1.8.0/theme-loaddefs hides /Users/wyuenho/.emacs.d/elpa/modus-themes-20241028.849/theme-loaddefs
/Users/wyuenho/.emacs.d/elpa/ef-themes-1.8.0/theme-loaddefs hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/theme-loaddefs
/Users/wyuenho/.emacs.d/elpa/transient-20241023.1537/transient hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/transient
/Users/wyuenho/.emacs.d/elpa/use-package-ensure-system-package-20221209.2013/use-package-ensure-system-package hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure-system-package
Features:
(shadow sort mail-extr emacsbug tramp-cmds tramp-sh jupyter-tramp
tramp-cache time-stamp jupyter-server jupyter-server-kernel jupyter-repl
jupyter-widget-client simple-httpd jupyter-client jupyter-kernel
jupyter-kernelspec jupyter-env jupyter-monads jupyter-messages hmac-def
jupyter-mime shr pixel-fill kinsoku url-file jupyter-rest-api websocket
jupyter-base shortdoc cape-keyword tabify helpful cc-langs trace
cl-print edebug info-look elisp-refs vundo mm-archive vc-hg vc-bzr
vc-src vc-sccs vc-svn vc-cvs vc-rcs all-the-icons-dired dired-collapse
dired-hacks-utils dired-aux tcl rainbow-mode elisp-def ert debug
backtrace lsp-modeline lsp-icons lsp-diagnostics lsp-completion
corfu-terminal popon corfu-prescient flycheck-inline flycheck-cask
indent-bars-ts indent-bars sphinx-doc display-line-numbers cap-words
superword subword smartparens-config smartparens-javascript
smartparens-rust smartparens-ruby smartparens-org smartparens-python
smartparens-markdown smartparens-text smartparens-html smartparens-c
beginend disp-table window-purpose-x shut-up imenu-list hideshow timeout
window-purpose window-purpose-fixes window-purpose-prefix-overload
window-purpose-switch window-purpose-layout window-purpose-core
window-purpose-configuration window-purpose-utils ibuffer-projectile
windmove dired-hide-dotfiles shrink-path git-timemachine vc-git
magit-lfs magit-todos hl-todo async forge-repos forge-tablist
forge-topics forge-commands forge-semi forge-bitbucket buck forge-gogs
gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy
gsexp ghub forge-notify forge-revnote forge-pullreq forge-issue
forge-topic eieio-custom bug-reference forge-post forge-repo forge
forge-core forge-db closql emacsql-sqlite-common emacsql
emacsql-compiler magit-bookmark magit-submodule magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
magit-diff smerge-mode git-commit log-edit message sendmail yank-media
rfc822 mml mml-sec epa gnus-util mailabbrev gmm-utils add-log magit-core
magit-autorevert magit-margin magit-transient magit-process with-editor
magit-mode benchmark magit-git magit-base magit-section cursor-sensor
crm ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util rg rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep
rg-history rg-header projectile-rails rake inflections inf-ruby
ruby-mode autoinsert lsp-metals view lsp-metals-treeview
lsp-metals-protocol lsp-sourcekit go-ts-mode lsp cargo cargo-process
flycheck-rust rust-ts-mode flycheck-golangci-lint cmake-ts-mode
yard-mode lsp-pyright pet lsp-jedi python-pytest projectile grep
transient ruff-format python-isort python-black python
typescript-ts-mode prettier tramp trampver tramp-integration files-x
tramp-message tramp-compat shell tramp-loaddefs nvm iter2 jsdoc dap-java
lsp-java request mailheader mail-utils reformatter dockerfile-ts-mode
toml-ts-mode yaml-mode verb verb-util js c-ts-common cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
embark-org org-element org-persist xdg org-id org-refile org-element-ast
avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-src sh-script smie executable ob-comint org-pcomplete
pcomplete org-list org-footnote org-faces org-entities org-version
ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold
org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs
org-compat org-macs quick-peek cape lsp-ui lsp-ui-flycheck lsp-ui-doc
goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline lsp-ui-util
face-remap pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw cedet pdf-isearch pdf-misc
pdf-loader pdf-tools pdf-view treemacs-bookmarks treemacs-tags bookmark
jka-compr pdf-cache pdf-info tq pdf-util format-spec pdf-macs image-mode
exif yasnippet-snippets yasnippet page-break-lines iedit iedit-lib
mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu
mc-cycle-cursors multiple-cursors-core rect embark ffap marginalia
vertico-prescient prescient char-fold vertico-mouse vertico-directory
vertico scroll-on-jump pager-default-keybindings pager browse-kill-ring
edmacro kmacro use-package-bind-key bind-key use-package-delight envrc
inheritenv exec-path-from-shell spaceline-config spaceline-segments
spaceline powerline powerline-separators powerline-themes
modus-vivendi-tinted-theme modus-themes all-the-icons
all-the-icons-faces all-the-icons-data-material-icons
all-the-icons-data-fluentui-system-icons
all-the-icons-data-fontawesome-4 all-the-icons-data-weather-icons
all-the-icons-data-vscode-codicons all-the-icons-data-octicons
all-the-icons-data-mfixx all-the-icons-data-file-icons
all-the-icons-data-devopicons all-the-icons-data-alltheicons svg dom xml
mode-local parse-time iso8601 time-date delight quelpa-use-package
use-package-core quelpa mm-decode mm-bodies mm-encode lisp-mnt help-fns
radix-tree finder-inf gnutls url-cache url-http url-auth mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw dap-mouse
dap-ui lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes
treemacs-treelib treemacs treemacs-header-line treemacs-compatibility
treemacs-mode treemacs-interface treemacs-persistence
treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering
treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom
treemacs-visuals treemacs-fringe-indicator pulse treemacs-faces
treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils
pfuture treemacs-logging treemacs-customization treemacs-macros gdb-mi
bindat gud bui bui-list bui-info bui-entry bui-core bui-history
bui-button bui-utils cus-edit pp lsp-lens winner which-key which-func
smooth-scrolling smartparens loadhist server savehist saveplace pcre2el
rxt re-builder recentf mb-depth help-at-pt whitespace-cleanup-mode
advice whitespace treesit-fold-indicators treesit-fold
treesit-fold-summary treesit-fold-parsers treesit treesit-fold-util
so-long move-dup hl-line flycheck find-func diff-hl-show-hunk
diff-hl-inline-popup autorevert aggressive-indent gcmh editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
diff-hl-margin diff-hl-dired dired dired-loaddefs diff-hl-flydiff diff
diff-hl log-view pcvs-util vc-dir vc vc-dispatcher diff-mode
track-changes easy-mmode desktop frameset delsel dap-mode dap-tasks
dap-launch lsp-docker yaml posframe dap-overlays lsp-mode lsp-protocol
xref project tree-widget wid-edit spinner network-stream puny nsm
markdown-mode color thingatpt noutline outline lv inline imenu ht
filenotify f s ewoc epg rfc6068 epg-config dash compile
text-property-search comint ansi-osc ansi-color ring corfu-popupinfo
corfu compat auto-compile let-alist cus-load
add-node-modules-path-autoloads ag-autoloads aggressive-indent-autoloads
all-the-icons-dired-autoloads all-the-icons-autoloads
apib-mode-autoloads arduino-mode-autoloads ede/auto eieio-base
auto-compile-autoloads auto-yasnippet-autoloads bazel-autoloads
beginend-autoloads browse-kill-ring-autoloads bug-hunter-autoloads
buttercup-autoloads cape-autoloads cargo-autoloads cask-mode-autoloads
corfu-prescient-autoloads corfu-terminal-autoloads corfu-autoloads
coverage-autoloads crux-autoloads csv-mode-autoloads
cycle-quotes-autoloads dape-autoloads delight-autoloads
diff-ansi-autoloads diff-hl-autoloads dired-collapse-autoloads
dired-hacks-utils-autoloads dired-hide-dotfiles-autoloads
docker-compose-mode-autoloads dotenv-mode-autoloads ef-themes-autoloads
elisp-def-autoloads embark-autoloads emmet-mode-autoloads
enh-ruby-mode-autoloads envrc-autoloads exec-path-from-shell-autoloads
expreg-autoloads flycheck-cask-autoloads
flycheck-golangci-lint-autoloads flycheck-inline-autoloads
flycheck-package-autoloads flycheck-rust-autoloads flycheck-autoloads
focus-autoloads fontify-face-autoloads forge-autoloads closql-autoloads
emacsql-autoloads gcmh-autoloads ghub-autoloads git-modes-autoloads
git-timemachine-autoloads gnu-elpa-keyring-update-autoloads
go-mode-autoloads gptel-autoloads graphql-mode-autoloads
graphviz-dot-mode-autoloads groovy-mode-autoloads helpful-autoloads
elisp-refs-autoloads ialign-autoloads ibuffer-projectile-autoloads
iedit-autoloads imenu-anywhere-autoloads impostman-autoloads
indent-bars-autoloads inheritenv-autoloads inputrc-mode-autoloads
jq-mode-autoloads jsdoc-autoloads jsonian-autoloads jupyter-autoloads
just-mode-autoloads kurecolor-autoloads lorem-ipsum-autoloads
lsp-java-autoloads lsp-jedi-autoloads lsp-metals-autoloads
dap-mode-autoloads lsp-docker-autoloads bui-autoloads
lsp-pyright-autoloads lsp-sourcekit-autoloads lsp-treemacs-autoloads
lsp-ui-autoloads lsp-mode-autoloads macrostep-autoloads
magit-lfs-autoloads magit-todos-autoloads magit-autoloads
magit-section-autoloads hl-todo-autoloads async-autoloads
marginalia-autoloads markdown-mode-autoloads mermaid-mode-autoloads
modus-themes-autoloads monky-autoloads move-dup-autoloads
multiple-cursors-autoloads nodejs-repl-autoloads olivetti-autoloads
opencl-c-mode-autoloads ov-autoloads package-build-autoloads derived
package-lint-autoloads page-break-lines-autoloads
pager-default-keybindings-autoloads pager-autoloads pcre2el-autoloads
pdf-tools-autoloads pet-autoloads plantuml-mode-autoloads
po-mode-autoloads popon-autoloads prettier-autoloads nvm-autoloads
iter2-autoloads projectile-rails-autoloads inf-ruby-autoloads
inflections-autoloads projectile-autoloads protobuf-mode-autoloads
python-black-autoloads python-isort-autoloads python-pytest-autoloads
quelpa-use-package-autoloads quelpa-autoloads quick-peek-autoloads
rainbow-mode-autoloads rake-autoloads repeat-help-autoloads rg-autoloads
ron-mode-autoloads ruff-format-autoloads sass-mode-autoloads
haml-mode-autoloads sbt-mode-autoloads scala-mode-autoloads
scroll-on-jump-autoloads shfmt-autoloads shift-number-autoloads
shrink-path-autoloads f-autoloads simple-httpd-autoloads
smart-semicolon-autoloads smartparens-autoloads
smooth-scrolling-autoloads spaceline-autoloads powerline-autoloads
sphinx-doc-autoloads spinner-autoloads ssh-config-mode-autoloads
string-inflection-autoloads swagg-autoloads request-autoloads
swift-mode-autoloads tablist-autoloads terraform-mode-autoloads
hcl-mode-autoloads timeout-autoloads transient-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads
hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads
avy-autoloads s-autoloads dash-autoloads treepy-autoloads
treesit-fold-autoloads ts-comint-autoloads tuareg-autoloads
caml-autoloads udev-mode-autoloads
use-package-ensure-system-package-autoloads system-packages-autoloads
verb-autoloads vertico-prescient-autoloads vertico-autoloads
prescient-autoloads visual-regexp-steroids-autoloads
visual-regexp-autoloads vterm-autoloads vundo-autoloads
web-mode-autoloads websocket-autoloads wgrep-ag-autoloads
wgrep-autoloads whitespace-cleanup-mode-autoloads
window-purpose-autoloads shut-up-autoloads imenu-list-autoloads info
with-editor-autoloads yaml-mode-autoloads yaml-pro-autoloads
yaml-autoloads yard-mode-autoloads yarn-mode-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads zig-mode-autoloads
reformatter-autoloads zmq-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source eieio eieio-core password-cache json map byte-opt url-vars
comp cl-seq comp-cstr cl-extra help-mode warnings icons subr-x comp-run
bytecomp byte-compile comp-common rx pcase bootstrap-theme cl-macs gv
cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process native-compile emacs)
Memory information:
((conses 16 1256288 1186310) (symbols 48 76635 1) (strings 32 364612 115702)
(string-bytes 1 14317137) (vectors 16 137814) (vector-slots 8 1743272 201277)
(floats 8 1288 11162) (intervals 56 4398 2426) (buffers 992 38))
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
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
2024-11-06 9:31 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-06 12:58 ` Eli Zaretskii
0 siblings, 2 replies; 14+ messages in thread
From: Robert Pluim @ 2024-11-06 8:29 UTC (permalink / raw)
To: Jimmy Yuen Ho Wong; +Cc: 74074, martin rudalics
>>>>> 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
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-06 8:29 ` Robert Pluim
@ 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:58 ` Eli Zaretskii
1 sibling, 1 reply; 14+ messages in thread
From: martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-06 9:31 UTC (permalink / raw)
To: Robert Pluim, Jimmy Yuen Ho Wong; +Cc: 74074
> 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.
It works on MSWindows here. IIRC pgtk doesn't care abut positions at
all.
> 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.
I'm not sure I understand: Under X11 we "bunch up" all ConfigureNotify
events for one and the same window. If a user resizes a window by
dragging its top/left corner, they should all report different
positions.
> The question is: do we *want* to fix this?
Probably in a uniform way for all platforms (sans pgtk).
martin
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
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
0 siblings, 1 reply; 14+ messages in thread
From: Robert Pluim @ 2024-11-06 10:16 UTC (permalink / raw)
To: martin rudalics; +Cc: Po Lu, 74074, Jimmy Yuen Ho Wong
>>>>> On Wed, 6 Nov 2024 10:31:12 +0100, martin rudalics <rudalics@gmx.at> said:
>> 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.
martin> It works on MSWindows here. IIRC pgtk doesn't care abut positions at
martin> all.
pgtk doesnʼt let you programatically change the frame positions, but
Iʼm assuming it still reports them <time passes> Hmm, no, it
doesnʼt. I donʼt know if thatʼs expected or not. Po Lu?
(in fact, (frame-position) always reports the same values, whatever I
do to the frame. Yet another reason to avoid the 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.
martin> I'm not sure I understand: Under X11 we "bunch up" all ConfigureNotify
martin> events for one and the same window. If a user resizes a window by
martin> dragging its top/left corner, they should all report different
martin> positions.
On macOS the 'move' events all arrive at once after the resize finishes, and
they all report the final size of the frame. Of course that may be due
to my implementation (the window size changes are reported as they
happen, but they follow a different code path).
>> The question is: do we *want* to fix this?
martin> Probably in a uniform way for all platforms (sans pgtk).
OK
Robert
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
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
0 siblings, 0 replies; 14+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-06 12:52 UTC (permalink / raw)
To: Robert Pluim; +Cc: martin rudalics, Jimmy Yuen Ho Wong, 74074
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Wed, 6 Nov 2024 10:31:12 +0100, martin rudalics <rudalics@gmx.at> said:
>
> >> 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.
>
> martin> It works on MSWindows here. IIRC pgtk doesn't care abut positions at
> martin> all.
>
> pgtk doesnʼt let you programatically change the frame positions, but
> Iʼm assuming it still reports them <time passes> Hmm, no, it
> doesnʼt. I donʼt know if thatʼs expected or not. Po Lu?
It's expected, inasmuch as there are just no window positions under
Wayland. Where or how to position a toplevel surface visually is
compositor policy that is not exposed to clients.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-06 8:29 ` Robert Pluim
2024-11-06 9:31 ` martin rudalics 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
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2024-11-06 12:58 UTC (permalink / raw)
To: Robert Pluim, Po Lu; +Cc: 74074, wyuenho, rudalics
> Cc: 74074@debbugs.gnu.org, martin rudalics <rudalics@gmx.at>
> From: Robert Pluim <rpluim@gmail.com>
> Date: Wed, 06 Nov 2024 09:29:29 +0100
>
> 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.
This comes from the MOVE_FRAME_EVENT, which is triggered on Windows as
well.
Not sure about PGTK, though. Maybe Po Lu knows.
> 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?
What are the arguments against fixing this?
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
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
0 siblings, 2 replies; 14+ messages in thread
From: Robert Pluim @ 2024-11-06 13:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Po Lu, 74074, wyuenho, rudalics
>>>>> On Wed, 06 Nov 2024 14:58:58 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> Cc: 74074@debbugs.gnu.org, martin rudalics <rudalics@gmx.at>
>> From: Robert Pluim <rpluim@gmail.com>
>> Date: Wed, 06 Nov 2024 09:29:29 +0100
>>
>> 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.
Eli> This comes from the MOVE_FRAME_EVENT, which is triggered on Windows as
Eli> well.
Eli> Not sure about PGTK, though. Maybe Po Lu knows.
Po Lu has confirmed: PGTK has no frame positions
>> 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?
Eli> What are the arguments against fixing this?
Itʼs changing the number of platforms that this can be depended on
from 2 out of 4 to 3 out of 4, which means itʼs still not useful for
package authors (not that I think itʼs a particularly useful API in
any case :-). But itʼs a small change:
diff --git a/src/nsterm.m b/src/nsterm.m
index 8c405738467..1d18f022713 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7895,6 +7895,9 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize
NSTRACE_RETURN_SIZE (frameSize);
+ /* Trigger `move-frame-functions'. */
+ [self windowDidMove:(NSNotification *)sender];
+
return frameSize;
}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-06 13:50 ` Robert Pluim
@ 2024-11-06 13:59 ` Jimmy Wong
2024-11-06 14:36 ` Eli Zaretskii
1 sibling, 0 replies; 14+ messages in thread
From: Jimmy Wong @ 2024-11-06 13:59 UTC (permalink / raw)
To: Eli Zaretskii, Robert Pluim; +Cc: Po Lu, 74074, rudalics
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
> > > > > > Itʼs changing the number of platforms that this can be depended on
> > > > > > from 2 out of 4 to 3 out of 4, which means itʼs still not useful for
> > > > > > package authors (not that I think itʼs a particularly useful API in
> > > > > >
The reason I filed this is because I needed something that can synchronize the positions of 2 child frames without doing crazy math just on macOS. It's definitely useful.
[-- Attachment #2: Type: text/html, Size: 1531 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
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
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2024-11-06 14:36 UTC (permalink / raw)
To: Robert Pluim; +Cc: luangruo, 74074, wyuenho, rudalics
> From: Robert Pluim <rpluim@gmail.com>
> Cc: Po Lu <luangruo@yahoo.com>, wyuenho@gmail.com, 74074@debbugs.gnu.org,
> rudalics@gmx.at
> Date: Wed, 06 Nov 2024 14:50:59 +0100
>
> >>>>> On Wed, 06 Nov 2024 14:58:58 +0200, Eli Zaretskii <eliz@gnu.org> said:
>
> >> 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?
>
> Eli> What are the arguments against fixing this?
>
> Itʼs changing the number of platforms that this can be depended on
> from 2 out of 4 to 3 out of 4, which means itʼs still not useful for
> package authors (not that I think itʼs a particularly useful API in
> any case :-). But itʼs a small change:
>
> diff --git a/src/nsterm.m b/src/nsterm.m
> index 8c405738467..1d18f022713 100644
> --- a/src/nsterm.m
> +++ b/src/nsterm.m
> @@ -7895,6 +7895,9 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize
>
> NSTRACE_RETURN_SIZE (frameSize);
>
> + /* Trigger `move-frame-functions'. */
> + [self windowDidMove:(NSNotification *)sender];
> +
> return frameSize;
> }
If no one objects, I think we should install this.
Thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-06 14:36 ` Eli Zaretskii
@ 2024-11-07 8:34 ` Robert Pluim
2024-11-07 18:26 ` Jimmy Wong
0 siblings, 1 reply; 14+ messages in thread
From: Robert Pluim @ 2024-11-07 8:34 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: luangruo, 74074, wyuenho, rudalics
>>>>> On Wed, 06 Nov 2024 16:36:24 +0200, Eli Zaretskii <eliz@gnu.org> said:
Eli> If no one objects, I think we should install this
Sure, although Jimmy hasnʼt yet said it fixes his issue 😀
Robert
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-07 8:34 ` Robert Pluim
@ 2024-11-07 18:26 ` Jimmy Wong
2024-11-07 20:13 ` Robert Pluim
0 siblings, 1 reply; 14+ messages in thread
From: Jimmy Wong @ 2024-11-07 18:26 UTC (permalink / raw)
To: Eli Zaretskii, Robert Pluim; +Cc: luangruo, 74074, rudalics
[-- Attachment #1: Type: text/plain, Size: 339 bytes --]
It works! Thank you!
Jimmy
On Nov 7, 2024 at 8:35 AM +0000, Robert Pluim <rpluim@gmail.com>, wrote:
> > > > > > On Wed, 06 Nov 2024 16:36:24 +0200, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> If no one objects, I think we should install this
>
> Sure, although Jimmy hasnʼt yet said it fixes his issue 😀
>
> Robert
> --
[-- Attachment #2: Type: text/html, Size: 1032 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-07 18:26 ` Jimmy Wong
@ 2024-11-07 20:13 ` Robert Pluim
2024-11-08 12:26 ` Jimmy Wong
0 siblings, 1 reply; 14+ messages in thread
From: Robert Pluim @ 2024-11-07 20:13 UTC (permalink / raw)
To: Jimmy Wong; +Cc: luangruo, 74074, Eli Zaretskii, rudalics
tags 74074 fixed
close 74074 31.1
quit
>>>>> On Thu, 7 Nov 2024 18:26:22 +0000, Jimmy Wong <wyuenho@gmail.com> said:
Jimmy> It works! Thank you!
Thanks for testing.
Closing.
Committed as 3e36267b25e
Robert
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-07 20:13 ` Robert Pluim
@ 2024-11-08 12:26 ` Jimmy Wong
2024-11-08 13:37 ` Robert Pluim
0 siblings, 1 reply; 14+ messages in thread
From: Jimmy Wong @ 2024-11-08 12:26 UTC (permalink / raw)
To: Robert Pluim; +Cc: luangruo, 74074, Eli Zaretskii, rudalics
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
Thanks for fixing.
Is it still possible to get this fix into Emacs 30 or it's too late now? I only tested on the Emacs 30 branch and it works there, I didn't test master, but it seems it's installed there.
Jimmy
On Nov 7, 2024 at 8:14 PM +0000, Robert Pluim <rpluim@gmail.com>, wrote:
> tags 74074 fixed
> close 74074 31.1
> quit
>
> > > > > > On Thu, 7 Nov 2024 18:26:22 +0000, Jimmy Wong <wyuenho@gmail.com> said:
>
> Jimmy> It works! Thank you!
>
> Thanks for testing.
>
> Closing.
> Committed as 3e36267b25e
>
> Robert
> --
[-- Attachment #2: Type: text/html, Size: 1286 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#74074: 30.0.92; [NS] Frame position not reported on resize from top left
2024-11-08 12:26 ` Jimmy Wong
@ 2024-11-08 13:37 ` Robert Pluim
0 siblings, 0 replies; 14+ messages in thread
From: Robert Pluim @ 2024-11-08 13:37 UTC (permalink / raw)
To: Jimmy Wong; +Cc: luangruo, 74074, Eli Zaretskii, rudalics
>>>>> On Fri, 8 Nov 2024 12:26:27 +0000, Jimmy Wong <wyuenho@gmail.com> said:
Jimmy> Thanks for fixing.
Jimmy> Is it still possible to get this fix into Emacs 30 or it's too late
Jimmy> now? I only tested on the Emacs 30 branch and it works there, I didn't
Jimmy> test master, but it seems it's installed there.
emacs-30 is in pretest, so the thought of installing a bugfix like
this there never crossed my mind.
Robert
--
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-11-08 13:37 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).