From xemacs-m  Wed Sep 17 07:37:20 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id HAA07366
	for <xemacs-beta@xemacs.org>; Wed, 17 Sep 1997 07:36:56 -0500 (CDT)
Received: (from hniksic@localhost)
	by jagor.srce.hr (8.8.7/8.8.6) id OAA01161;
	Wed, 17 Sep 1997 14:36:23 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: [PATCH] `make-event' accepts arguments
References: <kigk9gg8zp6.fsf@jagor.srce.hr> <199709170223.WAA20747@M66-080-21.MIT.EDU>
X-Attribution: Hrvoje
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 17 Sep 1997 14:36:22 +0200
In-Reply-To: David Bakhash's message of "Tue, 16 Sep 1997 22:23:27 -0400"
Message-ID: <kigzppcw20p.fsf@jagor.srce.hr>
Lines: 34
X-Mailer: Quassia Gnus v0.5/XEmacs 20.3(beta20) - "Tirana"

David Bakhash <cadet@MIT.EDU> writes:

> holy cow, dude!  this is excellent!  I think that with this patch I can
> re-write strokes so that it doesn't use defadvice!!! (...)

Yes, that was one of my ideas, too.  However, things still don't work
perfectly:

(let ((e1 (make-event 'button-press `(channel ,(selected-frame)
                                      button 1 x 100 y 100)))
      (e2 (make-event 'button-release `(channel ,(selected-frame)
                                        button 1 x 100 y 100))))
  ;; Press the button at 100, 100
  (dispatch-event e1)
  ;; ...and release it
  (dispatch-event e2))

I would expect this to set the point at pixel-coords 100,100 -- but
for some reason, it doesn't happen, although the events seem correct.
It's worth investigating.  Bill, did you have problems with such stuff 
when implementing GPM?

OTOH, key events work perfectly:

(let ((e (make-event 'key-press '(key next modifiers (control)))))
  ;; Press control-next
  (dispatch-event e))

...and this does what you'd expect it to do.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Ask not for whom the <CONTROL-G> tolls.

