mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Reenable reporting of frame movement on NS
* src/nsterm.m ([EmacsView windowDidMove:]): Restore code to generate MOVE_FRAME_EVENTS, and use kbd_buffer_store_event instead.
This commit is contained in:
parent
5308a4e11e
commit
976965eb5e
1 changed files with 14 additions and 8 deletions
22
src/nsterm.m
22
src/nsterm.m
|
|
@ -7912,22 +7912,28 @@ ns_create_font_panel_buttons (id target, SEL select, SEL cancel_action)
|
|||
NSRect r = [win frame];
|
||||
NSArray *screens = [NSScreen screens];
|
||||
NSScreen *screen = [screens objectAtIndex: 0];
|
||||
struct input_event ie;
|
||||
|
||||
NSTRACE ("[EmacsView windowDidMove:]");
|
||||
|
||||
if (!emacsframe->output_data.ns)
|
||||
return;
|
||||
|
||||
if (screen != nil)
|
||||
{
|
||||
emacsframe->left_pos = NSMinX (r) - NS_PARENT_WINDOW_LEFT_POS (emacsframe);
|
||||
emacsframe->top_pos = NS_PARENT_WINDOW_TOP_POS (emacsframe) - NSMaxY (r);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue