all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Raffael Stocker <r.stocker@mnet-mail.de>
Cc: 69083-done@debbugs.gnu.org
Subject: bug#69083: Emacs's keyboard hook state is not reset on session lock (Windows)
Date: Thu, 14 Mar 2024 10:25:07 +0200	[thread overview]
Message-ID: <86il1pb4po.fsf@gnu.org> (raw)
In-Reply-To: <yplmedcp7tra.fsf@mnet-mail.de> (message from Raffael Stocker on Mon, 04 Mar 2024 19:10:33 +0100)

> From: Raffael Stocker <r.stocker@mnet-mail.de>
> Cc: 69083@debbugs.gnu.org
> Date: Mon, 04 Mar 2024 19:10:33 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> The order is not important, I just didn't know where to look to get
> >> a frame; sorry for the noise.  I now use ‘Fnext_frame’.
> >
> > Unfortunately, I don't think you cannot use Fnext_frame here.  The
> > function which calls it, w32_wnd_proc, runs in a separate thread, so
> > it generally cannot access Lisp objects safely.  However, it is okay
> > to traverse the list of the frames, as w32_window_to_frame does, see
> > the comment at the beginning of w32_wnd_proc.  So I think you could
> > use a similar loop with FOR_EACH_FRAME, and use some frame from there,
> > perhaps the first one?
> >
> > Alternatively, and maybe more safely, you could call
> > maybe_pass_notification from w32_destroy_window, which is called from
> > the main (a.k.a. "Lisp") thread, so then you can use Fnext_frame
> > (actually, I would make next_frame extern instead of static and call
> > it directly).  This means the notifications are passed a bit before
> > the frame is actually deleted by the OS, but I think this is okay?
> 
> I went with the first option, using FOR_EACH_FRAME, because I am not
> sure about the safety of modifying the kbdhook struct from the other
> thread.

Thanks.  I needed to fix this in small ways, to get it to compile with
mingw.org's MinGW, and I've now installed the results on the master
branch.

With that, I'm closing this bug.





      reply	other threads:[~2024-03-14  8:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 19:04 bug#69083: Emacs's keyboard hook state is not reset on session lock (Windows) Raffael Stocker
2024-02-12 20:23 ` Eli Zaretskii
2024-02-14 20:20   ` Raffael Stocker
2024-02-15  6:36     ` Eli Zaretskii
2024-02-20 18:51       ` Raffael Stocker
2024-02-21 12:37         ` Eli Zaretskii
2024-02-21 14:13           ` Raffael Stocker
2024-02-21 15:03             ` Eli Zaretskii
2024-02-26 20:50           ` Raffael Stocker
2024-02-27  7:42             ` Eli Zaretskii
2024-02-29 20:22               ` Raffael Stocker
2024-03-01  6:41                 ` Eli Zaretskii
2024-03-03 16:43                   ` Raffael Stocker
2024-03-03 17:23                     ` Eli Zaretskii
2024-03-03 17:39                       ` Eli Zaretskii
2024-03-04 18:10                       ` Raffael Stocker
2024-03-14  8:25                         ` Eli Zaretskii [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86il1pb4po.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69083-done@debbugs.gnu.org \
    --cc=r.stocker@mnet-mail.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.