On 17-May-2002 Mr.X wrote:
> I'm almost certain this is a Blackbox not a GVim issue, but I thought
> before I submitted it as a bug I'd see if a few others can duplicate it.
>  The problem occurs when maximizing GVim, instead of maximizing to the
> size of the screen, or the screen minus the slit and toolbar, it goes
> much bigger.  I thought it was a GVim issue, but I tested it in a couple
> of other WM's (Fluxbox, E) and it didn't happen.  Also it just started
> happening recently so I'd guess it popped up in alpha 3 or 4 somewhere. 
> It might happen with other apps as well, but I haven't found any.

once you submit this I can mark it closed (-:

We have been toying with how window geometry is handled.  In these changes we
missed part of the math.

screen_width = 1216; // my screen size with strut
dw = screen_width;
dw /= width_inc; // for rxvt 7, for gvim 9
dw *= width_inc; // 1216 / 7 => 173, 173 * 7 => 1211
dw += base_width; // 19 for rxvt, 1211 + 19 => 1230 > 1216, oops

the solution is to do

dw = (dw - base_width) / width_inc;
dw *= width_inc;
dw += base_width;

What is initially confusing is xprop and xwininfo report the size of the rxvt
in terms if (width / width_inc) * width_inc and omits the base_width, so it
looks like blackbox positioned it correctly.

Reply via email to