aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Möllmann2024-10-21 15:40:15 +0200
committerGerd Möllmann2024-10-22 06:40:20 +0200
commit4a3ba42e6f86fa85b457bdeba9e08ccb4219107d (patch)
tree8c3714b99ead79efd96ed91857b8facabce66337
parent0012e555d963b1df2d2c8be9f515ddf09417e110 (diff)
downloademacs-4a3ba42e6f86fa85b457bdeba9e08ccb4219107d.tar.gz
emacs-4a3ba42e6f86fa85b457bdeba9e08ccb4219107d.zip
Comment
-rw-r--r--src/frame.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/src/frame.c b/src/frame.c
index 1cdd923150d..25c307b3c6a 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1563,14 +1563,11 @@ affects all frames on the same terminal device. */)
1563 if (CONSP (undecorated) && !NILP (XCDR (undecorated))) 1563 if (CONSP (undecorated) && !NILP (XCDR (undecorated)))
1564 f->undecorated = true; 1564 f->undecorated = true;
1565 1565
1566 /* FIXME/tty: The only way to get borders on a tty is 1566 /* Unused at present. */
1567 to allow decorations for now. */
1568 Lisp_Object no_focus = Fassq (Qno_accept_focus, parms); 1567 Lisp_Object no_focus = Fassq (Qno_accept_focus, parms);
1569 if (CONSP (no_focus) && !NILP (XCDR (no_focus))) 1568 if (CONSP (no_focus) && !NILP (XCDR (no_focus)))
1570 f->no_accept_focus = true; 1569 f->no_accept_focus = true;
1571 1570
1572 /* FIXME/tty: The only way to get borders on a tty is
1573 to allow decorations for now. */
1574 Lisp_Object no_split = Fassq (Qunsplittable, parms); 1571 Lisp_Object no_split = Fassq (Qunsplittable, parms);
1575 if (CONSP (no_split) && !NILP (XCDR (no_split))) 1572 if (CONSP (no_split) && !NILP (XCDR (no_split)))
1576 f->no_split = true; 1573 f->no_split = true;
@@ -1793,25 +1790,32 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
1793 with your typing being interpreted in the new frame instead of 1790 with your typing being interpreted in the new frame instead of
1794 the one you're actually typing in. */ 1791 the one you're actually typing in. */
1795 1792
1796 /* FIXME/tty: I don't understand this. Setting the last event 1793 /* FIXME/tty: I don't understand this. (The comment aove is from
1797 frame to nil leads to switch-frame events being generated even 1794 Jim BLandy 1993 BTW.)
1798 if they normally wouldn't because the frame in question equals 1795
1799 selected-frame. This leads to problems at least on ttys. 1796 Setting the last event frame to nil leads to switch-frame events
1800 1797 being generated even if they normally wouldn't be because the frame
1801 Imagine that we have functions on post-command-hook that use 1798 in question equals selected-frame. See the places in keyboard.c
1802 with-selected-window (which is the case with Vertico-Posframe), 1799 where make_lispy_switch_frame is called.
1803 Secondly, let these functions select/restore windows on different 1800
1804 frames, so there will be select-frame calls with different frames 1801 This leads to problems at least on ttys.
1805 during the execution of post-command-hook. Setting 1802
1806 internal_last_event_frame to nil makes these select-frame calls 1803 Imagine that we have functions in post-command-hook that use
1807 potentially generate switch-frame events (but only in one direction 1804 select-frame in some way (e.g. with-selected-window). Let these
1808 (frame_ancestor_p), which I also don't understand). 1805 functions select different frames during the execution of
1809 1806 post-command-hook in command_loop_1. Setting
1810 These switch-frame events form an endless loop in command_loop_1 by 1807 internal_last_event_frame to nil here makes these select-frame
1811 running post-command-hook, which generates switch-frame events, 1808 calls (potentially, and reality) generate switch-frame events. (But
1812 which command_loop_1 finds (bound to '#ignore) and executes, which 1809 only in one direction (frame_ancestor_p), which I also don't
1813 again runs post-command-hook etc. ad infinitum. */ 1810 understand).
1811
1812 These switch-frame events form an endless loop in
1813 command_loop_1. It runs post-command-hook, which generates
1814 switch-frame events, which command_loop_1 finds (bound to '#ignore)
1815 and executes, which again runs post-command-hook etc. ad
1816 infinitum.
1814 1817
1818 Let's not do that for now on ttys. */
1815 if (!is_tty_frame (f)) 1819 if (!is_tty_frame (f))
1816 if (!frame_ancestor_p (f, sf)) 1820 if (!frame_ancestor_p (f, sf))
1817 internal_last_event_frame = Qnil; 1821 internal_last_event_frame = Qnil;