XForms: can anyone explain this?

Trent Piepho (xyzzy@u.washington.edu)
Mon, 17 Nov 1997 21:51:45 -0800 (PST)

To subscribers of the xforms list from Trent Piepho <xyzzy@u.washington.edu> :

I've written a little test program. It creates a window with the fl_winopen
function, gets the position with fl_get_winorigin, and moves the window to
that same position, with fl_winmove. The window position returned by
fl_get_winorigin after the move seems to be wrong. Here's the output I get,
which is wrong in the same way under mwm, twm, and fvwm2.

window at 596,27
now window is at 1192,54

The x and y coordinates have doubled, even though I said to move to window to
the exact same place it was. You can't really tell from this test program,
but the window doesn't actually move. If I don't enable re-direction override
then it works as espected.

#include <forms.h>
main(int argc, char *argv[])
{
XSetWindowAttributes xswa;
Window win;
int x,y;

fl_initialize(&argc,argv,0,0,0);
win=fl_winopen("foo");

xswa.override_redirect=True;
XChangeWindowAttributes(fl_get_display(),win, CWOverrideRedirect, &xswa);

fl_get_winorigin(win,&x,&y);
printf("window at %d,%d\n",x,y);
fl_winmove(win,x,y);
fl_get_winorigin(win,&x,&y);
printf("now window is at %d,%d\n",x,y);
}

|Gazing up to the breeze of the heavens \ on a quest, meaning, reason |
|came to be, how it begun \ all alone in the family of the sun |
|curiosity teasing everyone \ on our home, third stone from the sun. |
|Trent Piepho (xyzzy@u.washington.edu) -- Metallica |
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/