Hi,
I've looked through HandleConfigureRequest() in fvwm-2.2.5/fvwm/events.c,
and I found some code that I believe to be in error.
At line 1450, the code reads:
if (cre->value_mask & CWX)
x = cre->x - Tmp_win->boundary_width - Tmp_win->bw;
if (cre->value_mask & CWY)
y = cre->y - Tmp_win->boundary_width - Tmp_win->title_height - Tmp_win->bw;
if (cre->value_mask & CWWidth)
width = cre->width + 2*Tmp_win->boundary_width;
if (cre->value_mask & CWHeight)
height = cre->height+Tmp_win->title_height+2*Tmp_win->boundary_width;
I beleve it should read:
if (cre->value_mask & CWX)
x = cre->x;
if (cre->value_mask & CWY)
y = cre->y;
if (cre->value_mask & CWWidth)
width = cre->width;
if (cre->value_mask & CWHeight)
height = cre->height;
I believe that the code is trying to account for the size of frame decorations.
However, the event sender is supposed to include all the right information in
the event already. Here is a comment from the code:
/*
* SetupWindow (x,y) are the location of the upper-left outer corner and
* are passed directly to XMoveResizeWindow (frame). The (width,height)
* are the inner size of the frame. The inner width is the same as the
* requested client window width; the inner height is the same as the
* requested client window height plus any title bar slop.
*/
I am working on a small project where correct window placement is desireable.
It's written using the Qt toolkit. The program behaves as expected under kwin,
but misbehaves under FVWM2. When I tell the pogram to move itself to
coordinates 0,0, fvwm2 puts it at -2,-18 (the size of the window
decoration at that location).
So, I have a fix in my local copy of fvwm2-2.2.5, but I would strongly prefer
to see it in the official code. Actually, last night I was ready to fix
every major window manager that did not agree with my program ;-), but I started
with fvwm2 because I use it the most. Here is the reason why I think that in
this fvwm2 is in error and not my program:
http://doc.trolltech.com/geometry.html
If you want, I can send you the source to my program to remove any doubts.
It needs Qt 2.3.x to compile (RH 7.1 has 2.3.0, but I tested it under 2.3.1
as well).
Thank you,
Paul.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Jun 25 2001 - 22:20:39 BST