home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!sol.ctr.columbia.edu!spool.mu.edu!sdd.hp.com!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: mgraham@teal.csn.org (Michael Graham)
- Newsgroups: fj.mail-lists.x-window
- Subject: Trouble detecting correct events with Button event masks
- Message-ID: <1992Dec30.211105.19397@sm.sony.co.jp>
- Date: 30 Dec 92 21:11:05 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Colorado SuperNet, Inc.
- Lines: 24
- Approved: michael@sm.sony.co.jp
-
- Date: Wed, 30 Dec 1992 17:25:53 GMT
- Message-Id: <C031r6.MGL@csn.org>
- Newsgroups: comp.windows.x,comp.windows.open-look
- Sender: xpert-request@expo.lcs.mit.edu
-
- I am having a problem with event masks. I'm developing on a Sun
- with SunOS 4.1.2 and whatever OLIT version they ship with that -
- I think it's 3.0. I'm trying to detect a motion event with Button1
- down ONLY!! I'm using the event mask Button1MotionMask but it
- triggers the event handler when ANY button is pressed (1, 2 or 3).
- I have tried various combinations of the Button*Masks in X.h (like
- Button1Mask, ButtonPressMask, Button5MotionMask, etc.)and they all
- behave the same way, i.e., the event handler gets invoked. How do
- I determine which button is pressed?
-
- Here's a code sample:
-
- XtAddEventHandler( text, Button1MotionMask, FALSE,
- (XtEventHandler)drag_event, NULL ) ;
-
- drag_event() gets called regardless of which button is pressed.
-
-
- Thanks for your help.
-