On Wed, Oct 4, 2017 at 6:09 PM, Alan Third <alan@idiocy.org> wrote:

Yes. You can’t modify emacsframe because it’s an instance variable.
You’ll need to modify whatever is using it to set the frame in the
emacs event.

So, assuming the code you’re modifying is calling EV_TRAILER, for now,
replace the call to EV_TRAILER with it’s contents:

    XSETFRAME (emacs_event->frame_or_window, emacsframe);
    EV_TRAILER2 (e);

and work from there.

​Still doesn't seem to work if that code is used at the end of mouseDown (called by mouseUp).
Could you test any of your ideas?  It would probably speed the process up if you have a bit of time.

Bob