summaryrefslogtreecommitdiff
path: root/src/Fl_Double_Window.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-03-13 22:16:37 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-03-13 22:16:37 +0000
commitb496d18b85917106c48e8e6f74115b3122b603d1 (patch)
tree4d96befa4377a81c89c6a32f4d66220199572938 /src/Fl_Double_Window.cxx
parent30756ae3500a62bd8f63b4df3eb3ca8f6b8b0b70 (diff)
Fixed 'flush()' code for single, double, and overlay buffering
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Double_Window.cxx')
-rw-r--r--src/Fl_Double_Window.cxx40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 49e890e22..701f53274 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -56,40 +56,6 @@ void Fl_Double_Window::show() {
}*/
-/**
- Forces the window to be redrawn.
-*/
-void Fl_Double_Window::flush()
-{
- flush(0);
-}
-
-
-/**
- Forces the window to be redrawn.
- \param[in] eraseoverlay non-zero to erase overlay, zero to ignore
-
- Fl_Overlay_Window relies on flush(1) copying the back buffer to the
- front everywhere, even if damage() == 0, thus erasing the overlay,
- and leaving the clip region set to the entire window.
-*/
-void Fl_Double_Window::flush(int eraseoverlay) {
- if (!shown()) return;
- make_current(); // make sure fl_gc is non-zero
- Fl_X *myi = Fl_X::i(this);
- if (!myi) return; // window not yet created
- int retval = driver()->double_flush(eraseoverlay);
- if (retval) return;
- if (eraseoverlay) fl_clip_region(0);
- // on Irix (at least) it is faster to reduce the area copied to
- // the current clip region:
- if (myi->other_xid) {
- int X,Y,W,H; fl_graphics_driver->clip_box(0,0,w(),h(),X,Y,W,H);
- fl_graphics_driver->copy_offscreen(X, Y, W, H, myi->other_xid, X, Y);
- }
-}
-
-
void Fl_Double_Window::resize(int X,int Y,int W,int H) {
int ow = w();
int oh = h();
@@ -108,6 +74,12 @@ void Fl_Double_Window::hide() {
}
+void Fl_Double_Window::flush()
+{
+ driver()->flush_double();
+}
+
+
/**
The destructor <I>also deletes all the children</I>. This allows a
whole tree to be deleted at once, without having to keep a pointer to