ramakris@bloss.cs.vt.edu (S.Ramakrishnan) (08/19/90)
ConfigureRequest , override_redirect , SubstructureRedirectMask,
XSelectInput , XtAddEventHandler.
I want to be able to position my window at byte boundaries.
However, the window manager doesn't always comply with my
request for XMoveWindow. Hence, I need to trap any ConfigRequest
and if its a reposition request, I need to position the window at
the nearest 8-bit boundary. However, I want to take over
the window only when a reposition request is obtained. And leave
it to the WM at other times.
Am doing the following :
1. Select input with the SubstructureRedirectMask on the
top level window of my application.
2. Turn the override_redirect flag False (thats what the Xlib
manual says I shud do).
3. And then wait for the event.
4. After obtaining the event :
i) Turn the overridde_redirect flag of the window True.
ii) Configure the Window by XConfigureWindow().
iii) Turn the override_redirect flag False.
Strangely, I never get the event. The window manager always gets
the configure requests.
Am I missing s.th ?
Ps : In Widget domain can I not select the ConfigureRequest on
the Window of a Widget by
{
XtEventHandler my_handler ();
XSetWindowAttributes wa;
wa.override_redirect = False ;
XChangeWindowAttributes(XtDisplay(canvas),XtWindow(canvas),CWOverrideRedirect,&wa);
XtAddEventHandler(root,SubstructureRedirectMask,False,my_handler);
}
Regards,
S Ramakrishnan.
--
-- S.Ramakrishnan, CS Dept, McBryde Hall, VaTech, Blacksburg, Virg. 24061-0106
(email : ramakris@bloss.cs.vt.edu, ramakris@vtcc1.cc.vt.edu)