Subject: Re: bug#16647: Imprecisions with window-resizing cursors

From: [email-masked] (N. Jackson)
Date: Fri, 21 Feb 2014 19:33:48 -0400

At 14:53 -0400 on Friday 2014-02-21, martin rudalics wrote:

>> Regardless of where the vertical line is, it is now almost impossible to
>> get the <=> handle to appear at all when approaching the vertical line
>> from the left -- I get it once in about fifty attempts. When approaching
>> the vertical line from the right, the <=> handle appears normally (and
>> it now appears normally when the vertical line is all the way to the
>> left as well).
>
> If you can apply the patch I posted earlier (and I attach here again)

Okay, I have applied the patch (on top of GNU Emacs 24.3.50
(x86_64-unknown-linux-gnu, GTK+ Version 3.8.8) of 2014-02-19 Repository
revision: 116484)

With the patch I see the same behaviour I described above.

> you could try the following snippet with emacs -Q:
>
> (let ((i 200)
>       (window-on-left (selected-window))
>       (window-on-right (split-window-right))
>       (lhits 0)
>       (rhits 0))
>   (tooltip-mode -1)
>   (scroll-bar-mode -1)
>   (set-mouse-pixel-position (selected-frame) i 200)
>   (while (car (setq position (cdr (mouse-pixel-position))))
>     (let ((coordinates (coordinates-in-window-p position window-on-left t)))
>       (when (eq coordinates 'vertical-line)
> 	(setq lhits (1+ lhits))))
>     (let ((coordinates (coordinates-in-window-p position window-on-right t)))
>       (when (eq coordinates 'vertical-line)
> 	(setq rhits (1+ rhits))))
>     (sit-for 0.001)
>     (set-mouse-pixel-position
>      (selected-frame) (setq i (1+ i)) 200))
>   (cons lhits rhits))
>
> Evaluating this returns (8 . 0) here, the cdr of which amounts to the
> width of one character on my frame.  So here I have an 8 pixel-wide
> corridor entirely in the left window where I am "on the vertical line"
> (which occupies virtually the 7 right pixels of the right fringe of the
> window on the left).

Here I get (6 . 0).

> Evaluating
>
> (let ((i 600)
>       (window-on-left (selected-window))
>       (window-on-right (split-window-right))
>       (lhits 0)
>       (rhits 0))
>   (tooltip-mode -1)
>   (scroll-bar-mode -1)
>   (set-mouse-pixel-position (selected-frame) i 200)
>   (while (car (setq position (cdr (mouse-pixel-position))))
>     (let ((coordinates (coordinates-in-window-p position window-on-left t)))
>       (when (eq coordinates 'vertical-line)
> 	(setq lhits (1+ lhits))))
>     (let ((coordinates (coordinates-in-window-p position window-on-right t)))
>       (when (eq coordinates 'vertical-line)
> 	(setq rhits (1+ rhits))))
>     (sit-for 0.001)
>     (set-mouse-pixel-position
>      (selected-frame) (setq i (1- i)) 200))
>   (cons lhits rhits))
>
> gets me the same results.  What do you get?  You might have to change
> the initial values of `i' to "be in the frame" accordingly.

I get (6 . 0) (with initial i = 400).

Nevertheless, I can almost never get the <=> handle when I approach from
the left.