Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!emory!gatech!bloom-beacon!dprg-330.GOVt.shearson.COM!fgreco From: fgreco@dprg-330.GOVt.shearson.COM (Frank Greco) Newsgroups: comp.windows.x Subject: Re: XView 2.0 text subwindow bugs Message-ID: <9012131724.AA20782@islanders.> Date: 13 Dec 90 17:24:34 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 43 > > Drag and drop to a simple text subwindow dumps causes an X error > (Bad Cursor) in my application, regardless of font size, or any other > variable I've been able to manipulate. I've never experienced this behavior. What type of app are you building? > > To fix this, I'd like to intercept events to the text subwindow > event procedure, presumably using notify_interpose_event_func. Unfortunately, > all my attempts (which work for other kinds of windows) fail to have > any effect on events to a text subwindow. My notify function is called twice > when the window is created, and never again under any circumstances. > Finally, I'd like the action of making a selection in the text subwindow > to cause activity in my application. If I could just interpose on the > text subwindow event procedure, all the above problems would be solved. > > Sun's hot line was no help whatsoever. Any clues? > > Oh, incidentally, I'm running on a sun 4/260 running SunOs 4.1. Various other > systems have yielded the same error. The key is to interpose on the view window, and to propagate this behavior to split/joined views if you wish. voila... notify_interpose_event_func(textsw_first(tsw), tsw_eventproc, NOTIFY_SAFE); Where "tsw_eventproc" is your own proc to handle events that occur in the TEXTSW. If you allow split/join views, remember split/joined TEXTSW's (actually views) don't "inherit" the event proc, you have to cycle thru the views of the TEXTSW resetting the event proc for every view. Frank G.