Subject: Re: bug#32672: 27.0.50; image resize on window resizing

From: Juri Linkov <[email-masked]>
Date: Thu, 27 Dec 2018 23:41:59 +0200

>> Using new hooks I noticed only one problem that when the same image buffer is
>> displayed in several windows then using `other-window' to switch between them,
>> the selection-change hook is not always called.
>
> I can't imagine that to fail - it's too elementary.  Can you give
> an 'other-window' scenario without images?

This is because of debounce: the selection-change hook is called twice,
so only the last call is processed.  But the problem is that the
selection-change hook is called not in the logical order, as would be
expected, i.e. first in unselected window, then in the selected window.
But actually it's called in the order of windows in the window list,
e.g. first the 'selected' event is called if the window was created
earlier, then the 'deselected' event if the window was created later.
IOW, the calling order depends on the window order.