Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (Richard Hesketh) Newsgroups: comp.windows.x Subject: question about Reparenting WM's and Xt support Message-ID: <2375@harrier.ukc.ac.uk> Date: 15 Sep 89 15:43:58 GMT Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 50 I have a toolkit program which wants to track the size and position of widget instances (its an interactive user interface builder). I am having problems with ConfigureNotify events from toplevel windows under a reparenting window manager (twm). I am using the very latest version of the intrinsics (can I be more specific in public? 8-). I add an event handler on each widget's window to catch ConfigureNotify events (ie. StructureNotify with an event->type == ConfigureNotify check). Now this works fine for all widget instances below the toplevel applicationShellWidgetClass instance. I can call XtSetValues() and change the size of a widget and I get a ConfigureNotify event back confirming the change. However if I try to perform XtSetValues() on the toplevel shell I never get a ConfigureNotify back, the window does move however (see (*) below for a qualification of this). I do get ConfigureNotify's for the toplevel shell if I move or resize the window using the window manager and the x and y positions are set to the correct location (ie. where the window really starts not where the title bar happens to be!). This is great and means my program does not need to know what kind of window manager is running (if any!). However if use these values and do an immediate XtSetValues() the window does not move .. fine, that is just right. (*) But lets say the shell's current position is "said" to be (x,y) and we move it to (x,y+1) using XtSetValues(), the window "jumps" to (x, y + 1 + height_of_title_bar). Now somebody is wrong here! The window manager (twm) or the Xt Intrinsics? Plus I never receive a ConfigureNotify event for this change in position. Looking in the ICCCM (section 4.1.5) I find that the "client" must be aware of the problems of reparented windows; I assume this is handled by the Intrinsics? What I would like to know is, are the Intrinsics still out of date when it comes to ICCCM support or do I have really have to take notice of the ReparentNotify event for the toplevel shell window and do some recalculation of positions? My feeling is that because I am receiving the event through a toolkit registered event handler the toolkit should hide the fact that the window has been reparented and give me the correct positions and let me use these positions in any subsequent SetValue calls. ??? Richard Richard Hesketh : rlh2@ukc.ac.uk ..!mcvax!ukc!rlh2 : @nsfnet-relay.ac.uk:rlh2@ukc.ac.uk --- Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: (0227) 764000 ext. 3682