Author: AlbrechtS
Date: 2010-06-09 01:36:25 -0700 (Wed, 09 Jun 2010)
New Revision: 7636
Log:
Fixed X11/XDBE double buffering (STR #2152, #2197). Both bugs could only be
seen if configure was run with --enable-xdbe (default in FLTK 1.3, optional
in FLTK 1.1).
src/Fl_Double_Window.cxx/Fl_Double_Window::resize():
STR #2152: deallocate back buffer when window is enlarged in any
dimension to force allocation of a new back buffer. This appears
to be necessary for some window managers (e.g. Cygwin).
src/Fl_Overlay_Window.cxx/Fl_Overlay_Window::flush() and
src/Fl_Double_Window.cxx/Fl_Double_Window::flush():
STR #2197: make sure that the entire overlay window will be drawn
after a window redraw, because Fl_Double_Window::flush(1) erases
the overlay as documented.
Modified:
branches/branch-1.3/CHANGES
branches/branch-1.3/src/Fl_Double_Window.cxx
branches/branch-1.3/src/Fl_Overlay_Window.cxx
Modified: branches/branch-1.3/CHANGES
===================================================================
--- branches/branch-1.3/CHANGES 2010-06-07 22:51:18 UTC (rev 7635)
+++ branches/branch-1.3/CHANGES 2010-06-09 08:36:25 UTC (rev 7636)
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
+ - Fixed X11/XDBE double buffering (STR #2152, #2197)
- Added new label and image alignments (STR #2269)
- Added documentation for event delivery (STR #1983)
- Fixed menu and tooltip window animation bug under X11 (compiz)
Modified: branches/branch-1.3/src/Fl_Double_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Double_Window.cxx 2010-06-07 22:51:18 UTC
(rev 7635)
+++ branches/branch-1.3/src/Fl_Double_Window.cxx 2010-06-09 08:36:25 UTC
(rev 7636)
@@ -296,7 +296,7 @@
}
#if USE_XDBE
if (use_xdbe) {
- if (myi->backbuffer_bad) {
+ if (myi->backbuffer_bad || eraseoverlay) {
// Make sure we do a complete redraw...
if (myi->region) {XDestroyRegion(myi->region); myi->region = 0;}
clear_damage(FL_DAMAGE_ALL);
@@ -360,7 +360,15 @@
int oh = h();
Fl_Window::resize(X,Y,W,H);
#if USE_XDBE
- if (use_xdbe) return;
+ if (use_xdbe) {
+ Fl_X* myi = Fl_X::i(this);
+ if (myi && myi->other_xid && (ow < w() || oh < h())) {
+ // STR #2152: Deallocate the back buffer to force creation of a new one.
+ XdbeDeallocateBackBufferName(fl_display,myi->other_xid);
+ myi->other_xid = 0;
+ }
+ return;
+ }
#endif
Fl_X* myi = Fl_X::i(this);
if (myi && myi->other_xid && (ow != w() || oh != h())) {
Modified: branches/branch-1.3/src/Fl_Overlay_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Overlay_Window.cxx 2010-06-07 22:51:18 UTC
(rev 7635)
+++ branches/branch-1.3/src/Fl_Overlay_Window.cxx 2010-06-09 08:36:25 UTC
(rev 7636)
@@ -61,7 +61,7 @@
return;
}
#endif
- int erase_overlay = (damage()&FL_DAMAGE_OVERLAY);
+ int erase_overlay = (damage()&FL_DAMAGE_OVERLAY) | (overlay_ == this);
clear_damage((uchar)(damage()&~FL_DAMAGE_OVERLAY));
Fl_Double_Window::flush(erase_overlay);
if (overlay_ == this) draw_overlay();
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit