Johannes Hofmann <[EMAIL PROTECTED]> wrote:
> fltk2 under X11 seems to issue redraws when a window is moved.
> This is visible e.g. by disabling double buffering in the hello
> example with
>
> window->clear_double_buffer();
>
> Now when moving the window flicker is visible. This is not the case
> here in the corresponding fltk1 example.
>
I noticed that
--- a/src/x11/run.cxx Sun Nov 04 21:13:14 2007 +0100
+++ b/src/x11/run.cxx Thu Nov 08 19:21:21 2007 +0100
@@ -1443,7 +1443,9 @@ bool fltk::handle()
Rectangle& current = CreatedWindow::find(window)->current_size;
if (X != current.x() || Y != current.y() || W != current.w() || H !=
current.h()) {
window->resize(X, Y, W, H);
- window->layout_damage( window->layout_damage() | LAYOUT_USER );
+ if (W != current.w() || H != current.h()) {
+ window->layout_damage( window->layout_damage() | LAYOUT_USER );
+ }
}
current.set(X,Y,W,H);
break;}
fixes the redraws but I'm not sure whether this is a valid optimization.
Is window->layout_damage( window->layout_damage() | LAYOUT_USER )
needed if only the position of the window changes?
Regards,
Johannes
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk