all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Emacs developers <emacs-devel@gnu.org>
Subject: We should decouple focus and frame switching
Date: Sun, 10 Jun 2018 11:07:09 -0700	[thread overview]
Message-ID: <6d1bc582-29be-5df7-56b1-e82305ee477f@dancol.org> (raw)

Focus-in and focus-out don't do a good job right now of reflecting 
actual window system focus state, and that's in part due to the core 
considering frame switch evidence of a focus change and running the 
focus-in hooks in response. More than one frame can have window system 
focus at a time when we have multiple terminals, and even on a single 
terminal, internal frame switching for processing mouse wheel events and 
such shouldn't change the reported window system focus state.

How about this? We'll add a frame-focused-p function that returns nil, 
t, or 'unknown, and wire up focus-in-hook and focus-out-hook to run only 
when we actually observe a window system focus change, letting the frame 
switch stuff run completely independently. This way, we'll be able to 
write lisp (as I've been trying to do) that reflects the real window 
system focus.

Sound good?



             reply	other threads:[~2018-06-10 18:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-10 18:07 Daniel Colascione [this message]
2018-06-10 23:16 ` We should decouple focus and frame switching John Wiegley
2018-06-10 23:28   ` dancol
2018-06-11  0:04     ` T.V Raman
2018-06-11  0:20       ` dancol
2018-06-11  1:07         ` T.V Raman
2018-06-11 13:00           ` Clément Pit-Claudel
2018-06-11 15:17         ` Stefan Monnier
2018-06-11 15:56         ` Eli Zaretskii
2018-06-13  3:34     ` Michael Heerdegen
2018-06-13  3:50       ` dancol
2018-06-11  2:35 ` Eli Zaretskii
2018-06-11  3:24   ` dancol

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=6d1bc582-29be-5df7-56b1-e82305ee477f@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    /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.