[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Final" version of tty child frames
From: |
Gerd Möllmann |
Subject: |
Re: "Final" version of tty child frames |
Date: |
Sun, 12 Jan 2025 07:49:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> martin rudalics <rudalics@gmx.at> writes:
>>
>>> and emacs -Q -nw do C-l followed by M-l and C-l. That is, make a child
>>> frame, switch to it and make it invisible. This leaves the point (bar)
>>> cursor in the middle of the normal, root frame in an area where there's
>>> no text and you cannot really move it anywhere. 'xterm-mouse-mode' can
>>> help me out but this might not be available everywhere.
>>>
>>> Any ideas?
>>
>> The bar cursor must have been put where it is by redisplay. If the root
>> has no text where the bar cursor is, it must have been the display of
>> the child. Maybe the bar is still in the invisible child?
>>
>> That would fit with the fact that you can move the bar to the root frame
>> with the mouse IIUC, which should mean that C-x 5 o probably also works.
>>
>> I suspect make-frame-invisible has to do something. Do we have to
>> change selected-frame maybe? Or something like that?
>>
>> Please tell if you'd like me to take a look at this. I'm away for the
>> rest of the evening, so it would have to wait 'til tomorrow, alas.
>
> I've pulled now, and I can reproduce it here. Some observations.
>
> After C-l M-l the child frame is no longer visible, but the bar cursor
> is.
>
> M-: (frame-visible-p tty-child-frame)
> => t.
>
> That looks to me like something in the visibility department did not
> work, or worked only temporarily and was reverted (?). Which can also be
> seen with M-x redraw-display.
>
> ATM, I don't see where that could happen. Please let me know when you
> find something out.
I've used this to trace SET_FRAME_VISIBLE.
1 file changed, 5 insertions(+), 1 deletion(-)
src/frame.h | 6 +++++-
modified src/frame.h
@@ -1433,8 +1433,10 @@ #define AUTO_FRAME_ARG(name, parameter, value)
\
if some changes were applied to it while it wasn't visible (and hence
wasn't redisplayed). */
INLINE void
-SET_FRAME_VISIBLE (struct frame *f, bool v)
+xSET_FRAME_VISIBLE (struct frame *f, bool v, const char *file,
+ int line, const char *func)
{
+ fprintf (stderr, "%s:%d %s SET_FRAME_VISIBLE %p %d\n", file, line, func, f,
v);
if (v)
{
if (v == 1 && f->visible != 1)
@@ -1445,6 +1447,8 @@ SET_FRAME_VISIBLE (struct frame *f, bool v)
f->visible = v;
}
+#define SET_FRAME_VISIBLE(f, v) xSET_FRAME_VISIBLE(f, v, __FILE__, __LINE__,
__func__)
+
/* Set iconified status of frame F. */
INLINE void
SET_FRAME_ICONIFIED (struct frame *f, int i)
Now C-l M-l C-l M-x C-g. I see a trace like
Sun Jan 12 07:35:45 CET 2025
frame.c:1246 make_initial_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1369 make_terminal_frame SET_FRAME_VISIBLE 0x15506ef00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1782 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1782 do_switch_frame SET_FRAME_VISIBLE 0x15506ef00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1782 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1782 do_switch_frame SET_FRAME_VISIBLE 0x15506ef00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1782 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1782 do_switch_frame SET_FRAME_VISIBLE 0x15506ef00 1
frame.c:3136 Fmake_frame_visible SET_FRAME_VISIBLE 0x15506ef00 1
frame.c:3194 Fmake_frame_invisible SET_FRAME_VISIBLE 0x15506ef00 0
^^^^^^^
This is from the last C-l, and below is M-x C-g
frame.c:3136 Fmake_frame_visible SET_FRAME_VISIBLE 0x155015c00 1
frame.c:1781 do_switch_frame SET_FRAME_VISIBLE 0x155015c00 1
...
So the child is invisible after the last C-l. Whether or not it becoming
visible again is something else to consider later, I think.
- Re: "Final" version of tty child frames, (continued)
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/08
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/08
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/09
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/09
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/11
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/11
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/11
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/11
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/12
- Re: "Final" version of tty child frames,
Gerd Möllmann <=
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/12
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/12
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/12
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/12
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/12
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/12
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/12
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/12
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/12
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/14