Isaque Galdino de Araujo <isaque_at_uol.com.br> writes:
> On Thu, 06 Feb 2003 21:12:51 -0500 Dan Espen wrote:
>
> > Isaque Galdino de Araujo <isaque_at_uol.com.br> writes:
> > > Hi guys, I am using the 2.5.5 version and I'm facing a problem using
> > > fltk windows. When I increase the window size, the window is
> > > notified, but when it shrinks the window isn't. Do you you know how
> > > to solve that problem?
> >
> > Is "fltk" the "fast light toolkit" at www.fltk.org?
> Yeah, that's it!
>
> > I didn't see any fvwm problems in their bug database, but they did
> > have a recently fixed OSX resize bug.
> >
> > I think its unlikly that Fvwm is doing something different
> > for windows that decrease in size vs. windows that grow in size.
> > What makes you think this is an Fvwm problem?
> Because I've tested the same application in WindowMaker and the problem didn'
> t happen!
I don't know why it works with WindowMaker but not Fvwm.
An application is supposed to redraw itself when it recieves a
ConfigureNotify event. Fvwm is sending the ConfigureNotify, but
fltk purposely doesn't redraw itself when it gets that event,
it waits for an expose event instead.
I think the expose event comes from the X server. It looks like
the X server is sending the expose when the window is made larger,
but not when its made smaller. I think fltk is at fault.
You can "fix" fltk by making the change below, in src/Fl_x.cxx.
My change is marked with "dje":
void Fl_Window::resize(int X,int Y,int W,int H) {
int is_a_resize = (W != w() || H != h());
int resize_from_program = (this != resize_bug_fix);
if (!resize_from_program) resize_bug_fix = 0;
if (X != x() || Y != y()) set_flag(FL_FORCE_POSITION);
else if (!is_a_resize) return;
if (is_a_resize) {
Fl_Group::resize(X,Y,W,H);
if (shown()) {
redraw(); i->wait_for_expose = 0; // originally 1, dje
}
} else {
x(X); y(Y);
}
if (resize_from_program && shown()) {
if (is_a_resize) {
if (!resizable()) size_range(w(),h(),w(),h());
XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1);
} else
XMoveWindow(fl_display, i->xid, X, Y);
}
}
If you're not working from source, you might want to forward this to
the fltk developers.
--
Dan Espen E-mail: dane_at_mk.telcordia.com
--
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 Fri Feb 07 2003 - 07:29:08 GMT