[comp.windows.x] Event problems with OpenWindows2.0

pop@linus.mitre.org (Paul Perry) (10/24/90)

I have a couple of questions about the events generated by the
OpenWindows2.0 server:

0) Background:
	Using a Sun4/330 GX with an openwindows2.0 server and uwm
(for old times sake). My event mask is:

      xswa.event_mask = ExposureMask | StructureNotifyMask
                   | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask
                   | KeyPressMask | PointerMotionHintMask;
      xswa.do_not_propagate_mask = VisibilityChangeMask;

1) I seem to be getting EnterNotify events every time I move the mouse
(with all buttons up), even when I don't think I am entering any
subwindows. Why ?

2) I seem to be executing the code for the MotionNotify event even
though no buttons are pressed. The behaviour I want is to select and
move a window when the a mouse button is pressed.  What I get with
OpenWindows2.0 is subwindow movement all the time !

The code works fine under an X11R4 server, I do not get any of the
extra EnterNotify events.  Anyone else run into this problem ?

I will post more code of the event loop if necessary. Thanks, Paul.


-- 
Paul O. Perry                                    MITRE Corporation
Phone: (617) 271-5230                            Burlington Road
ARPA: pop@mitre.org                              Bedford, MA  01730
UUCP:   ...{decvax,philabs,genrad}!linus!pop

sivan@bpa_su10.Sbi.Com (Sivan Mahadevan) (10/31/90)

In article <124194@linus.mitre.org>, pop@linus.mitre.org (Paul Perry) writes:
> I have a couple of questions about the events generated by the
> OpenWindows2.0 server:
> 
> 2) I seem to be executing the code for the MotionNotify event even
> though no buttons are pressed. The behaviour I want is to select and
> move a window when the a mouse button is pressed.  What I get with
> OpenWindows2.0 is subwindow movement all the time !
> 
> The code works fine under an X11R4 server, I do not get any of the
> extra EnterNotify events.  Anyone else run into this problem ?

There are a number of bugs with the xnews server in OpenWindows 2.0
including one that might be causing the problem you are encountering.
When a button is grabbed (i.e, betwen button press and button release)
some events get discarded.  We noticed that LeaveNotify events get
discarded when a button is grabbed (this breaks Motif toggle-button
widgets when using the default translations).  We have not received a
fix for this server bug yet, but Sun is aware of it.

-- 
Sivan Mahadevan
Salomon Brothers Inc	Bond Portfolio Analysis		Analytical Applications Group
One New York Plaza	44th Floor			212-747-5418
New York NY 10004	sivan@bpa_su10.sbi.com		uunet!sbi.com!bpa_su10!sivan