all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: mouse-autoselect-window
Date: Thu, 06 Sep 2007 23:28:00 -0400	[thread overview]
Message-ID: <87odgff933.fsf@jbms.ath.cx> (raw)
In-Reply-To: <BNELLINCGFJLDJIKDGACIEDJCCAA.drew.adams@oracle.com> (Drew Adams's message of "Thu\, 6 Sep 2007 09\:36\:23 -0700")

"Drew Adams" <drew.adams@oracle.com> writes:

>> > `focus-follows-mouse' has no effect in MS Windows, according to
>> > the doc and to my experience.
>> 
>> The doc is wrong, and should be changed.
>> 
>> focus-follows-mouse has the same effect on Windows as on any other
>> system. AFAICT the only effect is that when set, the mouse gets moved to
>> the newly focused frame when the focussed frame is changed
>> programatically (so that the window manager honors the focus change).
>> You can see this with ediff for example.

> 1. I'm not 100% sure I understand you. I guess you mean that if, for
> example, some code does `select-frame-set-input-focus', then the mouse
> pointer will be moved to the newly selected frame. Is that right?

> That's certainly true. But if that is the only intended effect of
> `focus-follows-mouse', then I'd say that this option should be named
> `mouse-follows-focus', not the reverse. IOW, what you describe (and what I
> see) is that _if_ the focus is changed to another frame _then_ the mouse is
> warped to that frame.

> 2. Also, people often say, rightly or wrongly, that `focus-follows-mouse' is
> useless, inappropriate, ineffective etc. for use with window managers that
> impose a click-frame-to-focus policy. If the only intended effect of
> `focus-follows-mouse' is what you say it is, then these (common) statements
> are off the mark, and whatever window manager policy one has would appear to
> be irrelevant.

The following applies to X11:

My take on `focus-follows-mouse' is that it tells Emacs that it can make
use of the hack of warping the mouse pointer in order to change the
window manager frame focus.  With a click-to-focus window manager, this
hack is not available, and consequently Emacs may be unable to change
the window manager focus.

There is not really any completely correct way for Emacs to switch to a
different frame.  Using XSetInputFocus certainly is not the correct way
at all, because (a) window managers are likely to actively prevent such
uses, since clients often misuse it, and (b) it doesn't work if the
window to which focus will be transfered is unmapped (iconified), which
may be the case if the window manager has iconified it or
"shaded/rolled" it, an action that a tiling or tabbing window manager
may do routinely.  The best way to switch focus may be to use the method
described in the Extended Window Manager Hints document, namely sending
a _NET_ACTIVE_WINDOW message.  This could perhaps be used in conjunction
with XSetInputFocus and the mouse warping hack, since not all window
managers support the _NET_ACTIVE_WINDOW message.

For MS Windows:

I believe there are standard Windows API functions that can be used to
raise or focus a particular top-level window, and consequently such
hacks as are needed for X11 are not needed for MS Windows.

-- 
Jeremy Maitin-Shepard

  parent reply	other threads:[~2007-09-07  3:28 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05  5:53 mouse-autoselect-window Drew Adams
2007-09-05 10:36 ` mouse-autoselect-window Robert J. Chassell
2007-09-05 10:49   ` mouse-autoselect-window David Kastrup
2007-09-05 12:56     ` mouse-autoselect-window Stephen Berman
2007-09-05 16:49       ` mouse-autoselect-window Robert J. Chassell
2007-09-05 22:46         ` mouse-autoselect-window Drew Adams
2007-09-05 23:08           ` mouse-autoselect-window Jason Rumney
2007-09-06 16:36             ` mouse-autoselect-window Drew Adams
2007-09-06 17:23               ` mouse-autoselect-window martin rudalics
2007-09-06 20:05                 ` mouse-autoselect-window David Kastrup
2007-09-06 21:12                   ` mouse-autoselect-window Jason Rumney
2007-09-06 18:42               ` mouse-autoselect-window Davis Herring
2007-09-07  3:28               ` Jeremy Maitin-Shepard [this message]
2007-09-07  8:26                 ` mouse-autoselect-window Eli Zaretskii
2007-09-07  8:58                   ` mouse-autoselect-window martin rudalics
2007-09-07 15:54                     ` mouse-autoselect-window Davis Herring
2007-09-07 18:21                       ` mouse-autoselect-window Eli Zaretskii
2007-09-07 19:46                         ` mouse-autoselect-window Davis Herring
2007-09-08  7:05                           ` mouse-autoselect-window Eli Zaretskii
2007-09-08  8:08                             ` mouse-autoselect-window Jan Djärv
2007-09-08  0:46                         ` mouse-autoselect-window Jason Rumney
2007-09-08  7:00                           ` mouse-autoselect-window Eli Zaretskii
2007-09-08  9:31                             ` mouse-autoselect-window martin rudalics
2007-09-08 20:56                             ` mouse-autoselect-window Jason Rumney
2007-09-07 18:20                     ` mouse-autoselect-window Eli Zaretskii
2007-09-07  8:32                 ` mouse-autoselect-window martin rudalics
2007-09-07 17:01                   ` mouse-autoselect-window Jeremy Maitin-Shepard
2007-09-07 18:56                     ` mouse-autoselect-window martin rudalics
2007-09-08  7:53                     ` mouse-autoselect-window Jan Djärv
2007-09-06  3:04           ` mouse-autoselect-window Robert J. Chassell
2007-09-06 16:35             ` mouse-autoselect-window Drew Adams
2007-09-05 18:04       ` mouse-autoselect-window martin rudalics
2007-09-05 22:46         ` mouse-autoselect-window Drew Adams
2007-09-06  9:35           ` mouse-autoselect-window martin rudalics
2007-09-06 16:37             ` mouse-autoselect-window Drew Adams
2007-09-06 17:28               ` mouse-autoselect-window martin rudalics
2007-09-06 21:40                 ` mouse-autoselect-window Drew Adams
2007-09-06 20:58               ` mouse-autoselect-window Jason Rumney
2007-09-06 21:11                 ` mouse-autoselect-window Drew Adams
2007-09-07  0:02                   ` mouse-autoselect-window Stefan Monnier
2007-09-07  6:45                     ` mouse-autoselect-window Leo
2007-09-07  8:33                       ` mouse-autoselect-window Andreas Schwab
2007-09-06 12:01         ` mouse-autoselect-window Stephen Berman
2007-09-06 12:22           ` mouse-autoselect-window martin rudalics
2007-09-06 14:17             ` mouse-autoselect-window Stephen Berman
2007-09-06 15:10               ` mouse-autoselect-window martin rudalics
2007-09-06 16:00                 ` mouse-autoselect-window Stephen Berman
2007-09-06 17:31                   ` mouse-autoselect-window martin rudalics
2007-09-06 18:20                     ` mouse-autoselect-window Stephen Berman
2007-09-06 20:46                       ` mouse-autoselect-window martin rudalics
2007-09-06 22:58                         ` mouse-autoselect-window Stephen Berman
2007-09-07  6:51                           ` mouse-autoselect-window martin rudalics
2007-09-07  7:33                             ` mouse-autoselect-window Drew Adams
2007-09-07  8:09                               ` mouse-autoselect-window Stephen Berman
2007-09-07 12:31                                 ` mouse-autoselect-window Robert J. Chassell
2007-09-07  8:38                               ` mouse-autoselect-window martin rudalics
2007-09-07  8:09                             ` mouse-autoselect-window Stephen Berman
2007-09-07  8:53                               ` mouse-autoselect-window martin rudalics
2007-09-07  9:16                                 ` mouse-autoselect-window Stephen Berman
2007-09-07  9:33                                   ` mouse-autoselect-window martin rudalics
2007-09-06 14:30           ` mouse-autoselect-window Stefan Monnier
2007-09-06 15:44             ` mouse-autoselect-window Stephen Berman
2007-09-18  7:02       ` mouse-autoselect-window martin rudalics
2007-09-18 10:16         ` mouse-autoselect-window Stephen Berman
2007-09-18 14:07           ` mouse-autoselect-window martin rudalics
2007-09-18 21:00             ` mouse-autoselect-window Stephen Berman
2007-09-18 14:41         ` mouse-autoselect-window Drew Adams
2007-09-18 15:34           ` mouse-autoselect-window martin rudalics
2007-09-18 16:10             ` mouse-autoselect-window Drew Adams
2007-09-18 16:47               ` mouse-autoselect-window martin rudalics
2007-09-18 17:04                 ` mouse-autoselect-window Drew Adams
2007-09-18 21:01                 ` mouse-autoselect-window Stephen Berman
2007-09-28  9:11                   ` mouse-autoselect-window martin rudalics
2007-09-29 21:45                     ` mouse-autoselect-window Glenn Morris
2007-09-30  8:47                       ` mouse-autoselect-window martin rudalics
2007-09-30 21:48                         ` mouse-autoselect-window Glenn Morris
2007-10-01  6:29                           ` mouse-autoselect-window martin rudalics
2007-11-07 12:18                     ` mouse-autoselect-window Stephen Berman
2007-11-07 13:13                       ` mouse-autoselect-window martin rudalics
2007-11-07 14:30                         ` mouse-autoselect-window Stephen Berman
2007-11-07 15:32                           ` mouse-autoselect-window martin rudalics
2007-09-18 22:24             ` mouse-autoselect-window Jason Rumney
2007-09-18 22:46               ` mouse-autoselect-window Drew Adams
2007-09-18 23:13                 ` mouse-autoselect-window Jason Rumney
2007-09-18 23:24                   ` mouse-autoselect-window Drew Adams
2007-09-19  4:02                   ` mouse-autoselect-window Eli Zaretskii
2007-09-05 17:33 ` mouse-autoselect-window Eli Zaretskii
2007-09-05 17:52   ` mouse-autoselect-window Eli Zaretskii
     [not found] <31071.1189309764@cs.sunysb.edu>
2007-09-09  9:43 ` mouse-autoselect-window Jason Rumney
2007-09-09 13:52   ` mouse-autoselect-window Michael Kifer
2007-09-09 14:09     ` mouse-autoselect-window Jason Rumney
  -- strict thread matches above, loose matches on Subject: below --
2003-12-29 19:01 mouse-autoselect-window Robert Marshall
2003-12-29 21:48 ` mouse-autoselect-window Eli Zaretskii
2003-12-29 22:49 ` mouse-autoselect-window Kevin Rodgers
     [not found] ` <mailman.745.1072738378.868.help-gnu-emacs@gnu.org>
2003-12-30  7:20   ` mouse-autoselect-window Robert Marshall

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=87odgff933.fsf@jbms.ath.cx \
    --to=jeremy@jeremyms.com \
    --cc=drew.adams@oracle.com \
    --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.