Here comes a patch to make FLTK windows aware of the correct resize
especially a resize where no new area is covered.
Problem:
FLTK relies on a Expose event (12) from Xlib to redraw window content.
The Expose event is used to damage the to be redrawn area.
In the context of a resize with no new area covered, Xlib does not need to
send the expose event as no new area is to be redrawn. In case of FLTK
widgets this is a wrong assumption.
Solution (Xlib):
The Fl_Window::resize() funktion obtains one more exception in that a
check for is_a_enlarge is introduced and only for this case the
wait_for_expose variable is set to 1. So while passing the
Fl::flush() function the i->wait_for_expose exception does no longer
prevent a draw() in the according Fl_Window.
After applying the patch all windows behave under FVWM2 like expected.
Under KDE the windows work as usual. I tested with
Xorg-7.2/FVWM2/KDE3/twm.
Can you please test that the patch has no side effects for win32 and osX?
Patch:
--- Fl_x.cxx_orig 2007-06-18 15:08:57.000000000 +0200
+++ Fl_x.cxx 2008-09-11 16:58:15.000000000 +0200
@@ -1024,13 +1024,14 @@
void Fl_Window::resize(int X,int Y,int W,int H) {
int is_a_move = (X != x() || Y != y());
int is_a_resize = (W != w() || H != h());
+ int is_a_enlarge = (W > w() || H > h());
int resize_from_program = (this != resize_bug_fix);
if (!resize_from_program) resize_bug_fix = 0;
if (is_a_move && resize_from_program) set_flag(FL_FORCE_POSITION);
else if (!is_a_resize && !is_a_move) return;
if (is_a_resize) {
Fl_Group::resize(X,Y,W,H);
- if (shown()) {redraw(); i->wait_for_expose = 1;}
+ if (shown()) {redraw(); if(is_a_enlarge) i->wait_for_expose = 1;}
} else {
x(X); y(Y);
}
STR #2039
http://www.fltk.org/str.php?L2039
kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Am 10.09.08, 17:49 +0200 schrieb Frederik Sausmikat:
> Kai-Uwe Behrmann wrote:
>
> > About the system: IA32 Linux, Xorg7.2 + nvidia twinview, fvwm2, resize
>
> After I read your second post I immediately thought of fvwm and now you
> confirmed my suspicion. This issue made me switch to icewm (after nearly
> 10 years of using fvwm).
>
> AFAIR one workaround was to disable opaque resize.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk