quasar@krazykat.ctt.bellcore.com (Laurence R. Brothers) (12/01/90)
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. 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. I find the messy editing menu extremely annoying considering the application is trying to display text with TEXTSW_BROWSING permanently set. I don't want users confused by erroneous menu entries, and I certainly don't want the application to die if someone accidentally drags a text subwindow selection. 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. Laurence R. Brothers (quasar@bellcore.com) Bellcore -- Computer Technology Transfer -- Knowledge-Based Systems "Like dancing oil on a madman's face, reason tends to fly away"
fgreco@dprg-330.GOVt.shearson.COM (Frank Greco) (12/14/90)
> > 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.