ginny@virgil.UUCP (Virginia Dill) (05/03/90)
I am porting X11 code from an HP-835 using Version 3.4.1 to a Sun 4-110. I was using uwm on the HP. I am now running SunOs 4.0.3, xnews as the server, and pswm as the window manager. My problem is processing window movement and key presses. On the HP whenever I moved my X11 created windows, I got configure notify events which let me know the new position of the window. But on the Sun because of the window manager, I am assuming, I do not get this event. When I move the windows by placing the cursor in the border of the X11 window and depressing the left mouse button, the only event I am getting is an expose event, this only happens when windows are overlapping. I also cannot process key press events. On the HP I simply depressed the keys and the events were processed; however, on the Sun I do not get any indication that a key was pressed. Could someone please explain the differences between the window managers which I am guessing is the problem. If anyone has any more information on Sun window managers (I know that pswm and olwm are existing window managers) I would certainly be glad if you could pass it along to me. Please e-mail this information to me. P.S. If you think of any other important information that I don't have but will need, please feel free to e-mail this to me also. -- Ginny Dill (804)424-1004 ginny@virgil.UUCP EDO Coporation Government Systems Division 814 Greenbrier Circle, Chesapeake VA 23320
mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (05/05/90)
> I am porting X11 code from an HP-835 using Version 3.4.1 to a Sun > 4-110. I was using uwm on the HP. I am now running SunOs 4.0.3, > xnews as the server, and pswm as the window manager. > My problem is processing window movement and key presses. On the HP > whenever I moved my X11 created windows, I got configure notify > events which let me know the new position of the window. But on the > Sun because of the window manager, I am assuming, I do not get this > event. The ICCCM (section 4.2.3) says that If the window manager moves a top-level window without changing its size, the client will receive a synthetic Con- figureNotify event following the move describing the new location, in terms of the root coordinate space. Clients must not respond to being moved by attempting to move them- selves to a better location. Any real ConfigureNotify event on a top-level window implies that the window's position on the root may have changed, even though the event reports that the window's position in its parent is unchanged, because the window may have been re-parented. And note that the coordinates in the event will not, in this case, be directly useful. The window manager will send these events using SendEvent with: destination: the client's window propagate: False event-mask: StructureNotify So if you get no event at all then your window manager is buggy (I assume, of course, that you have selected all appropriate event masks for input). Unfortunately the ICCCM does not (as far as I can find) give a way for a client to track its location with respect to the root; I assume the client is supposed to use XTranslateCoordinates when it wants to know where it is. (This strikes me as somwhat ugly, but on the other hand, it also seems to me that a client should not care where it is on the screen.) > I also cannot process key press events. On the HP I simply depressed > the keys and the events were processed; however, on the Sun I do not > get any indication that a key was pressed. You almost certainly did not set the input field of the WM_HINTS property correctly. See the ICCCM, starting with section 4.1.7. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu