changeset 2012:bfb8bc9ddf62

Avoid lots of flicker while resizing the window (when "buffered_drawing" is set to 0 or 1)
author Jorge Arellano Cid <jcid@dillo.org>
date Fri, 13 May 2011 14:14:43 -0400
parents c60462acb9cf
children a96b5e1b4b3c
files dw/fltkviewbase.cc src/ui.cc src/uicmd.cc test/dw_anchors_test.cc test/dw_border_test.cc test/dw_example.cc test/dw_find_test.cc test/dw_images_scaled.cc test/dw_images_scaled2.cc test/dw_images_simple.cc test/dw_links.cc test/dw_links2.cc test/dw_lists.cc test/dw_resource_test.cc test/dw_table.cc test/dw_table_aligned.cc test/dw_ui_test.cc test/fltk_browser.cc
diffstat 18 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkviewbase.cc	Thu May 12 07:56:42 2011 -0400
+++ b/dw/fltkviewbase.cc	Fri May 13 14:14:43 2011 -0400
@@ -78,6 +78,7 @@
    if (backBuffer == NULL) {
       backBuffer = new BackBuffer ();
    }
+   box(FL_NO_BOX);
 }
 
 FltkViewBase::~FltkViewBase ()
--- a/src/ui.cc	Thu May 12 07:56:42 2011 -0400
+++ b/src/ui.cc	Fri May 13 14:14:43 2011 -0400
@@ -683,6 +683,7 @@
    TabTooltip = NULL;
    TopGroup = this;
    TopGroup->type(VERTICAL);
+   TopGroup->box(FL_NO_BOX);
    clear_flag(SHORTCUT_LABEL);
 
    if (cur_ui) {
--- a/src/uicmd.cc	Thu May 12 07:56:42 2011 -0400
+++ b/src/uicmd.cc	Fri May 13 14:14:43 2011 -0400
@@ -96,6 +96,7 @@
       Fl_Box *w = new Fl_Box(0,0,0,0,"i n v i s i b l e");
       w->box(FL_NO_BOX);
       resizable(0);
+      box(FL_FLAT_BOX);
       end();
 
       Wizard = new Fl_Wizard(0,tab_h,ww,wh-tab_h);
@@ -391,7 +392,7 @@
    else
       win = new Fl_Double_Window(ww, wh);
 
-   //Fl_Group::current(0);
+   win->box(FL_NO_BOX);
    CustTabs *DilloTabs = new CustTabs(ww, wh, 16);
    win->end();
 
--- a/test/dw_anchors_test.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_anchors_test.cc	Fri May 13 14:14:43 2011 -0400
@@ -99,6 +99,7 @@
    layout = new Layout (platform);
 
    window = new Fl_Window(250, 200, "Dw Anchors Test");
+   window->box(FL_NO_BOX);
    window->begin();
 
    viewport = new FltkViewport (50, 0, 200, 200);
--- a/test/dw_border_test.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_border_test.cc	Fri May 13 14:14:43 2011 -0400
@@ -39,6 +39,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(200, 300, "Dw Border Test");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 200, 300);
--- a/test/dw_example.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_example.cc	Fri May 13 14:14:43 2011 -0400
@@ -34,6 +34,7 @@
    dw::core::Layout *layout = new dw::core::Layout (platform);
 
    Fl_Window *window = new Fl_Window(200, 300, "Dw Example");
+   window->box(FL_NO_BOX);
    window->begin();
 
    dw::fltk::FltkViewport *viewport =
--- a/test/dw_find_test.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_find_test.cc	Fri May 13 14:14:43 2011 -0400
@@ -73,6 +73,7 @@
    layout = new Layout (platform);
 
    window = new Fl_Window(200, 300, "Dw Find Test");
+   window->box(FL_NO_BOX);
    window->begin();
 
    viewport = new FltkViewport (0, 0, 200, 280);
@@ -90,6 +91,7 @@
    resetButton->clear_visible_focus ();
 
    resultLabel = new Fl_Box(100, 280, 100, 20, "---");
+   resultLabel->box(FL_FLAT_BOX);
 
    FontAttrs fontAttrs;
    fontAttrs.name = "Bitstream Charter";
--- a/test/dw_images_scaled.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_images_scaled.cc	Fri May 13 14:14:43 2011 -0400
@@ -96,6 +96,7 @@
    layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(410, 210, "Dw Scaled Image");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 410, 210);
--- a/test/dw_images_scaled2.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_images_scaled2.cc	Fri May 13 14:14:43 2011 -0400
@@ -73,6 +73,7 @@
    layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(410, 210, "Dw Scaled Image 2");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 410, 210);
--- a/test/dw_images_simple.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_images_simple.cc	Fri May 13 14:14:43 2011 -0400
@@ -97,6 +97,7 @@
    layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(410, 210, "Dw Simple Image");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 410, 210);
--- a/test/dw_links.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_links.cc	Fri May 13 14:14:43 2011 -0400
@@ -77,6 +77,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(200, 300, "Dw Links");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 200, 300);
--- a/test/dw_links2.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_links2.cc	Fri May 13 14:14:43 2011 -0400
@@ -80,11 +80,13 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(200, 300, "Dw Links2");
+   window->box(FL_NO_BOX);
    window->begin();
     Fl_Widget *Panel = new Fl_Box(0, 0, ww, lh, "CONTROL PANEL");
 
     Panel->color(FL_GRAY_RAMP + 3);
     Panel->labelcolor(FL_WHITE);
+    Panel->box(FL_FLAT_BOX);
     Fl_Widget *Main = new Fl_Box(0, lh, ww, wh - 2*lh, "MAIN RENDERING AREA");
     Main->color(FL_GRAY_RAMP + 4);
     Main->labelcolor(FL_WHITE);
@@ -93,6 +95,7 @@
     Fl_Widget *Bar = new Fl_Box(0, wh - lh, 200, lh, "STATUS BAR...");
     Bar->color(FL_GRAY_RAMP + 3);
     Bar->labelcolor(FL_WHITE);
+    Bar->box(FL_FLAT_BOX);
 
     window->resizable(Main);
    window->end();
--- a/test/dw_lists.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_lists.cc	Fri May 13 14:14:43 2011 -0400
@@ -39,6 +39,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(200, 300, "Dw Lists");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 200, 300);
--- a/test/dw_resource_test.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_resource_test.cc	Fri May 13 14:14:43 2011 -0400
@@ -40,6 +40,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(410, 210, "Dw Resource test");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 410, 210);
--- a/test/dw_table.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_table.cc	Fri May 13 14:14:43 2011 -0400
@@ -39,6 +39,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(300, 300, "Dw Table");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 300, 300);
--- a/test/dw_table_aligned.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_table_aligned.cc	Fri May 13 14:14:43 2011 -0400
@@ -39,6 +39,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(200, 300, "Dw Table Aligned");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 200, 300);
--- a/test/dw_ui_test.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/dw_ui_test.cc	Fri May 13 14:14:43 2011 -0400
@@ -44,6 +44,7 @@
    Layout *layout = new Layout (platform);
 
    Fl_Window *window = new Fl_Window(400, 400, "Dw UI Test");
+   window->box(FL_NO_BOX);
    window->begin();
 
    FltkViewport *viewport = new FltkViewport (0, 0, 400, 400);
--- a/test/fltk_browser.cc	Thu May 12 07:56:42 2011 -0400
+++ b/test/fltk_browser.cc	Fri May 13 14:14:43 2011 -0400
@@ -26,6 +26,7 @@
 int main (int argc, char *argv[])
 {
    Fl_Window *window = new Fl_Window (300, 300, "FLTK Browser");
+   window->box(FL_NO_BOX);
    window->begin ();
    Fl_Browser *browser = new Fl_Browser (0, 0, 300, 300);
    browser->begin ();