From: Lars Ingebrigtsen <larsi@gnus.org>
To: Po Lu <luangruo@yahoo.com>
Cc: James Ahlborn <jahlborn@getguru.com>,
martin rudalics <rudalics@gmx.at>,
54863@debbugs.gnu.org
Subject: bug#54863: 28.1; hook move-frame-functions not working in emacs 28.1
Date: Tue, 06 Sep 2022 15:24:22 +0200 [thread overview]
Message-ID: <877d2gskjd.fsf@gnus.org> (raw)
In-Reply-To: <87a67cbt0t.fsf@yahoo.com> (Po Lu's message of "Tue, 06 Sep 2022 20:13:06 +0800")
Po Lu <luangruo@yahoo.com> writes:
> I missed a call to kbd_buffer_store_event after the last XSETINT.
> What happens if you add:
>
> kbd_buffer_store_event (&ie);
With the following patch, the hook fires when I move the frame on Macos.
diff --git a/src/nsterm.m b/src/nsterm.m
index 6c6151701b..bc4e072ea0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7912,6 +7912,7 @@ - (void)windowDidMove: sender
NSRect r = [win frame];
NSArray *screens = [NSScreen screens];
NSScreen *screen = [screens objectAtIndex: 0];
+ struct input_event ie;
NSTRACE ("[EmacsView windowDidMove:]");
@@ -7922,12 +7923,14 @@ - (void)windowDidMove: sender
emacsframe->left_pos = NSMinX (r) - NS_PARENT_WINDOW_LEFT_POS (emacsframe);
emacsframe->top_pos = NS_PARENT_WINDOW_TOP_POS (emacsframe) - NSMaxY (r);
- // FIXME: after event part below didExitFullScreen is not received
- // if (emacs_event)
- // {
- // emacs_event->kind = MOVE_FRAME_EVENT;
- // EV_TRAILER ((id)nil);
- // }
+ if (emacs_event)
+ {
+ ie.kind = MOVE_FRAME_EVENT;
+ XSETFRAME (ie.frame_or_window, emacsframe);
+ XSETINT (ie.x, emacsframe->left_pos);
+ XSETINT (ie.y, emacsframe->top_pos);
+ kbd_buffer_store_event (&ie);
+ }
}
}
next prev parent reply other threads:[~2022-09-06 13:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 20:18 bug#54863: 28.1; hook move-frame-functions not working in emacs 28.1 James Ahlborn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-12 7:45 ` martin rudalics
2022-04-12 8:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-06 11:20 ` Lars Ingebrigtsen
2022-09-06 12:13 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-06 13:24 ` Lars Ingebrigtsen [this message]
2022-09-06 13:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-06 13:40 ` Lars Ingebrigtsen
2022-09-07 1:05 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-07 12:51 ` Lars Ingebrigtsen
2022-04-12 21:25 ` James Ahlborn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-13 8:45 ` martin rudalics
2022-04-13 13:07 ` James Ahlborn via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d2gskjd.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=54863@debbugs.gnu.org \
--cc=jahlborn@getguru.com \
--cc=luangruo@yahoo.com \
--cc=rudalics@gmx.at \
/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 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).