unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pavel@Janik.cz (Pavel Janík)
Cc: emacs-devel@gnu.org
Subject: Re: PATCH: focus follows mouse in C
Date: Thu, 07 Feb 2002 22:31:16 +0100	[thread overview]
Message-ID: <m3y9i56l95.fsf@Janik.cz> (raw)
In-Reply-To: <200202071456.g17EujV04572@aztec.santafe.edu> (Richard Stallman's message of "Thu, 7 Feb 2002 07:56:45 -0700 (MST)")

   From: Richard Stallman <rms@gnu.org>
   Date: Thu, 7 Feb 2002 07:56:45 -0700 (MST)

   >     +  if (x_autoselect_window_p)
   >     +    {
   >     +      int area;
   >     +      Lisp_Object window;
   >     +
   >     +      window = window_from_coordinates (frame, XINT (event->x), XINT (event->y), &area, 0);
   >     +
   >     +      if (WINDOW_LIVE_P (window) && !MINI_WINDOW_P (XWINDOW(window)))
   >     +	Fselect_window(window);
   >     +    }
   >     +
   > 
   > It looks like this selects the window on every motion of the mouse.
   > That may be what you don't like.  Maybe it should select the window
   > only when the mouse moves into a different window.

For the user, it has this behaviour. Yes, it is ugly to call
Fselect_window for each window and wait for it to execute

  if (EQ (window, selected_window))
    return window;

It should be directly here. Fixed.

   > Also, it seems to be completely unwilling to select a minibuffer window.
   > When the minibuffer is active, it should be selectable like any other window.

Nice idea, here it is:

  if (x_autoselect_window_p)
    {
      int area;
      Lisp_Object window;

      window = window_from_coordinates (frame, XINT (event->x), XINT (event->y), &area, 0);

      /* Window will be selected only when it is not selected now.
	 Minibuffer window will be selected iff it is active.  */
      if (!EQ (window, selected_window)
	  && (!MINI_WINDOW_P (XWINDOW(window))
	      || (EQ (window, minibuf_window) && minibuf_level > 0)))
	Fselect_window (window);
    }

Maybe we can also use `area' here to allow user to customize this
behaviour. E.g. mouse over mode-line/fringe/scroll-bar does/doesn't select
window or something similar. Maybe a customizable list
x-autoselect-window-parts with full value '(text mode-line vertical-border
header-line left-fringe right-fringe)? If something will be missing here,
mouse over it can not select the window? Well, maybe I'm crazy, but the
implementation of this will surely wait for feedback from real users of
this feature.

What I do not like when x-autoselect-window is t, is connected with my
working habits. I think it can be *really* useful to people who use
focus-follows-mouse in their window managers and are used to that
behaviour.
-- 
Pavel Janík

Ask three people which VM is best, and you will get four answers ;)
                  -- Hubert Mantel about VM in 2.4.x

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-02-07 21:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3665ewgv8.fsf@Janik.cz>
2002-02-07 14:56 ` PATCH: focus follows mouse in C Richard Stallman
2002-02-07 21:31   ` Pavel Janík [this message]
2002-02-08 23:24     ` Richard Stallman
2002-02-09  7:29       ` Pavel Janík
2002-02-09 10:01         ` Eli Zaretskii
2002-02-09 11:53           ` Pavel Janík
2002-02-09 14:52             ` Eli Zaretskii
2002-02-09 15:08               ` Pavel Janík
2002-02-09 16:26               ` Pavel Janík
2002-02-09 21:40                 ` Al Petrofsky
2002-02-10 11:15                   ` Eli Zaretskii
2002-02-10 17:52                     ` Al Petrofsky
2002-02-16 10:35               ` Pavel Janík
2002-02-16 16:46                 ` Eli Zaretskii
2002-02-11  2:08             ` Richard Stallman
2002-02-11  5:45               ` Pavel Janík
2002-02-12 15:24                 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3y9i56l95.fsf@Janik.cz \
    --to=pavel@janik.cz \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).