Subject: Re: bug#61719: 29.0.60; pgtk focus problem with Sway 1.7

From: Sean Whitton <[email-masked]>
Date: Fri, 24 Feb 2023 13:34:03 -0700

Hello,

On Thu 23 Feb 2023 at 09:52PM -07, Sean Whitton wrote:

> On Thu 23 Feb 2023 at 05:35PM +08, Po Lu wrote:
>
>> Would you please run Emacs with ``WAYLAND_DEBUG=client'' and show the
>> print out around the time you create the new frame?
>>
>> The output will be very verbose, but please send the entirety, and not
>> just what you think to be the problem.  Thanks.
>
> Hmm.  I just restarted Sway and now I can't reproduce it, but before I
> restarted it, I could reproduce it reliably.
>
> I will keep trying every few hours and see.

Alright, I have reproduced it again now, twice.  I am sending the logs
off-list just in case there are privacy implications; please do not post.

wayland_debug:

1. WAYLAND_DEBUG=client emacs -Q --fg-daemon=foo 2>tmp/wayland_debug &
2. emacsclient -sfoo -nc; sleep 5; emacsclient -sfoo -nc
3. Close both of the frames.
4. emacsclient -sfoo -nc
5. In this frame, C-x C-f worked, unlike in my initial report, but
   self-insert chars didn't appear until I'd typed the key many times.
   The self-insert chars don't appear in the terminal emulator that's
   the previously selected window.
6. M-x kill-emacs
7. Repeated steps 4--6.  Same result.

wayland_debug2:

1. WAYLAND_DEBUG=client emacs -Q --fg-daemon=foo 2>tmp/wayland_debug2 &
2. emacsclient -sfoo -nc; sleep 5; emacsclient -sfoo -nc
3. Close both of the frames.
4. emacsclient -sfoo -nc; sleep 5; emacsclient -sfoo -nc
5. Try to type into second frame.
   In this case, C-x C-f didn't appear to work in the second frame.
   When I tried to type it, the mode line changed to mode-line-inactive.
   The other frame seems to have a "Find file:" prompt.
   After a few seconds this prompt also appeared in the second frame.
6. M-x kill-emacs

Let me know if you want me to try some other variation.

Thanks!

-- 
Sean Whitton