emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: address@hidden: mouse-autoselect-window needs a de lay]


From: Marshall, Simon
Subject: RE: address@hidden: mouse-autoselect-window needs a de lay]
Date: Tue, 4 Jul 2006 17:17:30 +0100

> The attached patch is a first approximation.  I've been able 
> to test this on Windows 98 only, hence I would be glad to 
> hear if this works in a general context too - simply 
> customize the variable `mouse-autoselect-window'.

Hi Martin, thanks, when it works it certainly is an improvement.  A few
comments though, with a Solaris 8 build with LUCID toolbars.

- A value of nil for mouse-autoselect-window doesn't seem to stop it
selecting!  I think the xterm.c check should be for
!NILP(mouse_autoselect_window) now.

- When I tried to see how the lisp functions mouse-autoselect-window-cancel,
mouse-autoselect-window-start and mouse-autoselect-window-select were called
(by adding message forms to them), I got an instant abort() when
handle_one_xevent() called mouse_autoselect_window_function (bound to
mouse-autoselect-window-start) and something called an Feval():

  [5] abort(), line 464 in "emacs.c"
  [6] Feval(form = 1619100224), line 2127 in "eval.c"
  [7] Fprogn(args = -1598899992), line 434 in "eval.c"
  [8] funcall_lambda(fun = -1598900616, nargs = 2, arg_vector = 0xffbec1f8),
line 3084 in "eval.c"
  [9] Ffuncall(nargs = 3, args = 0xffbec1f4), line 2959 in "eval.c"
  [10] call2(fn = 544825944, arg1 = -2138684416, arg2 = -2138684416), line
2711 in "eval.c"
=>[11] handle_one_xevent(dpyinfo = 0x83ae00, eventp = 0xffbec8a0, finish =
0xffbec894, hold_quit = 0xffbed970), line 6591 in "xterm.c"

In fact, setting mouse-autoselect-window to a number, doing ESC C-x on the
defun of mouse-autoselect-window-cancel or mouse-autoselect-window-start,
and moving the mouse is enough to trigger this abort even with one window.

- I think the uncertainty over the actual delay is more than a little odd.
It is more than frustrating to have to wait perhaps twice the amount of time
(in fact the doc string says the amount of time is any multiple of
mouse-autoselect-window).  Perhaps the problem is that
mouse_autoselect_window_function is run even if the window has not changed?
(Currently it is run if mouse_autoselect_window is a number, regardless of
whether the window has changed or not.)  If it were only to run if the
window has changed, perhaps mouse-autoselect-window-start can set
mouse-autoselect-window-position to (mouse-position)?

Unfortunately, it's a little difficult for me to play around with the lisp
code - I can only avoid an abort by make/make recompile/make each time.

If you can work out how to make it stable I can help test etc.  Simon.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]